/* ===== CSS VARIABLES - Cosmic Dark Mode ===== */
:root {
    --color-bg-base: #030408;
    --color-bg-surface: #0f121a;
    --color-bg-glass: rgba(15, 18, 26, 0.65);
    --color-bg-glass-hover: rgba(25, 30, 45, 0.8);
    --color-text-main: #f0f2f5;
    --color-text-muted: #9aa0a6;
    --color-accent-gold: #D4AF37;
    --color-accent-gold-hover: #F3E5AB;
    --color-accent-blue: #4facfe;
    --color-border: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
    color: inherit;
}

/* ===== UTILITIES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-accent-gold);
    color: #000;
}

.btn-primary:hover {
    background: var(--color-accent-gold-hover);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    border: 1px solid var(--color-text-main);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-accent-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--color-bg-base);
    transition: all var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(3, 4, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-main);
}

.logo span {
    font-weight: 300;
    color: var(--color-accent-gold);
}

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

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    color: var(--color-text-muted);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-text-main);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sign-in-btn {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.sign-in-btn:hover { color: var(--color-text-main); }

.cart-btn, .search-btn {
    position: relative;
    color: var(--color-text-main);
    transition: transform var(--transition-fast);
}

.cart-btn:hover, .search-btn:hover {
    color: var(--color-accent-gold);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--color-accent-gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(3,4,8,0.3) 0%, rgba(3,4,8,0.9) 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
    animation: fadeInUp 1s ease forwards;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1.1;
    margin: 20px 0;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ===== PRODUCT SECTIONS ===== */
.product-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-text-main);
}

.view-all {
    color: var(--color-accent-gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.view-all:hover { opacity: 0.8; }

.product-loader {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-glow);
}

.product-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #000;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-bg-glass);
    backdrop-filter: blur(5px);
    color: var(--color-text-main);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
    border: 1px solid var(--color-border);
}

.product-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--color-text-main);
    line-height: 1.4;
    flex-grow: 1;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent-gold);
    margin-bottom: 20px;
}

.add-to-cart-btn {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    padding: 12px;
    color: var(--color-text-main);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
}

.add-to-cart-btn:hover {
    background: var(--color-text-main);
    color: var(--color-bg-base);
}

/* ===== FEATURE BANNER ===== */
.feature-banner {
    position: relative;
    padding: 120px 40px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 8, 0.6);
}

.glass-panel {
    position: relative;
    background: var(--color-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-card);
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    max-width: 600px;
    z-index: 2;
}

.glass-panel h3 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--color-accent-gold);
}

.glass-panel p {
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 30px;
}

/* ===== CART SIDEBAR ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100vw;
    height: 100vh;
    background: var(--color-bg-surface);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    transition: right var(--transition-smooth);
    border-left: 1px solid var(--color-border);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-base);
}

.cart-header h2 {
    font-weight: 400;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.close-btn {
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-text-muted);
}
.close-btn:hover { color: var(--color-accent-gold); }

.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-body::-webkit-scrollbar { width: 6px; }
.cart-body::-webkit-scrollbar-track { background: var(--color-bg-base); }
.cart-body::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.empty-cart-msg {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 40px;
    font-style: italic;
}

.cart-item {
    display: flex;
    gap: 15px;
    background: var(--color-bg-base);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-accent-gold);
}

.remove-item {
    font-size: 0.8rem;
    color: #ff4d4f;
    margin-top: 5px;
    text-decoration: underline;
    align-self: flex-start;
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-base);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tax-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--color-accent-gold);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}
.checkout-btn:not(:disabled):hover {
    background: var(--color-accent-gold-hover);
}

/* ===== OVERLAY ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

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

/* ===== FOOTER ===== */
.footer {
    background: #030408;
    border-top: 1px solid var(--color-border);
    padding: 80px 40px 20px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--color-text-main);
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-col .logo {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}
.brand-col .logo span { color: var(--color-accent-gold); }
.brand-col p { color: var(--color-text-muted); margin-bottom: 20px; max-width: 300px; }

.social-links { display: flex; gap: 15px; }
.social-links a {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.social-links a:hover {
    background: var(--color-text-main); color: #000; border-color: var(--color-text-main);
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a { color: var(--color-text-muted); }
.footer-col ul a:hover { color: var(--color-text-main); padding-left: 5px; }

.newsletter-col p { color: var(--color-text-muted); margin-bottom: 15px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    border-radius: 4px;
    font-family: inherit;
}
.newsletter-form input:focus { outline: none; border-color: var(--color-accent-gold); }
.form-feedback { font-size: 0.85rem; color: #4facfe; margin-top: 5px; }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.payment-icons { display: flex; gap: 10px; }
.pay-icon { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 0.75rem; }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-accent-gold);
    color: var(--color-text-main);
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: var(--shadow-glow);
    animation: slideInRight 0.3s forwards, fadeOut 0.3s 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .main-nav { display: none; /* simple mobile hide for now */ }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .cart-sidebar { width: 100%; right: -100%; }
}
