/**
 * Holiday Gift Guide - Main Stylesheet
 * Inspired by Nordstrom's clean, elegant design
 */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Clean and minimal palette */
    --color-primary: #ff4081;        /* Pink accent for CTAs */
    --color-primary-dark: #e91e63;
    --color-secondary: #2c3e50;      /* Dark text */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #1a1a1a;
    --color-success: #4caf50;
    --color-error: #f44336;
    --color-warning: #ff9800;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* ===== HEADER ===== */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-main {
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.site-logo:hover {
    color: var(--color-primary);
}

/* Desktop Search */
.desktop-search {
    flex: 1;
    max-width: 400px;
}

.desktop-search .search-input {
    width: 100%;
}

.search-btn:hover {
    background: var(--color-primary-dark);
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
}

.desktop-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
}

.desktop-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu-toggle,
.wishlist-toggle,
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-text);
    padding: 0.5rem;
}

.user-menu-toggle:hover,
.wishlist-toggle:hover,
.mobile-menu-toggle:hover {
    color: var(--color-primary);
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Sidebar - Hidden by default */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 10001;
    overflow-y: auto;
    display: none; /* Hidden on desktop */
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.mobile-nav a:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

/* Mobile Overlay - Hidden by default */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 10000;
}

.mobile-overlay.active {
    display: block;
}

/* Hide mobile search on desktop */
.mobile-search {
    display: none;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: var(--spacing-xxl) 0;
    background: var(--color-bg-light);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.hero-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/5;
    background: white;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-content {
    position: absolute;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-card h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

/* ===== CATEGORY SECTION ===== */
.category-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-dark);
    color: white;
}

.category-section h2 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    aspect-ratio: 1;
    object-fit: cover;
}

.category-card-content {
    padding: var(--spacing-sm);
    text-align: center;
}

.category-card h3 {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 600;
}

/* ===== PRODUCT CARDS ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--spacing-md);
}

.product-brand {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
}

/* ===== STAR RATING ===== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star {
    color: #ffc107;
    font-size: 1rem;
}

.star-empty {
    color: #e0e0e0;
}

/* ===== SECTIONS ===== */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-bg-dark);
    color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-bottom a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== ALERTS ===== */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--color-text-light);
    font-size: 1.25rem;
    line-height: 1;
    user-select: none;
}

/* ===== ALERTS (CONTINUED) ===== */

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .desktop-search {
        max-width: 300px;
    }
    
    .desktop-nav ul {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hide desktop navigation and search */
    .desktop-nav {
        display: none !important;
    }
    
    .desktop-search {
        display: none !important;
    }
    
    /* Show mobile menu elements */
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .mobile-sidebar {
        display: block !important;
    }
    
    .mobile-search {
        display: block !important;
    }
    
    /* Adjust header spacing */
    .header-content {
        gap: 1rem;
    }
    
    .site-logo {
        font-size: 1.25rem;
    }
    
    /* Hero and grids */
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .header-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .site-logo {
        font-size: 1.125rem;
    }
}