/* ================================================================
   ENCANTASHOP — ГЛАВНАЯ ТАБЛИЦА СТИЛЕЙ
   Структура:
     1. CSS-переменные
     2. Базовые стили
     3. Навбар
     4. Кнопки
     5. Карточки товаров
     6. Карточки брендов
     7. Секция "Почему мы"
     8. Форма регистрации
     9. Футер
    10. Адаптивность
================================================================ */


/* ================================================================
   1. CSS-ПЕРЕМЕННЫЕ
================================================================ */
/* @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap'); */

@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand/Quicksand-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand/Quicksand-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand/Quicksand-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand/Quicksand-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand/Quicksand-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* :root { ... */

:root {
    /* --- Цвета --- */
    --bg:               #f6f1eb;
    --bg-soft:          #fbf8f4;
    --surface:          rgba(255, 255, 255, 0.72);
    --surface-strong:   #fffaf5;
    --text:             #2f2840;
    --muted:            #756d7f;
    --line:             rgba(83, 67, 101, 0.12);
    --line-strong:      rgba(83, 67, 101, 0.22);

    /* Акцентные/брендовые */
    --brand-color:      rgb(10, 5, 75);
    --accent-color:     rgb(255, 0, 0);
    --accent:           #dbc3a6;
    --accent-deep:      #c7a982;
    --accent-dark:      #b69063;

    /* Тени */
    --shadow:           0 18px 40px rgba(74, 52, 31, 0.08);
    --shadow-soft:      0 10px 24px rgba(74, 52, 31, 0.06);

    /* Скругления */
    --radius-xl:        28px;
    --radius-lg:        22px;
    --radius-md:        16px;
    --radius-sm:        12px;

    /* Glass-стиль */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgb(75, 37, 37);
    --glass-shadow:     0 8px 24px rgb(239, 222, 204);
    --glass-blur:       blur(14px);
    --glass-bg-card:    rgba(255, 255, 255, 0.68);
    --glass-border-alt: rgba(255, 255, 255, 0.25);

    /* Навбар */
    --nav-bg:           rgba(255, 255, 255, 0.2);
    --nav-blur:         12px;
    --nav-text:         #1b0d5b;
    --nav-accent:       #000000;
    --nav-border:       rgba(255, 255, 255, 0.3);
    --nav-shadow:       0 2px 10px rgba(0, 0, 0, 0.05);

    /* Футер */
    --footer-bg:        rgba(255, 255, 255, 0.15);
    --footer-blur:      14px;
    --footer-main:      #1b0d5b;
    --footer-muted:     rgba(27, 13, 91, 0.7);
    --footer-accent:    #000000;
    --footer-border:    rgba(255, 255, 255, 0.3);

    /* Типографика */
    --font-main:        'Quicksand', sans-serif;
    --fs-xs:            0.75rem;
    --fs-sm:            0.85rem;
    --fs-md:            0.9rem;
    --fs-base:          1rem;
    --fs-lg:            1.05rem;
    --fs-xl:            1.1rem;
    --fs-xxl:           1.2rem;
    --fw-light:         300;
    --fw-regular:       400;
    --fw-medium:        500;
    --fw-semibold:      600;
    --fw-bold:          700;

    /* Контейнер */
    --container:        1280px;
}


/* ================================================================
   2. БАЗОВЫЕ СТИЛИ
================================================================ */
body {
    margin: 0;
    font-family: var(--font-main), serif;
    color: var(--text);
    background:
            radial-gradient(circle at top left, rgba(255,255,255,0.9), transparent 36%),
            linear-gradient(180deg, #f8f5f1 0%, #f4eee8 46%, #f7f2ed 100%);
    line-height: 1.5;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
}

.section {
    padding: 38px 0;
}

.font-serif {
    font-family: Georgia, "Times New Roman", Times, serif;
}


/* ================================================================
   3. НАВБАР
================================================================ */
.custom-navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(var(--nav-blur));
    -webkit-backdrop-filter: blur(var(--nav-blur));
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    padding: 0.2rem 0;
    min-height: 40px;
    transition: all 0.3s ease;
}

.custom-navbar .navbar-brand {
    color: var(--nav-text);
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    letter-spacing: 1px;
}

.custom-navbar .nav-link {
    color: var(--nav-text);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-base);
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}
.custom-navbar .nav-link:hover {
    color: var(--nav-accent);
}

/* Dropdown */
.custom-navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nav-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
.custom-navbar .dropdown-item:hover {
    background-color: rgba(27, 13, 91, 0.05);
    color: var(--nav-accent);
}

/* Badge */
.custom-navbar .badge {
    background-color: var(--nav-accent);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
}


/* ================================================================
   4. КНОПКИ
================================================================ */
.btn,
.btn-secondary,
.chip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Основная кнопка (тёплый градиент) */
.btn {
    min-height: 36px;
    padding: 0 16px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    background: linear-gradient(180deg, #e2ccb0 0%, #d6b892 100%);
    color: #3f2d1f;
    box-shadow: 0 10px 22px rgba(182, 144, 99, 0.18);
}
.btn:hover {
    transform: translateY(-2px);
}

/* Вторичная кнопка (glass) */
.btn-secondary {
    min-height: 36px;
    padding: 0 16px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--brand-color);
    backdrop-filter: blur(10px);
}

/* Акцентная кнопка */
.btn-glass {
    background: var(--accent-color);
    color: #fff;
    font-weight: var(--fw-semibold);
    border-radius: 0.6rem;
    border: none;
}

/* Chip (бренд) */
.brand-chip {
    transition: all 0.3s ease;
    border-color: rgba(200, 160, 110, 0.4);
    color: #3a2a1a;
}


/* ================================================================
   5. КАРТОЧКA КАТАЛОГA ТОВАРОВ
================================================================ */

:root {
    /* --- Тень карточки --- */
    --card-shadow-idle:  0 2px 8px  rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 28px rgba(84, 3, 155, 0.32),
    0 2px 8px  rgba(0, 0, 0, 0.08);

    /* --- Карточка --- */
    --card-bg:            #ffffff;
    --card-border-color:  rgba(0, 0, 0, 0.09);
    --card-border-radius: 16px;
    --card-padding:       8px 8px 12px;

    /* --- Изображение --- */
    --card-img-radius:    12px;
    --card-img-bg:        #f5f5f5;

    /* --- Бренд --- */
    --card-brand-color:   #1a1a2e;
    --card-brand-size:    11px;
    --card-brand-weight:  600;

    /* --- Название товара --- */
    --card-name-color:    #1a1a2e;
    --card-name-size:     13px;
    --card-name-weight:   600;

    /* --- Цены --- */
    --card-price-size:     14px;
    --card-price-regular:  #1a1a2e;
    --card-price-old:      #9e9e9e;
    --card-price-discount: #dc3545;

    /* --- Бейдж скидки --- */
    --card-badge-bg:      #dc3545;
    --card-badge-color:   #ffffff;
    --card-badge-radius:  6px;
    --card-badge-size:    11px;

    /* --- Звёзды --- */
    --card-star-full:     #f5a623;
    --card-star-empty:    #cccccc;
}

/* ── Карточка ── */
.card.card-hover {
    background: var(--glass-bg, var(--card-bg));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border, var(--card-border-color));
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow-idle);
    overflow: hidden;
    padding: var(--card-padding);
    text-align: center;
    position: relative;
    transition: transform 0.28s cubic-bezier(.22, .68, 0, 1.2),
    box-shadow 0.28s ease;
}

.card.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

/* ── Обёртка изображения ── */
.product-image-wrapper {
    width: 100%;
    aspect-ratio: 5 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-img-bg);
    border-radius: var(--card-img-radius);
    overflow: hidden;
    box-sizing: border-box;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Тело карточки ── */
.card.card-hover .card-body {
    padding: 10px 4px 0;
}

/* ── Бренд (первый .product-title) ── */
.product-title:first-of-type {
    font-size: var(--card-brand-size);
    font-weight: var(--card-brand-weight);
    color: var(--card-brand-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px;
}

/* ── Название товара (второй .product-title) ── */
.product-title {
    font-size: var(--card-name-size);
    font-weight: var(--card-name-weight);
    color: var(--card-name-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 4px;
}

/* ── Цены ── */
.regular-price {
    font-size: var(--card-price-size);
    font-weight: 700;
    color: var(--card-price-regular);
}

.old-price {
    font-size: var(--card-price-size);
    color: var(--card-price-old);
    text-decoration: line-through;
}

.discount-price {
    font-size: var(--card-price-size);
    font-weight: 700;
    color: var(--card-price-discount);
}

/* ── Бейдж скидки ── */
.discount-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--card-badge-bg);
    color: var(--card-badge-color);
    font-size: var(--card-badge-size);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--card-badge-radius);
    z-index: 10;
    line-height: 1.2;
}

/* ── Бейдж PRO ── */
.card.card-hover .badge.bg-dark-subtle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: var(--card-badge-radius);
    padding: 3px 8px;
    z-index: 10;
}

/* ── Звёзды рейтинга ── */
.card.card-hover .card-body svg {
    flex-shrink: 0;
    vertical-align: middle;
}

/* ================================================================
   6. КАРТОЧКИ БРЕНДОВ
================================================================ */
.brand-card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 1rem;
    background: var(--glass-bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-card-link:hover .brand-card {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(74, 52, 31, 0.18);
}

.brand-card-link:hover .brand-card img {
    filter: brightness(0.78) saturate(0.92);
}

.brand-card img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
    transition: all 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Градиентный оверлей снизу */
.brand-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(32, 22, 17, 0.20) 0%, transparent 55%);
    opacity: 0.85;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.brand-card:hover::after {
    opacity: 1;
}

/* card-body */
.brand-card .card-body {
    padding: 0.75rem 0.75rem 1rem;
}

.brand-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.brand-card:hover .brand-chip {
    background-color: var(--accent);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(182, 144, 99, 0.3);
}


/* ================================================================
   7. СЕКЦИЯ «ПОЧЕМУ МЫ»
================================================================ */
.why-card {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: rgba(255, 251, 246, 0.85);
    border: 1px solid rgba(83, 67, 101, 0.08);
    box-shadow: var(--shadow-soft);
}

.section-head {
    max-width: 760px;
    margin: 0 auto 20px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(219, 195, 166, 0.18);
    color: #8b6d49;
    font-size: 12px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-text {
    color: var(--muted);
    font-size: 14px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(83, 67, 101, 0.08);
}

.why-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(219, 195, 166, 0.22);
    color: #8b6d49;
    font-size: 14px;
    font-weight: var(--fw-bold);
}

.why-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.2;
}

.why-item p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}


/* ================================================================
   8. ФОРМА РЕГИСТРАЦИИ
================================================================ */
.register-wrapper {
    min-height: calc(100vh - 100px);
}

.register-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
    max-width: 500px;
    width: 100%;
    color: var(--brand-color);
}

.register-card h2 {
    font-weight: var(--fw-bold);
    color: var(--brand-color);
}

.register-card .form-label {
    font-weight: var(--fw-semibold);
}

.register-card .form-control {
    border-radius: 0.6rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.6);
    transition: border-color 0.3s ease;
}


/* ================================================================
   9. ФУТЕР
================================================================ */
.custom-footer .footer-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--footer-main);
    border-bottom: 2px solid var(--footer-border);
    display: block; /* было inline-block */
    padding-bottom: 0.2rem;
}

/* Заголовок колонки */
.custom-footer .footer-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--footer-main);
    border-bottom: 2px solid var(--footer-border);
    display: inline-block;
    padding-bottom: 0.2rem;
}

/* Ссылки */
.custom-footer a {
    color: var(--footer-main);
    text-decoration: none;
    font-weight: var(--fw-medium);
    transition: all 0.3s ease;
}
.custom-footer a:hover {
    color: var(--footer-accent);
    text-decoration: underline;
}

/* Социальные иконки */
.custom-footer .social-link {
    color: var(--footer-main) !important;
    transition: transform 0.2s ease, color 0.2s ease;
}
.custom-footer .social-link:hover {
    color: var(--footer-accent) !important;
    transform: translateY(-3px);
}

/* Второстепенный текст */
.custom-footer .text-muted {
    color: var(--footer-muted) !important;
}

/* Горизонтальный разделитель */
.custom-footer .footer-divider {
    border-top: 1px solid var(--footer-border);
    margin: 1.5rem 0;
    opacity: 1;
}

.custom-footer p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

@media (max-width: 1024px) {
    .hide-mobile {
        display: none;
    }

    .section {
        padding: 28px 0;
    }

    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-card {
        padding: 24px;
        border-radius: 24px;
    }

    .brand-card .brand-name,
    .product-title {
        font-size: var(--fs-xs);
    }

    .btn {
        font-size: var(--fs-xs);
        min-height: 30px;
        padding: 0 12px;
    }

    .custom-footer {
        text-align: center;
        padding-top: 1.5rem;
    }

    .custom-footer .footer-title {
        margin-top: 1rem;
    }

    .custom-footer .justify-content-md-start {
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    .brand-name {
        font-size: var(--fs-md);
        padding: 1rem 0.75rem;
    }

    .brand-card:hover .brand-name {
        transform: translateY(-4px);
    }
}


/* Ссылки в breadcrumb */
.breadcrumb-item a {
    color: #dbcab9;        /* цвет ссылки */
    font-size: 14px;       /* размер шрифта */
    font-weight: 500;      /* жирность */
    text-decoration: none; /* убрать подчёркивание */
}

/* При наведении */
.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Активный (последний) элемент */
.breadcrumb-item.active {
    color: #6c757d;
    font-size: 14px;
}


/*INSTAGRAM*/

/* Карточка-обёртка — горизонтальная, во всю ширину контейнера */
.instagram-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 16px 40px;
    border-radius: var(--radius-xl);
    background: rgba(255, 251, 246, 0.85);
    border: 1px solid rgba(83, 67, 101, 0.08);
    box-shadow: var(--shadow-soft);
}

/* Текстовая колонка */
.instagram-copy .section-title {
    margin-bottom: 6px;
}

.instagram-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

/* Коллаж из фото — горизонтальная лента */
.instagram-collage {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 10px;
    flex-shrink: 0;
}

.instagram-shot {
    width: 80px;
    height: 72px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(83, 67, 101, 0.08);
}
.instagram-shot {
    position: relative;
    overflow: hidden;
}

.instagram-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.instagram-collage {
    display: flex;
    justify-content: flex-end;
}

.instagram-icon-link {
    display: inline-flex;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-radius: 18px;
    padding: 14px;
    color: white;
    transition: opacity 0.2s;
}

.instagram-icon-link:hover {
    opacity: 0.85;
}


/* Адаптив: на планшете — одна колонка */
@media (max-width: 1024px) {
    .instagram-card {
        grid-template-columns: 1fr;
        padding: 24px 28px;
    }

    .instagram-collage {
        grid-template-columns: repeat(3, 1fr);
    }

    .instagram-shot {
        width: 100%;
        height: 72px;
    }
}

@media (max-width: 480px) {
    .instagram-card {
        padding: 20px;
    }
}
