/* ============================================
   John Dabbs, Ltd. — Luxury Storefront Styles
   Supplements Tailwind CSS CDN
   ============================================ */

/* ---------- Custom Properties ---------- */

:root {
    --charcoal: #1E1A15;
    --charcoal-light: #2C2620;
    --charcoal-medium: #3A342D;
    --gold: #B8860B;
    --gold-hover: #C5941F;
    --gold-light: #D4B978;
    --gold-dark: #96700A;
    --gold-muted: #BFA76A;
    --cream: #FAF8F5;
    --cream-dark: #F3F0EB;
    --warm-white: #FDFCFA;
    --warm-gray: #5C534A;
    --warm-gray-light: #7A7168;
    --warm-border: #D6D0C8;
    --warm-border-light: #E8E3DC;
}

/* ---------- Base ---------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--charcoal);
    background-color: var(--warm-white);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
}

h1 {
    font-weight: 300;
    letter-spacing: 0.04em;
}

h2 {
    font-weight: 400;
    letter-spacing: 0.03em;
}

h3 {
    font-weight: 500;
    letter-spacing: 0.02em;
}

h4, h5, h6 {
    font-weight: 600;
    letter-spacing: 0.015em;
}

/* ---------- Transition Helpers ---------- */

.transition-fast {
    transition: all 0.15s ease;
}

.transition-base {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-transform-gpu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.transition-luxury {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Product Card ---------- */

.product-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s ease;
    will-change: transform, box-shadow;
    border-bottom: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(30, 26, 21, 0.08),
                0 6px 16px rgba(30, 26, 21, 0.04);
    border-bottom-color: var(--gold);
}

.product-card:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 26, 21, 0.06);
}

/* ---------- Collection Card ---------- */

.collection-card {
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.collection-card:hover {
    box-shadow: 0 12px 40px rgba(30, 26, 21, 0.1);
    border-color: var(--gold-light);
}

.collection-card .collection-overlay {
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collection-card:hover .collection-overlay {
    opacity: 1;
}

/* ---------- Image Zoom on Hover ---------- */

.image-zoom-container {
    overflow: hidden;
}

.image-zoom-container img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.image-zoom-container:hover img {
    transform: scale(1.06);
}

/* ---------- Skeleton Loading ---------- */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--cream) 25%,
        var(--cream-dark) 50%,
        var(--cream) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

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

.skeleton-text {
    height: 0.875rem;
    border-radius: 6px;
}

.skeleton-heading {
    height: 1.25rem;
    border-radius: 6px;
}

.skeleton-image {
    border-radius: 8px;
}

/* ---------- Mobile Menu ---------- */

#mobile-menu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.is-open {
    transform: translateX(0);
}

#mobile-menu-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ---------- Search Overlay ---------- */

.search-overlay {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
    pointer-events: none;
}

.search-overlay.is-open {
    max-height: 120px;
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Sticky Header Scroll Effect ---------- */

#site-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

#site-header.is-scrolled {
    box-shadow: 0 2px 20px rgba(30, 26, 21, 0.06),
                0 1px 6px rgba(30, 26, 21, 0.03);
}

/* ---------- Cart Badge ---------- */

.cart-badge {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.cart-badge.pulse {
    animation: cart-pulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cart-pulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    padding: 1rem 0;
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--warm-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--gold);
}

/* ---------- Announcement Bar ---------- */

#announcement-bar {
    transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease;
    max-height: 60px;
    overflow: hidden;
    background-color: var(--charcoal);
}

#announcement-bar.is-dismissed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-100%);
}

/* ---------- Back to Top Button ---------- */

#back-to-top {
    transition: opacity 0.3s ease,
                visibility 0.3s ease,
                transform 0.3s ease,
                background-color 0.2s ease;
    background-color: var(--charcoal);
}

#back-to-top:hover {
    background-color: var(--gold);
}

#back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- Luxury Scrollbar ---------- */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: 4px;
    border: 2px solid var(--cream);
}

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

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ---------- Button Styles ---------- */

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: var(--gold);
    color: var(--charcoal);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.btn-gold:hover {
    background-color: var(--gold-hover);
    border-color: var(--gold-hover);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.25);
    transform: translateY(-1px);
}

.btn-gold:active {
    transform: scale(0.98) translateY(0);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--gold);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.btn-outline:hover {
    background-color: var(--gold);
    color: var(--charcoal);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.2);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: scale(0.98) translateY(0);
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--gold-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--gold-light);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.btn-outline-light:hover {
    background-color: var(--gold-light);
    color: var(--charcoal);
    box-shadow: 0 4px 16px rgba(212, 185, 120, 0.2);
    transform: translateY(-1px);
}

.btn-charcoal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: var(--charcoal);
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--charcoal);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.btn-charcoal:hover {
    background-color: var(--charcoal-light);
    border-color: var(--charcoal-light);
    box-shadow: 0 4px 16px rgba(30, 26, 21, 0.3);
    transform: translateY(-1px);
}

.btn-charcoal:active {
    transform: scale(0.98) translateY(0);
}

/* Legacy button compat */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: var(--gold);
    color: var(--charcoal);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.25);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--charcoal);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--warm-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---------- Form Inputs ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15) !important;
    outline: none;
}

/* ---------- Sale Badge ---------- */

.sale-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #C9302C;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------- Loading Spinner ---------- */

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--warm-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ---------- Fade Animations ---------- */

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

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

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* ---------- Focus Styles ---------- */

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Line Clamp Fallback ---------- */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Mega Menu ---------- */

.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.mega-menu-trigger:hover .mega-menu,
.mega-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu a {
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mega-menu a:hover {
    color: var(--gold);
    padding-left: 0.25rem;
}

/* ---------- Gold Decorative Elements ---------- */

.gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.gold-line-left {
    height: 1px;
    background: linear-gradient(90deg, var(--gold-light), transparent);
}

.gold-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

/* ---------- Luxury Selection ---------- */

::selection {
    background-color: rgba(184, 134, 11, 0.15);
    color: var(--charcoal);
}

/* ---------- Utility Bar ---------- */

.utility-bar a {
    transition: color 0.2s ease;
}

.utility-bar a:hover {
    color: var(--gold);
}

/* ---------- Newsletter Input ---------- */

.newsletter-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--warm-gray);
    color: var(--cream);
    padding: 0.5rem 0;
    transition: border-color 0.3s ease;
}

.newsletter-input:focus {
    border-color: var(--gold) !important;
    box-shadow: none !important;
    outline: none;
}

.newsletter-input::placeholder {
    color: var(--warm-gray);
}

/* ---------- Footer Links ---------- */

.footer-link {
    color: var(--warm-gray-light);
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--gold-light);
}

/* ---------- Brand Logo Row ---------- */

.brand-logo {
    opacity: 0.5;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.brand-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}
