/* ════════════════════════════════════════════════
   CashewCraft — Premium Design System
   ════════════════════════════════════════════════ */

:root {
    --primary-amber: #D4A574;
    --primary-amber-light: #E8C49A;
    --primary-amber-dark: #B8864E;
    --secondary-espresso: #3C2415;
    --accent-cream: #F5F1EB;
    --accent-gold: #C9952A;
    --text-charcoal: #2C2C2C;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(212, 165, 116, 0.25);
    --shadow-glow: 0 0 40px rgba(212, 165, 116, 0.15);
    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #F5F1EB 0%, #E8DCC6 100%);
    color: var(--text-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ─────────────────────────────────── */
.font-display {
    font-family: 'Playfair Display', serif;
}

.font-accent {
    font-family: 'Crimson Text', serif;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-amber) 0%, var(--secondary-espresso) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Navigation ─────────────────────────────────── */
.glass-nav {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: rgba(245, 241, 235, 0.88);
    border-bottom: 1px solid rgba(212, 165, 116, 0.18);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.glass-nav.scrolled {
    background: rgba(245, 241, 235, 0.97);
    box-shadow: 0 4px 30px rgba(60, 36, 21, 0.08);
}

.nav-link {
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-amber);
    transition: width 0.3s var(--transition-smooth);
}

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

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #D46B0C, #C9952A);
    color: white;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s var(--transition-smooth),
        box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(201, 149, 42, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #E88020, #D4A040);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 149, 42, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:active {
    transform: translateY(0px) scale(0.97);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    transition: background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s var(--transition-smooth);
}

.btn-outline:hover {
    background: white;
    color: var(--accent-gold);
    border-color: white;
    transform: translateY(-2px);
}

/* ── Product Cards ────────────────────────────────── */
.product-card {
    transition: transform 0.4s var(--transition-smooth),
        box-shadow 0.4s ease;
    will-change: transform, box-shadow;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -10px rgba(60, 36, 21, 0.18),
        0 0 0 1px rgba(212, 165, 116, 0.2);
}

/* ── Category Cards ──────────────────────────────── */
.category-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--transition-smooth),
        box-shadow 0.4s ease;
    border: 1px solid rgba(212, 165, 116, 0.1);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.05), rgba(60, 36, 21, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -10px rgba(60, 36, 21, 0.15),
        0 0 0 1px rgba(212, 165, 116, 0.3);
}

.category-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FDE68A, #FCA34D);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 20px rgba(201, 149, 42, 0.25);
    transition: box-shadow 0.3s ease, transform 0.3s var(--transition-smooth);
}

.category-card:hover .category-icon-wrap {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 12px 30px rgba(201, 149, 42, 0.4);
}

/* ── Glassmorphism Card ───────────────────────────── */
.glass-card {
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 8px 32px rgba(60, 36, 21, 0.08);
}

/* ── Scroll Reveal ───────────────────────────────── */
.reveal-element {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--transition-smooth),
        transform 0.7s var(--transition-smooth);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.reveal-element:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-element:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-element:nth-child(4) {
    transition-delay: 0.3s;
}

/* ── Cart Badge Animation ─────────────────────────── */
.cart-badge {
    animation: cartPulse 2.5s ease-in-out infinite;
}

@keyframes cartPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.5);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 5px rgba(212, 165, 116, 0);
    }
}

/* ── Particle Background ─────────────────────────── */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.6), transparent);
    border-radius: 50%;
    animation: floatParticle ease-in-out infinite;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.2;
    }

    33% {
        transform: translateY(-30px) translateX(12px);
        opacity: 0.6;
    }

    66% {
        transform: translateY(-15px) translateX(-8px);
        opacity: 0.4;
    }
}

/* ── Skeleton Loaders ────────────────────────────── */
@keyframes shimmer {
    from {
        background-position: -600px 0;
    }

    to {
        background-position: 600px 0;
    }
}

.skeleton {
    background: #f0ebe3;
    background-image: linear-gradient(90deg, #f0ebe3 0%, #e8e0d4 30%, #f0ebe3 60%);
    background-repeat: no-repeat;
    background-size: 600px 100%;
    border-radius: 8px;
    animation: shimmer 1.4s ease-in-out infinite;
}

/* ── Splide Carousel ─────────────────────────────── */
.splide__slide img {
    border-radius: 14px;
    transition: transform 0.35s ease;
}

.splide__slide:hover img {
    transform: scale(1.04);
}

/* ── Notification System ─────────────────────────── */
#notification-container {
    perspective: 800px;
}

.notification-enter {
    transform: translateX(110%) rotateY(-15deg);
    opacity: 0;
}

.notification-active {
    transform: translateX(0) rotateY(0deg);
    opacity: 1;
    transition: all 0.45s var(--transition-smooth);
}

/* ── Form Inputs ─────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(212, 165, 116, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 15px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-amber);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.18);
    background: rgba(255, 255, 255, 0.95);
}

/* ── Stat Counters ───────────────────────────────── */
.stat-card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(212, 165, 116, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-amber), var(--accent-gold));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(60, 36, 21, 0.10);
}

/* ── Page Entry Animation ────────────────────────── */
.fade-in-up {
    animation: fadeInUp 0.6s var(--transition-smooth) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Modal ───────────────────────────────────────── */
#product-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#product-modal {
    transition: opacity 0.3s ease;
}

#modal-content {
    transition: transform 0.4s var(--transition-smooth);
    transform: scale(0.92);
}

#product-modal:not(.hidden) #modal-content {
    transform: scale(1);
}

/* ── Scrollbar Styling ───────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-amber);
}

/* ── Hero Overlay Animation ──────────────────────── */
.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 30%,
            rgba(212, 165, 116, 0.12) 0%,
            transparent 70%);
    pointer-events: none;
}

/* ── Scroll progress bar ─────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-amber), var(--accent-gold));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Utility ─────────────────────────────────────── */
button:active,
a:active {
    transform: scale(0.97) !important;
}