/* ============================================
   LUXE — Luxury Cosmetics Design System
   ============================================ */

:root {
    --bg: #F8F6F2;
    --bg-soft: #F2EFE9;
    --primary: #111111;
    --secondary: #6F6A62;
    --gold: #B79B5B;
    --gold-light: #D4C4A0;
    --white: #FFFFFF;
    --border: rgba(17,17,17,0.08);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --header-h: 80px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
button, input, textarea, select { font-family: inherit; }

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Header */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
    background: rgba(248, 246, 242, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    position: relative;
    padding: 4px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--primary);
    transition: width var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 8px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--primary);
    transition: var(--transition);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248,246,242,0.98);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-form {
    display: flex;
    gap: 12px;
    width: 90%;
    max-width: 600px;
}

.search-form input {
    flex: 1;
    border: none;
    border-bottom: 1px solid var(--primary);
    background: transparent;
    font-size: 1.5rem;
    padding: 12px 0;
    outline: none;
    font-family: var(--font-heading);
}

.search-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: 30px; right: 40px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-soft);
}

.hero-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 120px 40px 80px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s 0.3s forwards;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 16px;
    font-weight: 300;
}

.hero-desc {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 40px;
    max-width: 420px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
}

.btn:hover {
    background: var(--primary);
    color: var(--white);
}

.hero-visual {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s 0.5s forwards;
}

.hero-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    background: linear-gradient(135deg, #e8e4dc, #d4cfc5);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--secondary);
    font-weight: 300;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.product-card {
}

.product-card-link {
    display: block;
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-soft);
    aspect-ratio: 3/4;
    margin-bottom: 20px;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 16px; left: 16px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--white);
    padding: 6px 12px;
    font-weight: 500;
}

.product-info {
    text-align: center;
}

.product-category {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 6px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-price {
    font-size: 0.9rem;
    color: var(--secondary);
}

.product-quick-view {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    background: var(--white);
    padding: 10px 24px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s;
    white-space: nowrap;
}

.product-card:hover .product-quick-view {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Brand Story */
.brand-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.brand-story-image {
    aspect-ratio: 4/5;
    background: var(--bg-soft);
    overflow: hidden;
}

.brand-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-story-text h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    margin-bottom: 12px;
}

.brand-story-text .subtitle {
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.brand-story-text p {
    color: var(--secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* Philosophy */
.philosophy {
    text-align: center;
    padding: 120px 40px;
    background: var(--primary);
    color: var(--white);
}

.philosophy blockquote {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
    white-space: pre-line;
}

/* Newsletter */
.newsletter {
    text-align: center;
    padding: 80px 40px;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.newsletter p {
    color: var(--secondary);
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    border: 1px solid var(--border);
    border-right: none;
    padding: 16px 20px;
    background: var(--white);
    outline: none;
    font-size: 0.9rem;
}

.newsletter-form button {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
    padding: 16px 28px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: transparent;
    color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand .logo-text { color: var(--white); }
.footer-tagline {
    margin-top: 12px;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.footer-nav h4, .footer-contact h4, .footer-social h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-nav a, .footer-contact p, .footer-social a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.footer-nav a:hover, .footer-social a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

.footer-links a {
    color: rgba(255,255,255,0.4);
    margin-left: 20px;
}

/* Page Hero (inner pages) */
.page-hero {
    padding: 160px 40px 80px;
    text-align: center;
    background: var(--bg-soft);
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Products Page */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 18px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    border-color: var(--primary);
    color: var(--primary);
}

.sort-select {
    border: 1px solid var(--border);
    padding: 10px 16px;
    background: var(--white);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px 0 100px;
}

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

.product-main-image {
    aspect-ratio: 3/4;
    background: var(--bg-soft);
    margin-bottom: 16px;
    overflow: hidden;
}

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

.product-thumbs {
    display: flex;
    gap: 12px;
}

.product-thumbs img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.product-thumbs img.active,
.product-thumbs img:hover {
    opacity: 1;
}

.product-detail-info .category {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 12px;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.product-detail-price {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--secondary);
}

.product-detail-desc {
    color: var(--secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.product-tabs {
    margin-top: 40px;
}

.tab-buttons {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--secondary);
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: var(--primary);
}

.tab-content {
    display: none;
    color: var(--secondary);
    line-height: 1.8;
}

.tab-content.active { display: block; }

.stock-status {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 14px;
    background: var(--bg-soft);
}

.stock-status.in_stock { color: #2d6a4f; }
.stock-status.out_of_stock { color: #9b2226; }

/* About */
.about-section {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-grid.reverse { direction: rtl; }
.about-grid.reverse > * { direction: ltr; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.value-item h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.value-item p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-info h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.contact-info p {
    color: var(--secondary);
    margin-bottom: 12px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--secondary);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: var(--white);
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.form-message {
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.form-message.success {
    background: #d8f3dc;
    color: #1b4332;
}

.form-message.error {
    background: #f8d7da;
    color: #842029;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s, transform 0.8s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

/* Product Carousel */
.product-carousel-wrap {
    position: relative;
}
.product-carousel {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.product-carousel::-webkit-scrollbar { display: none; }
.product-carousel .product-card {
    flex: 0 0 calc(25% - 24px);
    min-width: 220px;
    scroll-snap-align: start;
}
.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.carousel-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.carousel-btn.prev { left: -16px; }
.carousel-btn.next { right: -16px; }
.carousel-btn.hidden { display: none; }
@media (max-width: 1200px) {
    .product-carousel .product-card { flex: 0 0 calc(33.333% - 22px); }
}
@media (max-width: 992px) {
    .product-carousel .product-card { flex: 0 0 calc(50% - 16px); }
    .carousel-btn.prev { left: 0; }
    .carousel-btn.next { right: 0; }
}
@media (max-width: 480px) {
    .product-carousel .product-card { flex: 0 0 calc(80% - 8px); min-width: 180px; }
}
