/* ==========================================================================
   Home Mattress Center - Custom Stylesheet
   Maintained in static/css/custom.css
   ========================================================================== */

/* Typography */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-serif-luxury {
    font-family: 'Playfair Display', serif;
}

.font-script {
    font-family: 'Alex Brush', cursive;
}

/* --------------------------------------------------------------------------
   Dynamic Header & Brand Logo Scaling on Scroll
   -------------------------------------------------------------------------- */
#mainHeader {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#headerInner {
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mainLogo {
    height: 3.75rem; /* ~60px on mobile */
    width: auto;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 640px) {
    #mainLogo {
        height: 5.75rem; /* ~92px on tablet */
    }
}

@media (min-width: 1024px) {
    #mainLogo {
        height: 6.75rem; /* ~108px on desktop: bigger logo filling vertical room without excessive header padding */
    }
}

/* Scrolled Compact State */
#mainHeader.is-scrolled {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

#mainHeader.is-scrolled #headerInner {
    padding-top: 0;
    padding-bottom: 0;
}

#mainHeader.is-scrolled #mainLogo {
    height: 4.25rem; /* ~68px on mobile when scrolled */
}

@media (min-width: 640px) {
    #mainHeader.is-scrolled #mainLogo {
        height: 5rem; /* ~80px on tablet when scrolled */
    }
}

@media (min-width: 1024px) {
    #mainHeader.is-scrolled #mainLogo {
        height: 5.5rem; /* ~88px on desktop when scrolled - significantly bigger with 0 padding */
    }
}

/* --------------------------------------------------------------------------
   Top Navbar Marquee Ticker
   -------------------------------------------------------------------------- */
@keyframes marqueeScroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    display: inline-flex;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Authorized Luxury Dealer - Infinite Continuous Auto-Slider
   -------------------------------------------------------------------------- */
@keyframes brandsSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-brands-slide {
    display: flex;
    width: max-content;
    animation: brandsSlide 28s linear infinite;
    will-change: transform;
}

.animate-brands-slide:hover {
    animation-play-state: paused;
}

@media (max-width: 640px) {
    .animate-brands-slide {
        animation-duration: 20s;
    }
}

/* --------------------------------------------------------------------------
   Smooth Fade Masks & Utilities
   -------------------------------------------------------------------------- */
.mask-fade-horizontal {
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation Bar
   -------------------------------------------------------------------------- */
#mobileBottomNav {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   Product Detail - Size Pills High-Contrast Active & Inactive Styling
   -------------------------------------------------------------------------- */
.size-pill.is-active {
    background-color: #0f172a !important; /* slate-900 */
    border-color: #0f172a !important;
    color: #ffffff !important;
}
.size-pill.is-active,
.size-pill.is-active span,
.size-pill.is-active .size-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}
.size-pill.is-active .size-price {
    color: #cbd5e1 !important; /* slate-300 */
    opacity: 0.9 !important;
}

.size-pill:not(.is-active) {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important; /* slate-200 */
    color: #0f172a !important;
}
.size-pill:not(.is-active):hover {
    border-color: #94a3b8 !important; /* slate-400 */
}
.size-pill:not(.is-active) .size-title {
    color: #0f172a !important;
    font-weight: 600 !important;
}
.size-pill:not(.is-active) .size-price {
    color: #64748b !important; /* slate-500 */
}

/* --------------------------------------------------------------------------
   Storefront Rich Text Content (from Mattress Admin Text Editor)
   -------------------------------------------------------------------------- */
.rich-text-content {
    line-height: 1.7;
    color: #334155;
}

.rich-text-content p {
    margin-bottom: 0.875rem;
}

.rich-text-content p:last-child {
    margin-bottom: 0;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
    line-height: 1.3;
}

.rich-text-content h1 { font-size: 1.5rem; }
.rich-text-content h2 { font-size: 1.25rem; }
.rich-text-content h3 { font-size: 1.125rem; }
.rich-text-content h4 { font-size: 1rem; }

.rich-text-content ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin-bottom: 0.875rem;
    color: #475569;
}

.rich-text-content ol {
    list-style-type: decimal;
    padding-left: 1.25rem;
    margin-bottom: 0.875rem;
    color: #475569;
}

.rich-text-content li {
    margin-bottom: 0.375rem;
}

.rich-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

.rich-text-content th {
    padding: 0.75rem 0.875rem;
    font-weight: 700;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.rich-text-content td {
    padding: 0.75rem 0.875rem;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.rich-text-content tr:nth-child(even) td {
    background-color: #fcfdfe;
}

.rich-text-content a {
    color: #0284c7;
    text-decoration: underline;
}

.rich-text-content a:hover {
    color: #0369a1;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 700;
    color: #0f172a;
}

/* --------------------------------------------------------------------------
   Sleek Custom Scrollbar for Sticky Sidebar & Long Lists
   -------------------------------------------------------------------------- */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}




