
/* Filter Sidebar & Shop Layout */
.shop-layout {
    display: flex;
    gap: 3rem;
    padding-bottom: 4rem;
}

.shop-sidebar {
    display: none;
    width: 250px;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .shop-sidebar {
        display: block;
    }
}

.shop-grid-container {
    flex: 1;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

@media (min-width: 1024px) {
    .filter-toggle-btn {
        display: none;
    }
}

.filter-toggle-btn:hover {
    border-color: var(--color-black);
}

.sort-select-wrapper {
    position: relative;
}

.sort-select {
    appearance: none;
    background-color: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding-right: 1.5rem;
    cursor: pointer;
    color: var(--color-gray-900);
}

.sort-select:focus {
    outline: none;
}

.sort-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

/* Filter Styles */
.filter-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-gray-100);
    padding-bottom: 2rem;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0;
    margin-bottom: 1rem;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
    color: var(--color-gray-600);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.filter-label:hover {
    color: var(--color-black);
}

.filter-label input[type="checkbox"] {
    accent-color: var(--color-black);
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Custom Filter Checkbox Polish */
.filter-checkbox {
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid var(--color-gray-300);
    border-radius: 0.375rem;
    display: grid;
    place-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-checkbox::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1rem 1rem var(--color-white);
    background-color: CanvasText;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.filter-checkbox:checked {
    background-color: var(--color-black);
    border-color: var(--color-black);
}

.filter-checkbox:checked::before {
    transform: scale(1);
}

.filter-checkbox:focus {
    outline: max(2px, 0.15em) solid var(--color-black);
    outline-offset: max(2px, 0.15em);
}

.filter-checkbox:hover {
    border-color: var(--color-black);
}

/* Sub-view Transitions and Headers */
.filter-sub-view .text-xl {
    letter-spacing: -0.025em;
    color: var(--color-gray-900);
}

.filter-sub-view .sticky {
    z-index: 10;
}

.filter-sub-view .brand-item:hover span {
    background-color: var(--color-gray-200);
    color: var(--color-black);
}

/* Price Range */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.price-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
}

.range-slider {
    width: 100%;
    accent-color: var(--color-black);
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.filter-size-btn {
    padding: 0.5rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-size-btn:hover {
    border-color: var(--color-gray-400);
}

.filter-size-btn.active {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* Color Grid */
.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid var(--color-gray-200);
    position: relative;
    transition: transform 0.2s ease;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    border: 1px solid var(--color-black);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.load-more-container {
    text-align: center;
    margin-top: 4rem;
}

/* Demo.html Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    padding-top: 60px; /* Reduced for mobile */
}

@media (min-width: 1024px) {
    body {
        padding-top: 80px;
    }
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Lexend Deca', sans-serif;
}

/* Typography Scales */
h1 { font-size: 2.25rem; line-height: 1.1; }
h2 { font-size: 1.875rem; line-height: 1.2; }
h3 { font-size: 1.5rem; line-height: 1.3; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.875rem; }
}

@media (min-width: 1024px) {
    h1 { font-size: 3.75rem; }
    h2 { font-size: 2.5rem; }
}

/* Smooth Transition for Search Overlay */
#search-overlay {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Hide Scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Breadcrumb */
.breadcrumb {
    min-height: 1.5rem;
}
.breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}
.breadcrumb__item {
    display: inline-flex;
    align-items: center;
}
.breadcrumb__item a {
    text-decoration: none;
}
.breadcrumb__item a:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.breadcrumb__separator {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Nav Link Hover Effect */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -4px;
    left: 0;
    background-color: #111827;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Cart Badge Pulse */
@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.cart-badge-anim {
    animation: pulse-subtle 2s infinite;
}

/* Accordion Transition */
.accordion-content {
    transition: max-height 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
}

/* Active Filter Button State */
.filter-btn-active {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Fade Out Animation for Removal */
.fade-out-remove {
    animation: fadeOut 0.5s forwards ease-in-out;
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.9); height: 0; margin: 0; padding: 0; }
}

/* 
  Custom Prose Styles for Heliora 
  Tailored to match the Lexend Deca / Inter typography system
*/
.prose-heliora {
    color: #374151; /* gray-700 for better aesthetic balance */
    line-height: 1.8;
}

.prose-heliora h1, 
.prose-heliora h2, 
.prose-heliora h3, 
.prose-heliora h4 {
    font-family: 'Lexend Deca', sans-serif;
    color: #000;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.prose-heliora h1 { font-size: 1.5rem; }
.prose-heliora h2 { font-size: 1.25rem; }
.prose-heliora h3 { font-size: 1.125rem; }
.prose-heliora h4 { font-size: 1rem; }

/* Refined for small contexts (like product description) */
.text-sm .prose-heliora { line-height: 1.6; }
.text-sm .prose-heliora h2 { font-size: 0.95rem; margin-top: 1rem; margin-bottom: 0.5rem; }
.text-sm .prose-heliora h3 { font-size: 0.875rem; margin-top: 0.75rem; margin-bottom: 0.4rem; }
.text-sm .prose-heliora p { font-size: 0.8125rem; margin-bottom: 0.75rem; }
.text-sm .prose-heliora ul li { font-size: 0.8125rem; margin-bottom: 0.4rem; }

.prose-heliora p {
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
}

/* Removed media query to keep consistent size */

.prose-heliora ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 2em;
}

.prose-heliora ul li {
    position: relative;
    padding-left: 1.75em;
    margin-bottom: 0.75em;
}

.prose-heliora ul li::before {
    content: "•";
    color: #000;
    font-weight: bold;
    position: absolute;
    left: 0.25em;
    font-size: 1.2em;
    line-height: 1.5;
}

.prose-heliora strong {
    color: #000;
    font-weight: 700;
}

.prose-heliora a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
    transition: color 0.2s;
}

.prose-heliora a:hover {
    color: #4B5563;
}

.prose-heliora blockquote {
    border-left: 4px solid #000;
    padding-left: 1.5rem;
    font-style: italic;
    color: #4B5563;
    margin: 2rem 0;
}

.prose-heliora img {
    border-radius: 0.75rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Brand Slider Animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 40s linear infinite;
    width: max-content;
}

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

/* Desktop Menu Visibility Fix */
.desktop-menu {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-menu {
        display: flex;
    }
}

/* Lucide Icon CLS Fix */
:where([data-lucide]) {
    display: inline-block;
}

/* Mega Menu - Desktop only (group scoped to zone so other nav items close it) */
.mega-menu-zone {
    position: relative;
}

.mega-menu-panel {
    /* Base top for h-20 (80px) with pt-4 (16px) bridge: 80 - 16 = 64px (top-16) */
    top: 4rem; 
    transition: top 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease, visibility 200ms ease;
}

/* When header is shrunk to h-16 (64px), we want content at 64px. 64 - 16 = 48px (top-12) */
#main-header.h-16 .mega-menu-panel {
    top: 3rem;
}

/* Transparent padding on trigger bridges gap to panel (pb-10 -mb-10) */
/* Prevent accidental close on move to panel */
.mega-menu-zone:hover .mega-menu-panel,
.mega-menu-zone.mega-open .mega-menu-panel {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0.05s;
}

/* Mobile Accordion */
.mobile-accordion-trigger {
    min-height: 44px;
    touch-action: manipulation;
}
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.mobile-accordion-content.is-open {
    max-height: 2000px;
}
.mobile-accordion-trigger[aria-expanded="true"] .accordion-chevron {
    transform: rotate(180deg);
}
