/**
 * RM Perfumeria Design System
 * Luxury Gold & Black Theme
 * Version: 1.0
 */

/* =============================================================================
   CSS VARIABLES - Design Tokens
   ============================================================================= */

:root {
    /* Background Colors */
    --rm-bg-primary: #000000;
    --rm-bg-secondary: #0a0a0a;
    --rm-bg-tertiary: #111111;
    --rm-bg-elevated: #161616;
    --rm-bg-card: rgba(255, 255, 255, 0.02);

    /* Gold Palette */
    --rm-gold-bright: #F9D976;
    --rm-gold-base: #D4AF37;
    --rm-gold-dark: #8A6D3B;
    --rm-gold-muted: rgba(212, 175, 55, 0.6);

    /* Gradients */
    --rm-gold-gradient: linear-gradient(135deg, #F9D976 0%, #D4AF37 50%, #8A6D3B 100%);
    --rm-gold-gradient-soft: linear-gradient(135deg, rgba(249, 217, 118, 0.15) 0%, rgba(212, 175, 55, 0.1) 100%);
    --rm-gold-text-gradient: linear-gradient(180deg, #F9D976 0%, #D4AF37 100%);
    --rm-shimmer: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);

    /* Text Colors */
    --rm-text-primary: #FFFFFF;
    --rm-text-secondary: rgba(255, 255, 255, 0.9);
    --rm-text-muted: rgba(255, 255, 255, 0.7);
    --rm-text-subtle: rgba(255, 255, 255, 0.5);

    /* Borders */
    --rm-border: rgba(255, 255, 255, 0.08);
    --rm-border-strong: rgba(255, 255, 255, 0.15);
    --rm-border-gold: rgba(212, 175, 55, 0.3);
    --rm-border-gold-strong: rgba(212, 175, 55, 0.5);

    /* Status Colors */
    --rm-success: #10b981;
    --rm-warning: #f59e0b;
    --rm-error: #ef4444;
    --rm-info: #3b82f6;

    /* Typography Scale (clamp for fluid sizing) */
    --rm-font-xs: clamp(0.75rem, 1.5vw, 0.8125rem);
    --rm-font-sm: clamp(0.8125rem, 2vw, 0.9375rem);
    --rm-font-base: clamp(0.9375rem, 2.2vw, 1.0625rem);
    --rm-font-lg: clamp(1.125rem, 2.5vw, 1.3125rem);
    --rm-font-xl: clamp(1.5rem, 4vw, 2rem);
    --rm-font-2xl: clamp(2rem, 5vw, 2.75rem);
    --rm-font-3xl: clamp(2.5rem, 6vw, 3.5rem);

    /* Font Families - Softer, friendlier feel */
    --rm-font-heading: 'Playfair Display', Georgia, serif;
    --rm-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing Scale */
    --rm-space-xs: 4px;
    --rm-space-sm: 8px;
    --rm-space-md: 16px;
    --rm-space-lg: 24px;
    --rm-space-xl: 32px;
    --rm-space-2xl: 48px;
    --rm-space-3xl: 64px;

    /* Border Radius */
    --rm-radius-sm: 6px;
    --rm-radius-md: 10px;
    --rm-radius-lg: 16px;
    --rm-radius-xl: 24px;
    --rm-radius-full: 9999px;

    /* Shadows */
    --rm-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --rm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --rm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --rm-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --rm-shadow-gold: 0 8px 24px rgba(212, 175, 55, 0.3);

    /* Transitions */
    --rm-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --rm-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --rm-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --rm-duration-fast: 150ms;
    --rm-duration-normal: 250ms;
    --rm-duration-slow: 350ms;

    /* Z-Index Scale */
    --rm-z-base: 1;
    --rm-z-dropdown: 100;
    --rm-z-sticky: 200;
    --rm-z-modal: 300;
    --rm-z-toast: 400;
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* NOTE: Removed global * transition - performance trap!
   Transitions are applied explicitly to interactive elements only */

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--rm-font-body);
    font-size: var(--rm-font-base);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--rm-text-primary);
    background-color: var(--rm-bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

/* Page fade-in animation */
body {
    animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page transition class */
body.transitioning {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rm-font-heading);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--rm-text-primary);
}

h1 { font-size: var(--rm-font-3xl); }
h2 { font-size: var(--rm-font-2xl); }
h3 { font-size: var(--rm-font-xl); }
h4 { font-size: var(--rm-font-lg); }
h5 { font-size: var(--rm-font-base); }
h6 { font-size: var(--rm-font-sm); }

p {
    margin-bottom: var(--rm-space-md);
    color: var(--rm-text-secondary);
}

a {
    color: var(--rm-gold-base);
    text-decoration: none;
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

a:hover {
    color: var(--rm-gold-bright);
}

/* Gold gradient text */
.text-gold {
    background: var(--rm-gold-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--rm-space-md);
}

.container-wide {
    max-width: 1440px;
}

.container-narrow {
    max-width: 800px;
}

.section {
    padding: var(--rm-space-3xl) 0;
}

.section-sm {
    padding: var(--rm-space-2xl) 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--rm-space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Product Grid - Responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--rm-space-lg);
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--rm-space-xs); }
.gap-sm { gap: var(--rm-space-sm); }
.gap-md { gap: var(--rm-space-md); }
.gap-lg { gap: var(--rm-space-lg); }
.gap-xl { gap: var(--rm-space-xl); }

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rm-space-sm);
    padding: 12px 24px;
    font-family: var(--rm-font-body);
    font-size: var(--rm-font-sm);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: var(--rm-radius-sm);
    cursor: pointer;
    transition: all var(--rm-duration-normal) var(--rm-ease);
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

/* Primary Button - Gold Gradient */
.btn-primary {
    background: var(--rm-gold-gradient);
    color: #000000;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--rm-shadow-gold);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Secondary Button - Ghost */
.btn-secondary {
    background: transparent;
    color: var(--rm-gold-base);
    border: 1px solid var(--rm-gold-base);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--rm-gold-bright);
    color: var(--rm-gold-bright);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--rm-text-secondary);
    border: 1px solid var(--rm-border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--rm-border-strong);
    color: var(--rm-text-primary);
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: var(--rm-font-xs);
    min-height: 36px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--rm-font-base);
    min-height: 52px;
}

.btn-block {
    width: 100%;
}

/* Button States */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State - maintains button width, prevents layout shift */
.btn.loading {
    color: transparent;
    pointer-events: none;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -9px;  /* Half of width */
    margin-top: -9px;   /* Half of height */
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-primary.loading::after {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: #000;
}

.btn-secondary.loading::after,
.btn-ghost.loading::after {
    border-color: rgba(212, 175, 55, 0.2);
    border-top-color: var(--rm-gold-base);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success State */
.btn.success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--rm-bg-card);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-lg);
    overflow: hidden;
    transition: transform var(--rm-duration-slow) var(--rm-ease),
                box-shadow var(--rm-duration-slow) var(--rm-ease),
                border-color var(--rm-duration-normal) var(--rm-ease);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--rm-shadow-lg);
    border-color: var(--rm-border-strong);
}

.card-body {
    padding: var(--rm-space-md);
}

/* =============================================================================
   PRODUCT CARD - Modern Light Design
   ============================================================================= */

.product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--rm-radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.product-card__image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(145deg, #0d0d0d 0%, #1a1a1a 100%);
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.03);
}

/* Hover Details Overlay */
.product-card__hover-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    padding: 40px 12px 12px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card:hover .product-card__hover-details {
    transform: translateY(0);
    opacity: 1;
}

.product-card__hover-details span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card__hover-details span::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--rm-gold-base);
    border-radius: 50%;
}

.product-card__hover-label {
    color: var(--rm-gold-base) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.6rem !important;
}

.product-card__hover-label::before {
    display: none !important;
}

/* Badges on image */
.product-card__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
}

.product-card__badges-left,
.product-card__badges-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card__badge {
    padding: 4px 8px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.product-card__badge--sale {
    background: var(--rm-gold-gradient);
    color: #000;
}

.product-card__badge--sold-out {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Size/Concentration badge on image */
.product-card__size-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card__size-badge span {
    opacity: 0.5;
}

/* Card Body */
.product-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-card__brand {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rm-gold-base);
    opacity: 0.9;
}

.product-card__name {
    font-family: var(--rm-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__name a {
    color: inherit;
    text-decoration: none;
}

.product-card__name a:hover {
    color: var(--rm-gold-bright);
}

/* Price */
.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.product-card__price-current {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.product-card__price-original {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: line-through;
}

/* Add to Cart Button */
.product-card__actions {
    padding: 0 12px 12px;
}

.product-card__quick-add {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    color: var(--rm-gold-base);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-card__quick-add svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.product-card__quick-add:hover {
    background: var(--rm-gold-gradient);
    color: #000;
    border-color: transparent;
}

.product-card__quick-add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.product-card__quick-add:disabled:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
}

/* Loading State */
.product-card__quick-add.loading {
    pointer-events: none;
    color: transparent;
    position: relative;
}

.product-card__quick-add.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--rm-gold-base);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .product-card__body {
        padding: 10px;
    }

    .product-card__brand {
        font-size: 0.55rem;
    }

    .product-card__name {
        font-size: 0.8rem;
    }

    .product-card__price-current {
        font-size: 0.9rem;
    }

    .product-card__actions {
        padding: 0 10px 10px;
    }

    .product-card__quick-add {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .product-card__size-badge {
        font-size: 0.55rem;
        padding: 3px 8px;
    }

    .product-card__badge {
        font-size: 0.5rem;
        padding: 3px 6px;
    }
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--rm-space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--rm-space-sm);
    font-size: var(--rm-font-sm);
    font-weight: 500;
    color: var(--rm-text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--rm-font-body);
    font-size: var(--rm-font-base);
    color: var(--rm-text-primary);
    background: var(--rm-bg-tertiary);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-sm);
    transition: border-color var(--rm-duration-fast) var(--rm-ease),
                box-shadow var(--rm-duration-fast) var(--rm-ease);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--rm-gold-base);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Accessible focus-visible states */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
    outline: 2px solid var(--rm-gold-bright);
    outline-offset: 2px;
}

.form-input::placeholder {
    color: var(--rm-text-subtle);
}

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

.form-error {
    margin-top: var(--rm-space-xs);
    font-size: var(--rm-font-xs);
    color: var(--rm-error);
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: var(--rm-z-sticky);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rm-border);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 var(--rm-space-lg);
    max-width: 1440px;
    margin: 0 auto;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: var(--rm-space-sm);
    text-decoration: none;
}

.navbar-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.navbar-logo-text {
    font-family: var(--rm-font-heading);
    font-size: var(--rm-font-xl);
    font-weight: 600;
    background: var(--rm-gold-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--rm-space-xl);
    list-style: none;
}

.navbar-link {
    font-size: var(--rm-font-sm);
    font-weight: 500;
    color: var(--rm-text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--rm-duration-fast) var(--rm-ease);
    position: relative;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rm-gold-base);
    transition: width var(--rm-duration-normal) var(--rm-ease);
}

.navbar-link:hover {
    color: var(--rm-gold-base);
}

.navbar-link:hover::after {
    width: 100%;
}

.navbar-link.active {
    color: var(--rm-gold-base);
}

.navbar-link.active::after {
    width: 100%;
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--rm-space-xs);
}

.navbar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--rm-text-secondary);
    cursor: pointer;
    transition: color var(--rm-duration-fast) var(--rm-ease);
    text-decoration: none;
}

.navbar-action-btn:hover {
    color: var(--rm-gold-base);
}

/* Cart Icon */
.navbar-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--rm-text-secondary);
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.navbar-cart:hover {
    color: var(--rm-gold-base);
}

.navbar-cart__count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #000;
    background: var(--rm-gold-base);
    border-radius: var(--rm-radius-full);
}

.navbar-cart__count.bounce {
    animation: cartBounce 0.3s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* =============================================================================
   SEARCH OVERLAY
   ============================================================================= */

.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rm-bg-secondary);
    border-bottom: 1px solid var(--rm-border);
    padding: var(--rm-space-lg);
    z-index: 100;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: var(--rm-space-sm);
}

.search-input {
    flex: 1;
    padding: var(--rm-space-md) var(--rm-space-lg);
    background: var(--rm-bg-tertiary);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-md);
    color: var(--rm-text-primary);
    font-size: var(--rm-font-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--rm-gold-base);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.search-input::placeholder {
    color: var(--rm-text-muted);
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--rm-gold-gradient);
    border: none;
    border-radius: var(--rm-radius-md);
    color: var(--rm-bg-primary);
    cursor: pointer;
    transition: transform var(--rm-duration-fast) var(--rm-ease);
}

.search-submit:hover {
    transform: scale(1.05);
}

/* =============================================================================
   MOBILE NAVIGATION
   ============================================================================= */

.mobile-menu-btn {
    display: none;
}

.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rm-bg-secondary);
    border-bottom: 1px solid var(--rm-border);
    padding: var(--rm-space-lg) 0;
    z-index: 99;
}

.nav-mobile-link {
    display: block;
    padding: var(--rm-space-md) var(--rm-space-xl);
    color: var(--rm-text-secondary);
    text-decoration: none;
    font-size: var(--rm-font-base);
    font-weight: 500;
    transition: all var(--rm-duration-fast) var(--rm-ease);
    border-left: 3px solid transparent;
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
    color: var(--rm-gold-base);
    background: rgba(212, 175, 55, 0.05);
    border-left-color: var(--rm-gold-base);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .navbar-nav {
        display: none;
    }

    .nav-mobile {
        display: flex;
        flex-direction: column;
    }

    .navbar-logo-text {
        font-size: var(--rm-font-lg);
    }

    .navbar-logo-img {
        height: 40px;
    }
}

/* =============================================================================
   CART SIDEBAR
   ============================================================================= */

.cart-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--rm-bg-secondary);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--rm-space-lg) var(--rm-space-xl);
    border-bottom: 1px solid var(--rm-border);
}

.cart-sidebar-title {
    font-family: var(--rm-font-heading);
    font-size: var(--rm-font-lg);
    font-weight: 600;
    color: var(--rm-text-primary);
    margin: 0;
}

.cart-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--rm-text-muted);
    cursor: pointer;
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.cart-sidebar-close:hover {
    color: var(--rm-text-primary);
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--rm-space-lg);
}

.cart-sidebar-footer {
    padding: var(--rm-space-lg) var(--rm-space-xl);
    border-top: 1px solid var(--rm-border);
    background: var(--rm-bg-tertiary);
}

/* Empty Cart */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--rm-space-3xl) var(--rm-space-lg);
    gap: var(--rm-space-md);
}

.cart-empty-icon {
    color: var(--rm-text-muted);
    opacity: 0.5;
}

.cart-empty-text {
    color: var(--rm-text-muted);
    font-size: var(--rm-font-base);
    margin: 0;
}

/* Cart Items */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: var(--rm-space-md);
}

.cart-item {
    display: flex;
    gap: var(--rm-space-md);
    padding: var(--rm-space-md);
    background: var(--rm-bg-tertiary);
    border-radius: var(--rm-radius-md);
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--rm-radius-sm);
    background: var(--rm-bg-primary);
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--rm-space-xs);
}

.cart-item-name {
    font-size: var(--rm-font-sm);
    font-weight: 600;
    color: var(--rm-text-primary);
    margin: 0;
    line-height: 1.3;
}

.cart-item-brand {
    font-size: var(--rm-font-xs);
    color: var(--rm-text-muted);
    margin: 0;
}

.cart-item-details {
    font-size: var(--rm-font-xs);
    color: var(--rm-text-secondary);
    margin: 2px 0 0 0;
}

.cart-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-item-price {
    font-size: var(--rm-font-sm);
    font-weight: 600;
    color: var(--rm-gold-base);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--rm-space-xs);
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--rm-bg-secondary);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-sm);
    color: var(--rm-text-secondary);
    font-size: var(--rm-font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rm-duration-fast) var(--rm-ease);
}

.qty-btn:hover {
    border-color: var(--rm-gold-base);
    color: var(--rm-gold-base);
}

.cart-item-remove {
    position: absolute;
    top: var(--rm-space-sm);
    right: var(--rm-space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--rm-text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all var(--rm-duration-fast) var(--rm-ease);
}

.cart-item:hover .cart-item-remove {
    opacity: 1;
}

.cart-item-remove:hover {
    color: #ef4444;
}

/* Cart Totals */
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--rm-space-md) 0;
    margin-bottom: var(--rm-space-md);
    border-bottom: 1px solid var(--rm-border);
}

.cart-subtotal span:first-child {
    font-size: var(--rm-font-sm);
    color: var(--rm-text-secondary);
}

.cart-subtotal-amount {
    font-size: var(--rm-font-lg);
    font-weight: 700;
    color: var(--rm-gold-base);
}

/* Button block variant */
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: var(--rm-space-sm);
}

.btn-block:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: var(--rm-space-2xl);
}

.hero-title {
    font-size: var(--rm-font-3xl);
    font-weight: 400;
    margin-bottom: var(--rm-space-lg);
}

.hero-subtitle {
    font-size: var(--rm-font-lg);
    color: var(--rm-text-secondary);
    margin-bottom: var(--rm-space-xl);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    background: var(--rm-bg-secondary);
    border-top: 1px solid var(--rm-border);
    padding: var(--rm-space-3xl) 0 var(--rm-space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--rm-space-2xl);
}

.footer-brand-section {
    text-align: center;
}

.footer-logo {
    display: inline-block;
    text-decoration: none;
    margin-bottom: var(--rm-space-sm);
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--rm-gold-base);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: transform var(--rm-duration-normal) var(--rm-ease);
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.05);
}

.footer-logo-text {
    display: block;
    font-family: var(--rm-font-heading);
    font-size: var(--rm-font-xl);
    font-weight: 600;
    margin-bottom: var(--rm-space-md);
    text-decoration: none;
    background: var(--rm-gold-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--rm-text-muted);
    font-size: var(--rm-font-sm);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto var(--rm-space-lg);
}

.footer-heading {
    font-size: var(--rm-font-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rm-gold-base);
    margin-bottom: var(--rm-space-md);
}

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

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

.footer-links a {
    color: var(--rm-text-muted);
    font-size: var(--rm-font-sm);
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.footer-links a:hover {
    color: var(--rm-gold-bright);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--rm-space-sm);
    margin-top: var(--rm-space-lg);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-md);
    color: var(--rm-text-muted);
    transition: all var(--rm-duration-normal) var(--rm-ease);
}

.footer-social-link:hover {
    background: var(--rm-gold-gradient);
    border-color: transparent;
    color: #000;
    transform: translateY(-2px);
}

.footer-payment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rm-space-md);
    margin-top: var(--rm-space-2xl);
    padding-top: var(--rm-space-lg);
    border-top: 1px solid var(--rm-border);
}

.footer-payment-label {
    font-size: var(--rm-font-xs);
    color: var(--rm-text-muted);
}

.footer-payment-icons {
    display: flex;
    gap: var(--rm-space-sm);
}

.payment-icon {
    width: 42px;
    height: 26px;
    border-radius: 4px;
}

.footer-bottom {
    margin-top: var(--rm-space-lg);
    padding-top: var(--rm-space-lg);
    border-top: 1px solid var(--rm-border);
    text-align: center;
    color: var(--rm-text-subtle);
    font-size: var(--rm-font-xs);
}

.footer-powered {
    margin-top: var(--rm-space-xs);
}

.footer-powered a {
    color: var(--rm-gold-base);
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

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

/* Spacing */
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Divider */
.divider {
    height: 1px;
    background: var(--rm-border);
    margin: var(--rm-space-xl) 0;
}

.divider-gold {
    background: linear-gradient(90deg, transparent, var(--rm-gold-base), transparent);
}

/* Skeleton Loading */
.skeleton {
    background: var(--rm-shimmer);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--rm-radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lazy Image */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Tablet */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar-nav {
        gap: var(--rm-space-lg);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --rm-space-3xl: 48px;
    }

    .section {
        padding: var(--rm-space-2xl) 0;
    }

    .hero {
        min-height: 60vh;
    }

    .hero-content {
        padding: var(--rm-space-lg);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--rm-space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--rm-space-xl);
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        text-align: center;
    }

    /* Hide desktop nav, show mobile */
    .navbar-nav {
        display: none;
    }

    .navbar-menu-btn {
        display: flex;
    }
}

/* =============================================================================
   MOBILE NAVIGATION DRAWER
   ============================================================================= */

.navbar-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--rm-text-secondary);
    cursor: pointer;
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.navbar-menu-btn:hover {
    color: var(--rm-gold-base);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: var(--rm-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--rm-duration-normal) var(--rm-ease),
                visibility var(--rm-duration-normal) var(--rm-ease);
}

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

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: var(--rm-bg-secondary);
    border-left: 1px solid var(--rm-border);
    z-index: calc(var(--rm-z-modal) + 1);
    transform: translateX(100%);
    transition: transform var(--rm-duration-slow) var(--rm-ease);
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--rm-space-lg);
    border-bottom: 1px solid var(--rm-border);
}

.mobile-nav__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--rm-text-secondary);
    cursor: pointer;
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.mobile-nav__close:hover {
    color: var(--rm-gold-base);
}

.mobile-nav__links {
    flex: 1;
    padding: var(--rm-space-lg);
    overflow-y: auto;
}

.mobile-nav__link {
    display: block;
    padding: var(--rm-space-md) 0;
    font-size: var(--rm-font-lg);
    font-weight: 500;
    color: var(--rm-text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--rm-border);
    transition: color var(--rm-duration-fast) var(--rm-ease);
}

.mobile-nav__link:hover,
.mobile-nav__link.active {
    color: var(--rm-gold-base);
}

/* Small Mobile */
@media (max-width: 375px) {
    .product-grid {
        gap: var(--rm-space-sm);
    }

    .product-card__body {
        padding: 10px; /* Never 0px! */
    }

    .product-card__name {
        font-size: 0.875rem;
    }

    .btn {
        padding: 10px 16px;
        min-height: 40px;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .navbar,
    .footer,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* =============================================================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   ACCESSIBILITY - SKIP LINK
   ============================================================================= */

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--rm-space-md);
    z-index: 9999;
    padding: var(--rm-space-sm) var(--rm-space-md);
    background: var(--rm-gold-base);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--rm-radius-sm);
    transition: top var(--rm-duration-fast) var(--rm-ease);
}

.skip-link:focus {
    top: var(--rm-space-md);
}

/* =============================================================================
   ACCESSIBILITY - FOCUS STATES
   ============================================================================= */

/* Generic focus-visible for interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--rm-gold-bright);
    outline-offset: 2px;
}

/* Remove default outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}
