/**
 * Avinya Creations - Handmade Crochet Boutique Theme
 * Design System Specifications
 */

/* Screen-Reader Only: Visually hidden but accessible to search engines & assistive tech */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-walnut: #8B5E3C;
    --hover-walnut: #6E462A;
    --linen-cream: #FFF8F0;
    --accent-terracotta: #C97B63;
    --sage-green: #8FA68E;
    --warm-white: #FDFBF8;
    --ivory-card: #FFFDF9;
    --charcoal-heading: #2E2E2E;
    --soft-gray-p: #6B6B6B;
    --soft-beige-border: #E8DED3;
    --danger-red: #C75B5B;
    --gold-bestseller: #D4A017;
    --rose-limited: #B76E79;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--warm-white);
    color: var(--charcoal-heading);
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Playfair Display', serif;
}

/* Global Single-Line Text & Button Wrappers */
.btn-nowrap, .btn-primary-walnut, .btn-secondary-walnut, button, .badge-nowrap {
    white-space: nowrap !important;
}

/* Primary Button */
.btn-primary-walnut {
    background-color: var(--primary-walnut) !important;
    color: #FFFFFF !important;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 4px 14px rgba(139, 94, 60, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
}

.btn-primary-walnut:hover {
    background-color: var(--hover-walnut) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 70, 42, 0.3);
}

/* Secondary Button */
.btn-secondary-walnut {
    background-color: #FFFFFF !important;
    color: var(--primary-walnut) !important;
    border: 2px solid var(--primary-walnut) !important;
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    border-radius: 9999px;
    transition: all 0.25s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
}

.btn-secondary-walnut:hover {
    background-color: var(--linen-cream) !important;
    transform: translateY(-2px);
}

/* Product Card Hover Effect */
.product-card-boutique {
    background-color: var(--ivory-card);
    border: 1px solid var(--soft-beige-border);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-boutique:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(139, 94, 60, 0.1);
}

/* Category Card Pastels */
.cat-pastel-flowers { background-color: #FFE5D9; }
.cat-pastel-bags { background-color: #F4E3D7; }
.cat-pastel-keychains { background-color: #FFF3E6; }
.cat-pastel-decor { background-color: #F6EFE7; }
.cat-pastel-baby { background-color: #FFF6EB; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFF8F0;
}

::-webkit-scrollbar-thumb {
    background: #C97B63;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B5E3C;
}

/* ─── Mobile Navigation Drawer ─────────────────────────────────────────────── */
/* Hidden by default — only shown on mobile (<1024px) when JS adds .is-open.    */
.mobile-nav-drawer {
    display: none !important;
    pointer-events: none;
    visibility: hidden;
}

@media (max-width: 1023px) {
    .mobile-nav-drawer.is-open {
        display: flex !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }
}

/* Force hide on desktop view (1024px and above) */
@media (min-width: 1024px) {
    .mobile-nav-drawer,
    .mobile-nav-drawer.is-open,
    #mobileNavDrawer {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Slide panel slides in from the left */
.mobile-nav-panel {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.is-open .mobile-nav-panel {
    transform: translateX(0);
}

/* Body scroll lock when menu is open */
body.overflow-hidden {
    overflow: hidden !important;
}

/* Dark mode product card */
.dark .product-card-boutique {
    background-color: #27272a;
    border-color: #3f3f46;
}

/* Focus ring accessibility */
:focus-visible {
    outline: 2px solid #8B5E3C;
    outline-offset: 2px;
}

/* Touch target minimum size (accessibility) */
button, a {
    min-height: 44px;
}

nav a, header a.logo, .btn-sm {
    min-height: unset;
}

/* Mobile-Specific Responsive Enhancements */
@media (max-width: 640px) {
    .container, .max-w-md, .max-w-xl, .max-w-2xl, .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Prevent mobile zoom on iOS when focusing inputs */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Clean spacing for small mobile screens */
    .mobile-px-tight {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}