/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --color-bg: #0a0a0a;
    --color-bg-light: #1a1a1a;
    --color-text: #ffffff;
    --color-text-secondary: #cccccc;
    --color-accent: #60A5FA;
    --color-accent-dark: #3B82F6;
    --color-green: #2c7a4d;
    --color-gold: #c49a6c;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ХЕДЕР (адаптивный, без абсолютного позиционирования) ===== */
.header {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo-img {
    height: 120px;
    width: auto;
    transition: height 0.3s ease;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--color-text);
    font-size: 22px;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

main {
    margin-top: 80px;
    padding-top: 20px;
}

/* ===== ОБЩИЕ СЕКЦИИ ===== */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #fff, #a8a8a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== СЕТКА ГАЛЕРЕИ (ГЛАВНАЯ) ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 2rem;
}

/* ===== КАРТОЧКА ТОВАРА НА ГЛАВНОЙ ===== */
.product-showcase {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.product-showcase:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.product-main-image {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.15s ease;
}

.product-main-image img:hover {
    transform: scale(1.02);
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.product-thumbnail {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-thumbnail.active,
.product-thumbnail:hover {
    opacity: 1;
    border-color: var(--color-accent);
}

/* Блок цены в карточке товара с анимацией shimmer */
.product-showcase .product-price {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.product-header {
    margin-bottom: 20px;
}
.product-showcase .product-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Кнопка "Подробнее" с анимацией пульсации и стрелкой */
.product-showcase .gallery-overlay .click-hint {
    font-size: 0.85rem;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 12px;
    text-align: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(196, 154, 108, 0.15), rgba(196, 154, 108, 0.05));
    border-radius: 40px;
    border: 1px solid rgba(196, 154, 108, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(4px);
    color: var(--color-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: gentlePulse 2s ease-in-out infinite;
}

.product-showcase .gallery-overlay .click-hint::after {
    content: "→";
    display: inline-block;
    transition: transform 0.2s ease;
    font-weight: normal;
    font-size: 1rem;
}

.product-showcase .gallery-overlay .click-hint:hover {
    background: linear-gradient(135deg, rgba(196, 154, 108, 0.25), rgba(196, 154, 108, 0.1));
    border-color: rgba(196, 154, 108, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 154, 108, 0.25);
    color: #d4ae7c;
    animation: none;
}

.product-showcase .gallery-overlay .click-hint:hover::after {
    transform: translateX(4px);
}

@keyframes gentlePulse {
    0% { box-shadow: 0 0 0 0 rgba(196, 154, 108, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(196, 154, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 154, 108, 0); }
}

/* ===== СТРАНИЦА ТОВАРА ===== */
.breadcrumb {
    margin: 120px 0 30px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.product-gallery {
    position: sticky;
    top: 140px;
}

/* Карусель */
.carousel-container {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.05);
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.3);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--color-accent);
    transform: scale(1.2);
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: var(--color-accent);
}

/* Информация о товаре */
.product-info {
    padding: 20px 0;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.product-price {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
}

/* Красивые маркеры для списков */
.product-features ul,
.product-advantages ul,
.product-delivery ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.product-features li,
.product-advantages li,
.product-delivery li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.45;
    color: #e0e0e0;
}

.product-advantages li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-green);
    font-weight: bold;
    font-size: 1.2rem;
}

.product-features li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-size: 1.1rem;
}

.product-delivery li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-size: 1.3rem;
    line-height: 1;
}

/* Опции с ценами */
.product-options ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.product-options li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.option-name {
    font-weight: 500;
    color: #e0e0e0;
}
.option-name::after {
    content: " —";
}
.option-price {
    font-weight: 600;
    color: var(--color-green);
    white-space: nowrap;
}

/* Кнопки */
.product-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    min-width: 180px;
}

.btn svg {
    width: 40px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ===== ФУТЕР ===== */
.footer {
    background: linear-gradient(135deg, #0a0a0a, #0f0f0f);
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
}
.social-link:hover {
    background: #a8a8a8;
    transform: translateY(-2px);
}
.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
/* Тултипы */
.social-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    pointer-events: none;
    z-index: 10;
}
.social-link[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }
.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--color-accent);
}
.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.modal-arrow {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}
.modal-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}
.modal-indicators {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.modal-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}
.modal-indicator.active {
    background: var(--color-accent);
    transform: scale(1.2);
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты (≤1024px) */
@media (max-width: 1024px) {
    .container { max-width: 1000px; padding: 0 18px; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(650px, 1fr)); }
}

/* Мобильные (≤768px) */
@media (max-width: 768px) {
    .header .container { flex-direction: column; gap: 0.8rem; }
    .logo-img { height: 60px; }
    .nav { gap: 0.8rem; width: 100%; justify-content: center; }
    .nav-link { font-size: 16px; padding: 6px 12px; }

    main { margin-top: 110px; }
    .hero { padding: 100px 0 50px; }
    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    section { padding: 60px 0; }

    .gallery-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .product-showcase { max-width: 100%; padding: 20px; }

    .product-content { grid-template-columns: 1fr; gap: 40px; }
    .product-gallery { position: static; }
    .carousel-wrapper { aspect-ratio: 4/3; }
    .carousel-arrow { width: 40px; height: 40px; }
    .thumbnail-gallery { grid-template-columns: repeat(4, 1fr); }
    .thumbnail { height: 60px; }

    .product-title { font-size: 2rem; }
    .price { font-size: 2rem; }
    .product-actions { flex-direction: column; }
    .btn { width: 100%; }

    .footer-content { flex-direction: column; text-align: center; gap: 1.5rem; }
    .social-links { justify-content: center; }

    .modal-arrow { width: 48px; height: 48px; }
    .modal-prev { left: -120px; }
    .modal-next { right: -120px; }
}

/* Маленькие мобильные (≤480px) */
@media (max-width: 480px) {
    .logo-img { height: 45px; }
    .nav-link { font-size: 14px; padding: 4px 10px; }
    .nav { gap: 0.5rem; }

    .breadcrumb { margin-top: 100px; font-size: 12px; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }
    section { padding: 40px 0; }

    .product-title { font-size: 1.8rem; }
    .price { font-size: 1.8rem; }
    .product-description p { font-size: 1rem; }
    .product-features h3, .product-advantages h3, .product-delivery h3 { font-size: 1.2rem; }

    .carousel-arrow { width: 36px; height: 36px; }
    .thumbnail-gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .thumbnail { height: 50px; }

    .modal-arrow { width: 40px; height: 40px; }
    .modal-prev { left: -100px; }
    .modal-next { right: -100px; }
    .modal-close { width: 40px; height: 40px; top: 10px; right: 10px; }
    .modal-close::before, .modal-close::after { width: 18px; }
}

/* Очень маленькие (≤360px) */
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    .hero-title { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
    .product-title { font-size: 1.6rem; }
    .price { font-size: 1.6rem; }
    .btn { font-size: 1rem; padding: 12px 20px; }
    .social-link { width: 35px; height: 35px; }
    .social-icon { width: 18px; height: 18px; }
}