/* --- 1. ПЕРЕМЕННЫЕ И ШРИФТЫ --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300,0,0&display=swap');

:root {
    --color-primary: #a69575;
    --color-primary-dark: #8c7d5f;
    --color-bg-light: #fcfaf7;
    --color-bg-dark: #1a1814;
    --color-beige-soft: #f4f1e8;
    --color-beige-med: #e9e1d1;
    --color-text-main: #4a453e;
    --color-text-white: #f4f3f0;
    --color-text-muted: #9ca3af;
    --color-beige-cta: #f1ece1;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    --radius-default: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem; /* rounded-3xl аналог */
    --radius-full: 9999px;
}

/* Dark Mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-light: #1a1814;
        --color-text-main: #f4f3f0;
        --color-beige-soft: #2a2720;
    }
}

/* --- 2. БАЗОВЫЕ СТИЛИ --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-main);
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Важно для мобилок */
    width: 100%;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; font-size: 24px; }

/* Утилиты */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
.hidden { display: none !important; }
@media (min-width: 1024px) { .lg-hidden { display: none !important; } }
@media (max-width: 1023px) { .lg-visible { display: none !important; } }

/* Скроллбар */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- 3. HEADER --- */
.header {
    position: sticky; top: 0; z-index: 100; width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-beige-soft);
    height: 80px;
    display: flex; align-items: center;
}
.dark .header { background-color: rgba(26, 24, 20, 0.9); border-color: rgba(255,255,255,0.1); }

.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.header-left { display: flex; align-items: center; gap: 3rem; }

.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { color: var(--color-primary); }
.logo-text { font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: -0.025em; }

.nav-desktop { display: flex; gap: 2rem; }
.nav-link { font-size: 0.875rem; font-weight: 500; }
.nav-link:hover { color: var(--color-primary); }
.nav-link.active { color: var(--color-primary); }

.header-right { display: flex; align-items: center; gap: 1.5rem; }

.search-bar {
    display: none;
    align-items: center;
    background-color: rgba(244, 241, 232, 0.5);
    border: 1px solid var(--color-beige-soft);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
}
@media (min-width: 768px) { .search-bar { display: flex; } }
.search-input { background: transparent; border: none; outline: none; font-size: 0.875rem; width: 200px; margin-left: 0.5rem; color: inherit; }

.icon-actions { display: flex; gap: 1rem; }
.icon-btn {
    padding: 0.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    position: relative; transition: background-color 0.2s;
}
.icon-btn:hover { background-color: var(--color-beige-soft); }
.badge {
    position: absolute; top: 2px; right: 2px;
    background-color: var(--color-primary); color: white;
    font-size: 10px; font-weight: bold;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
@media (min-width: 0px) and (max-width: 900px) {
	.header-left {gap: 3rem;}
	.icon-btn {padding: 0rem;}
}

/* --- 4. MOBILE MENU --- */
.mobile-menu-overlay {
    position: fixed; inset: 0; background-color: rgba(0,0,0,0.5); z-index: 40;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
    position: fixed; top: 0; left: 0; bottom: 0; width: 85%; max-width: 320px;
    background-color: var(--color-bg-light); z-index: 60; /* Выше хедера */
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem; display: flex; flex-direction: column; gap: 2rem;
    box-shadow: 10px 0 25px rgba(0,0,0,0.1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-nav-link { font-size: 1.125rem; font-weight: 500; border-bottom: 1px solid var(--color-beige-soft); padding-bottom: 0.75rem; }

/* --- 5. HERO SECTION --- */
.hero {
    position: relative;
    min-height: 650px;
    height: 85vh;
    overflow: hidden; /* Важно: скрывает вылезающие фигуры */
    background-color: #faf8f5;
    display: flex; align-items: center; justify-content: center; text-align: center;
    width: 100%;
}
.dark .hero { background-color: var(--color-bg-dark); }

.abstract-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.abstract-shape { fill: #ede8dc; opacity: 0.6; }
.dark .abstract-shape { fill: #2a2720; opacity: 0.2; }
/* Фигуры теперь не вызовут горизонтальный скролл благодаря overflow:hidden у .hero */
.shape-1 { position: absolute; top: -6rem; right: -6rem; width: 700px; height: 700px; }
.shape-2 { position: absolute; bottom: -12rem; left: -6rem; width: 900px; height: 900px; }
@media (max-width: 768px) {
    .shape-1 { width: 300px; height: 300px; top: -3rem; right: -3rem; }
    .shape-2 { width: 400px; height: 400px; bottom: -5rem; left: -5rem; }
}

.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 0 1.5rem; }
.hero-badges { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.hero-line { width: 3rem; height: 1px; background-color: var(--color-primary); }
.hero-subtitle { color: var(--color-primary); font-weight: 700; letter-spacing: 0.4em; text-transform: uppercase; font-size: 0.7rem; }

.hero-title {
    font-size: 3rem; font-weight: 300; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .hero-title { font-size: 5rem; } }
.hero-highlight { font-weight: 700; font-style: italic; color: var(--color-primary); font-family: serif; }
.hero-desc { font-size: 1.125rem; color: var(--color-text-muted); font-weight: 300; margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
.btn-hero {
    background-color: var(--color-beige-med); color: #4a4538;
    padding: 1rem 3rem; border-radius: 99px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem;
    transition: all 0.3s;
}
.btn-hero:hover { background-color: var(--color-primary); color: white; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(166, 149, 117, 0.2); }

.link-hero {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; cursor: pointer;
}
.link-hero:hover { color: var(--color-primary); }
.link-hero span { transition: transform 0.3s; }
.link-hero:hover span { transform: translateX(5px); }

/* --- 6. FEATURES GRID --- */
.section-py { padding-top: 6rem; padding-bottom: 6rem; }
.border-y { border-top: 1px solid var(--color-beige-soft); border-bottom: 1px solid var(--color-beige-soft); }
.dark .border-y { border-color: rgba(255,255,255,0.05); }

.features-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.title-underline { width: 5rem; height: 4px; background-color: var(--color-primary); margin: 0 auto; border-radius: 2px; }

.features-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 0px) and (max-width: 900px) {
    .section-title {line-height:2.5rem}
    .section-py { padding-top: 70px; padding-bottom: 70px;}
}

.feature-card { display: flex; flex-direction: column; items-align: center; text-align: center; gap: 1rem; }
/* Исправление центровки карточек */
.feature-card { align-items: center; } 

.feature-icon-circle {
    width: 5rem; height: 5rem; background-color: var(--color-beige-soft);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.dark .feature-icon-circle { background-color: rgba(255,255,255,0.05); }
.feature-card:hover .feature-icon-circle { transform: scale(1.1); }
.feature-title { font-size: 1.125rem; font-weight: 700; }
.feature-desc { font-size: 0.875rem; color: var(--color-text-muted); padding: 0 1rem; }

/* --- 7. NEW ARRIVALS (GRID) --- */
.section-header-flex { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; }
@media(min-width: 768px) {
    .section-header-flex { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

.link-view-all { color: var(--color-primary); font-weight: 600; display: flex; align-items: center; gap: 0.25rem; }
.link-view-all:hover span { transform: translateX(4px); transition: transform 0.2s; }

.products-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 640px) { .products-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { cursor: pointer; }
.product-image-box {
    position: relative; aspect-ratio: 4/5; overflow: hidden;
    border-radius: var(--radius-xl); background-color: var(--color-beige-soft);
}
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.product-card:hover .product-img { transform: scale(1.1); }

.badge-new {
    position: absolute; top: 1rem; left: 1rem;
    background-color: white; color: var(--color-primary);
    padding: 0.25rem 0.75rem; border-radius: 99px;
    font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
    z-index: 10;
}

.hover-overlay {
    position: absolute; inset: 0; background-color: rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover .hover-overlay { opacity: 1; }
/* На мобильных кнопка видна всегда или внизу */
@media (max-width: 1024px) {
    .hover-overlay { opacity: 1; background: transparent; align-items: flex-end; padding-bottom: 1rem; }
}

.btn-add-cart {
    background-color: var(--color-beige-cta); color: #4a4538;
    padding: 0.5rem 1.5rem; border-radius: 99px; font-weight: 700; font-size: 0.875rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: all 0.2s;
    position: relative; z-index: 20;
}
.btn-add-cart:hover { background-color: var(--color-primary); color: white; }

.product-info { margin-top: 1rem; display: flex; justify-content: space-between; align-items: flex-start; }
.product-title { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.25rem; }
.product-category { font-size: 0.875rem; color: var(--color-text-muted); }
.product-price { font-weight: 700; color: var(--color-primary); }

/* --- 8. BEST SELLERS (SLIDER) - ИСПРАВЛЕН --- */
.bg-soft { background-color: var(--color-beige-soft); }
.dark .bg-soft { background-color: rgba(255,255,255,0.03); }

.slider-nav-wrap { display: flex; gap: 0.5rem; justify-content: flex-end; margin-bottom: 1rem; }
.slider-btn {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-primary);
    display: flex; align-items: center; justify-content: center; color: var(--color-primary);
    transition: all 0.2s; position: relative; z-index: 50; background: transparent;
}
.slider-btn:hover { background-color: var(--color-primary); color: white; }

.slider-track {
    display: flex; 
    gap: 2rem; 
    overflow-x: auto; 
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory; 
    /* scroll-behavior: smooth;  <-- УДАЛИТЕ ЭТУ СТРОКУ */
    position: relative; 
    z-index: 10;
}

.best-seller-card {
    min-width: 300px;
    background-color: white; border-radius: 1rem; padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.05);
    scroll-snap-align: start;
}
.dark .best-seller-card { background-color: #27272a; border-color: rgba(255,255,255,0.05); }

.bs-img-box { aspect-ratio: 1/1; border-radius: 0.75rem; overflow: hidden; margin-bottom: 1rem; }
.bs-img { width: 100%; height: 100%; object-fit: cover; }

.rating { display: flex; align-items: center; gap: 2px; color: var(--color-primary); margin-bottom: 0.5rem; }
.rating-text { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 500; margin-left: 0.25rem; }

.bs-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.btn-icon-cart {
    padding: 0.5rem; border: 1px solid var(--color-beige-soft); border-radius: 50%;
    color: var(--color-primary); transition: all 0.2s;
}
.btn-icon-cart:hover { background-color: var(--color-primary); color: white; }

/* --- 9. CATEGORIES (ИСПРАВЛЕН СТИЛЬ) --- */
.cats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 900px; margin: 0 auto; }
@media (min-width: 768px) { .cats-grid { grid-template-columns: repeat(4, 1fr); } }

/* Возвращаем стиль квадратов из оригинала */
.cat-card { text-align: center; display: block; }
.cat-icon-box {
    width: 100%; aspect-ratio: 1/1; 
    background-color: var(--color-beige-soft); /* Исходный фон */
    border: 1px solid var(--color-beige-med); /* Исходная рамка */
    border-radius: 1.5rem; /* rounded-3xl */
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; transition: all 0.3s;
}
.dark .cat-icon-box { background-color: #27272a; border-color: rgba(255,255,255,0.1); }

/* Ховер эффекты как в оригинале */
.cat-card:hover .cat-icon-box { background-color: var(--color-beige-med); }

.cat-icon { font-size: 3.75rem; /* text-6xl */ color: var(--color-primary); transition: transform 0.3s; }
.cat-card:hover .cat-icon { transform: scale(1.1); }

.cat-name { 
    font-weight: 600; text-transform: uppercase; font-size: 0.75rem; 
    letter-spacing: 0.2em; color: var(--color-text-main); transition: color 0.2s; 
}
.cat-card:hover .cat-name { color: var(--color-primary); }

/* --- 10. FOOTER --- */
.footer { background-color: #2a2720; color: white; padding-top: 5rem; padding-bottom: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-logo { display: flex; align-items: center; gap: 0.5rem; color: white; margin-bottom: 1.5rem; }
.footer-desc { color: #9ca3af; font-size: 0.875rem; margin-bottom: 2rem; }
.social-links { display: flex; gap: 1rem; }
.social-btn {
    width: 2.5rem; height: 2.5rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.social-btn:hover { background-color: var(--color-primary); border-color: var(--color-primary); }

.footer-heading { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-primary); font-size: 0.75rem; margin-bottom: 2rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.footer-links a { color: #9ca3af; font-size: 0.875rem; }
.footer-links a:hover { color: var(--color-primary); }

.sub-form { display: flex; }
.sub-input {
    background-color: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 0.75rem 1rem; border-radius: 0.5rem 0 0 0.5rem; width: 100%; outline: none; font-size: 0.875rem;
}
.sub-input:focus { border-color: var(--color-primary); }
.sub-btn {
    background-color: var(--color-primary); color: white; padding: 0 1rem;
    border-radius: 0 0.5rem 0.5rem 0; transition: background-color 0.2s;
}
.sub-btn:hover { background-color: var(--color-primary-dark); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 5rem; padding-top: 2rem; text-align: center; font-size: 0.75rem; color: #6b7280; }
.footer-bottom a:hover { color: white; }
@media (min-width: 0px) and (max-width: 900px) {
    .footer-links {gap: 0px;}
    .footer-heading {margin-bottom: 0.5rem;}
    .footer-grid {gap: 2rem;}
    .footer {
        padding-top: 70px;
        padding-bottom: 50px;
    }
}