/* ============================================================
   Suwanda Perfumes — Custom Styles
   Extends Tailwind v4 CDN with brand-specific overrides
   ============================================================ */

/* ── CSS Variables (Design Tokens) ──────────────────────── */
:root {
    --accent: #C8A96E;
    --accent-dark: #B8953F;
    --accent-light: #F5EFE0;
    --gray-900: #111827;
    --gray-500: #6B7280;
    --gray-100: #F3F4F6;
    --danger: #EF4444;
    --success: #10B981;
}

/* ── Base ───────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Product Card ───────────────────────────────────────── */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.product-card .product-image {
    transition: transform 0.4s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}

/* ── Sale Badge ─────────────────────────────────────────── */
.sale-badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* ── Price Display ──────────────────────────────────────── */
.price-original {
    text-decoration: line-through;
    color: var(--gray-500);
    font-size: 0.85rem;
}
.price-sale {
    color: var(--danger);
    font-weight: 700;
}
.price-regular {
    color: var(--gray-900);
    font-weight: 700;
}

/* ── Cart Drawer ────────────────────────────────────────── */
.cart-drawer-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.cart-drawer-panel {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Slide Animations ───────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease forwards;
}

/* ── Stagger animation for product grids ────────────────── */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}
.stagger-item:nth-child(1)  { animation-delay: 0.05s; }
.stagger-item:nth-child(2)  { animation-delay: 0.1s; }
.stagger-item:nth-child(3)  { animation-delay: 0.15s; }
.stagger-item:nth-child(4)  { animation-delay: 0.2s; }
.stagger-item:nth-child(5)  { animation-delay: 0.25s; }
.stagger-item:nth-child(6)  { animation-delay: 0.3s; }
.stagger-item:nth-child(7)  { animation-delay: 0.35s; }
.stagger-item:nth-child(8)  { animation-delay: 0.4s; }
.stagger-item:nth-child(9)  { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }
.stagger-item:nth-child(11) { animation-delay: 0.55s; }
.stagger-item:nth-child(12) { animation-delay: 0.6s; }

/* ── Button Styles ──────────────────────────────────────── */
.btn-primary {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    border: 1.5px solid var(--gray-900);
    color: var(--gray-900);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
}
.btn-outline:hover {
    background-color: var(--gray-900);
    color: white;
}

/* ── Size Selector ──────────────────────────────────────── */
.size-option {
    border: 1.5px solid #E5E7EB;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}
.size-option:hover {
    border-color: var(--accent);
}
.size-option.active {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 700;
}

/* ── Fragrance Notes ────────────────────────────────────── */
.note-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.15rem;
}

/* ── Stock Indicator ────────────────────────────────────── */
.stock-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.stock-dot.in-stock    { background: var(--success); }
.stock-dot.low-stock   { background: #F59E0B; animation: pulse-soft 1.5s infinite; }
.stock-dot.out-of-stock { background: var(--danger); }

/* ── Mobile Menu ────────────────────────────────────────── */
.mobile-nav-overlay {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* ── Price Range Slider ─────────────────────────────────── */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #E5E7EB;
    border-radius: 999px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Quantity Input ─────────────────────────────────────── */
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}
.qty-btn:hover {
    background: var(--gray-100);
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ── Skeleton Loader ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

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

/* ── Toast Notification ─────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    min-width: 280px;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideUp 0.35s ease, fadeOut 0.3s ease 2.7s forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
