/* ============================================
   THE SCENT LIBRARY - FRONTEND STYLES
   Luxury Perfume E-Commerce
   Color Palette: Dusty Rose, Greys, Warm Beige
   ============================================ */

/* ============================================
   IMPORTS & FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --color-primary: #D4A5A5;
    --color-primary-dark: #C18F8F;
    --color-primary-light: #E8D4D4;
    
    --color-neutral-50: #FAFAFA;
    --color-neutral-100: #F5F5F5;
    --color-neutral-200: #E8E8E8;
    --color-neutral-300: #D4D4D4;
    --color-neutral-400: #A3A3A3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;
    
    --color-beige: #FCFCFB;
    --color-beige-dark: #E8E0D5;
    
    --color-success: #86EFAC;
    --color-success-dark: #4ADE80;
    --color-warning: #FDE68A;
    --color-error: #FCA5A5;
    --color-error-dark: #EF4444;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Borders */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Layout */
    --container-width: 1280px;
    --header-height: 80px;
}

/* ============================================
   GLOBAL RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-neutral-800);
    background-color: #f7eeee;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-neutral-900);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--color-neutral-200);
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--color-neutral-900);
    color: white;
    padding: var(--spacing-sm) 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.header-top a {
    color: white;
    opacity: 0.9;
}

.header-top a:hover {
    opacity: 1;
}

.header-main {
    position: fixed; /* or sticky */
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-lg) 0;
    background-color: rgba(255, 255, 255, 0.6); /* Reduced opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.site-logo {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    letter-spacing: 0.05em;
}

.main-nav {
    flex: 1;
    
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    justify-content: center;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-neutral-700);
    padding: var(--spacing-sm) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

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

.nav-link:hover {
    color: var(--color-primary-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-neutral-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    color: var(--color-primary-dark);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 
/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    height: 800px;
    display: flex;
    align-items: center;
    overflow: hidden;
    
    /* Background image properties */
    background-image: url('../images/hero-perfume.jpg');
    background-size: cover;        /* Ensures image covers entire section */
    background-position: center;   /* Centers the image */
    background-repeat: no-repeat;  /* Prevents tiling */
    background-attachment: fixed;  /* Optional: creates parallax effect */
}

/* Optional: Add an overlay for better text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3); /* Light white overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: 450px;
    margin-left: 50rem;
}

.hero-subtitle {
    font-size: 1rem;
    
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-neutral-100);
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: var(--color-neutral-900);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-neutral-700);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.8;
}

/* Remove or comment out this since we're using background-image instead */
/*
.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}
*/

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        background-position: center center;
        background-attachment: scroll;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 400px;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-2xl);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--color-neutral-800);
    border: 2px solid var(--color-neutral-800);
}

.btn-secondary:hover {
    background: var(--color-neutral-800);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--color-neutral-800);
    border: 1px solid var(--color-neutral-300);
}

.btn-ghost:hover {
    background: var(--color-neutral-100);
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-3xl);
    font-size: 1rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-subtitle {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-neutral-600);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-2xl);
}

.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--color-neutral-200);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-neutral-50) 0%, var(--color-neutral-100) 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--border-radius-sm);
}

.product-badge.new {
    background: var(--color-success-dark);
}

.product-badge.sale {
    background: var(--color-error-dark);
}

.product-info {
    padding: var(--spacing-lg);
}

.product-category {
    font-size: 0.875rem;
    color: var(--color-neutral-500);
    margin-bottom: var(--spacing-xs);
}

.product-name {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--color-neutral-900);
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.price-current {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    font-family: var(--font-serif);
}

.price-original {
    font-size: 1rem;
    color: var(--color-neutral-500);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.btn-view-details {
    width: 100%;
    padding: var(--spacing-md);
    background: white;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-view-details:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-add-cart {
    flex: 1;
    padding: var(--spacing-md);
    background: var(--color-neutral-900);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-add-cart:hover {
    background: var(--color-primary-dark);
}

.btn-wishlist {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-wishlist:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

/* ============================================
   COLLECTIONS / CATEGORIES
   ============================================ */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.collection-card {
    position: relative;
    height: 400px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.collection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.collection-card:hover .collection-image {
    transform: scale(1.1);
}

.collection-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--spacing-2xl);
    color: white;
}

.collection-name {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: #FAFAFA
}

.collection-count {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
    background: var(--color-beige);
    padding: var(--spacing-xl) 0;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.trust-item {
    text-align: center;
}

.trust-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto var(--spacing-md);
    background: var(--color-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
}

.trust-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.trust-description {
    font-size: 0.875rem;
    color: var(--color-neutral-600);
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--spacing-xl) var(--spacing-md);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: white;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.newsletter-description {
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    line-height: 1.5;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    box-sizing: border-box; /* Important for proper sizing */
}

.newsletter-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--color-neutral-900);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    box-sizing: border-box; /* Important for proper sizing */
}

.newsletter-submit:hover {
    background: var(--color-neutral-800);
    transform: translateY(-2px);
}

.newsletter-submit:active {
    transform: translateY(0);
}

/* Tablet and above - switch to horizontal layout */
@media (min-width: 768px) {
    .newsletter-section {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }
    
    .newsletter-form {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    
    .newsletter-input {
        flex: 1;
        width: auto; /* Reset width for flex layout */
        min-width: 0; /* Allow input to shrink properly */
    }
    
    .newsletter-submit {
        width: auto; /* Reset width for flex layout */
        flex-shrink: 0; /* Prevent button from shrinking */
    }
}

/* Desktop and above */
@media (min-width: 1024px) {
    .newsletter-section {
        padding: var(--spacing-3xl) 0;
    }
    
    .newsletter-title {
        margin-bottom: var(--spacing-md);
    }
    
    .newsletter-description {
        margin-bottom: var(--spacing-xl);
    }
}

/* Extra small devices - ensure no overflow */
@media (max-width: 360px) {
    .newsletter-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .newsletter-input,
    .newsletter-submit {
        padding: 0.875rem 1rem;
    }
}

/* Accessibility improvements */
.newsletter-input:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.newsletter-submit:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .newsletter-submit {
        transition: none;
    }
    
    .newsletter-submit:hover {
        transform: none;
    }
}
/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-neutral-900);
    color: var(--color-neutral-300);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-lg);
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-neutral-400);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        background-position: center center;
        background-attachment: scroll;
        padding: var(--spacing-2xl) var(--spacing-lg);
    }
    
    .hero-content {
        margin-left: 0 !important; /* REMOVE THAT RIDICULOUS MARGIN 😂 */
        margin-right: 0 !important;
        max-width: 100%;
        text-align: center;
        padding: 0;
        background: rgba(0, 0, 0, 0.1); /* Dark background behind text */
        padding: var(--spacing-xl);
        border-radius: var(--border-radius-lg);
        backdrop-filter: blur(3px); /* Modern blur effect */
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 0.9375rem !important;
        margin: var(--spacing-md) 0;
    }
    
    /* Stack buttons vertically on mobile */
    .hero-content > div {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-content .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
}
    
/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.hidden { display: none; }
