/* ============================================================
   1. FONTS & GLOBALS
   ============================================================ */
@font-face { font-family: 'Avenir'; src: url('https://darkorange-sandpiper-741171.hostingersite.com/wp-content/uploads/2025/11/Avenir-Roman.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Avenir'; src: url('https://darkorange-sandpiper-741171.hostingersite.com/wp-content/uploads/2025/11/Avenir-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Avenir'; src: url('https://darkorange-sandpiper-741171.hostingersite.com/wp-content/uploads/2025/11/Avenir-Heavy.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Avenir'; src: url('https://darkorange-sandpiper-741171.hostingersite.com/wp-content/uploads/2025/11/Avenir-Heavy.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root { --tb-font: 'Avenir', sans-serif !important; --tb-black: #000000; --tb-grey: #e0e0e0; --tb-border: #e5e5e5; }
.tb-toolbar, .tb-drawer, .tb-product-card, .tb-filter-head, .tb-custom-check-label, .tb-filter-swatch-label, .tb-qa-title, .tb-qa-price, .tb-card-title, .price, .tb-filter-content label, .tb-qa-footer-btn, .tb-breadcrumbs, .tb-page-title { font-family: var(--tb-font); }

/* --- HIDE DEFAULT THEME ELEMENTS --- */
.hero-section, .ct-header-title { display: none !important; } 
.woocommerce-loop-product__title { display: none !important; }
.tb-product-card .price:not(.tb-card-row-2 .price) { display: none !important; } 
.price { display: none !important; } 
.tb-card-row-2 .price { display: block !important; font-size: 14px !important; color: #000 !important; font-family: var(--tb-font) !important; font-weight: 500 !important; margin: 0; padding: 0; line-height: 24px; }


/* ============================================================
   2. HEADER & BREADCRUMBS
   ============================================================ */
.tb-category-header { width: 100%; margin-bottom: 30px; padding-top: 20px; }
.tb-breadcrumbs { font-size: 13px; color: #000; text-transform: capitalize; margin-bottom: 25px; letter-spacing: 0.02em; }
.tb-breadcrumbs a { color: #000; text-decoration: none; transition: color 0.2s ease; }
.tb-breadcrumbs a:hover { color: #999; }
.tb-header-row { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; }
.tb-page-title { font-size: 16px !important; font-weight: 400 !important; text-transform: uppercase !important; margin: 0 !important; line-height: 1 !important; color: #000 !important; letter-spacing: 0.05em !important; }


/* ============================================================
   3. TOOLBAR (Corrected Z-Index & Dropdown)
   ============================================================ */
.tb-toolbar { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 30px; 
    font-family: var(--tb-font); 
    position: relative; 
    width: auto !important; 
    padding: 0 !important; 
    z-index: 50 !important; /* Critical for dropdown visibility */
    overflow: visible !important;
}

.tb-tools-group { display: flex; align-items: center; gap: 15px; overflow: visible !important; }

/* Grid Buttons */
.tb-grid-switch { display: flex; gap: 8px; align-items: center; }
.tb-grid-btn { height: 14px; border: 0; padding: 0; cursor: pointer; background: transparent; position: relative; color: var(--tb-grey); transition: color 0.2s ease; }
.tb-grid-btn.is-active { color: var(--tb-black) !important; }
.tb-grid-btn::before { content: ""; position: absolute; top: 0; left: 0; width: 2px; height: 100%; background: currentColor; box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor, 12px 0 0 currentColor; }
.tb-grid-4 { width: 14px; }
.tb-grid-3 { width: 10px; } .tb-grid-3::before { width: 2px; box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor; }
.tb-grid-2 { width: 6px; } .tb-grid-2::before { width: 2px; box-shadow: 4px 0 0 currentColor; }
.tb-grid-1 { width: 6px; } .tb-grid-1::before { width: 6px; }
.tb-divider { width: 1px; height: 16px; background-color: #ddd; margin: 0 5px; }

/* Filter & Sort Labels */
.tb-filter-toggle, .tb-sort-label { 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    font-weight: 600; 
    color: var(--tb-black); 
    cursor: pointer; 
    white-space: nowrap; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    position: relative;
    z-index: 1001 !important;
    pointer-events: auto !important;
    user-select: none;
    padding: 5px 0;
}
.tb-filter-toggle::after, .tb-sort-label::after { content: ""; display: block; width: 5px; height: 5px; border-right: 1px solid #000; border-bottom: 1px solid #000; transform: rotate(45deg); margin-top: -3px; transition: 0.2s; }

/* Sort Dropdown Container */
.tb-sort-dropdown { 
    position: relative; 
    cursor: pointer; 
    z-index: 1000; 
    margin-left: 10px; 
    display: inline-block;
    overflow: visible !important;
}
.tb-sort-dropdown.is-active .tb-sort-label::after { transform: rotate(-135deg) translateY(-1px); }

/* The Dropdown List (Final Fixed State) */
.tb-sort-list { 
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: #fff !important; 
    min-width: 190px; 
    list-style: none; 
    margin: 10px 0 0; 
    padding: 15px 0; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.08); 
    border: 1px solid #f0f0f0; 
    z-index: 1002 !important; 
    
    /* Animation State */
    display: block !important; 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(10px); 
    transition: 0.2s ease; 
    pointer-events: none; 
}

/* Active State */
.tb-sort-dropdown.is-active .tb-sort-list { 
    opacity: 1 !important; 
    visibility: visible !important; 
    transform: translateY(0) !important; 
    pointer-events: auto; 
}

.tb-sort-list li a { display: block; padding: 8px 25px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #888; text-decoration: none; text-align: left; transition: 0.2s; }
.tb-sort-list li a:hover, .tb-sort-list li a.is-active { color: #000; font-weight: 600; }


/* ============================================================
   4. GRID SYSTEM
   ============================================================ */
.tb-products-grid ul.products { display: grid !important; gap: 0px 20px; margin: 0 !important; }
.tb-products-grid.grid-4 ul.products { grid-template-columns: repeat(4, 1fr) !important; }
.tb-products-grid.grid-3 ul.products { grid-template-columns: repeat(3, 1fr) !important; }
.tb-products-grid.grid-2 ul.products { grid-template-columns: repeat(2, 1fr) !important; }
.tb-products-grid.grid-1 ul.products { grid-template-columns: 1fr !important; }
.tb-product-card { position: relative; padding-bottom: 0px !important; margin-bottom: 10px !important; }


/* ============================================================
   5. PRODUCT CARDS & INFO
   ============================================================ */
.tb-product-card .ct-media-container { display: block !important; background-color: #F7F7F7 !important; margin-bottom: 12px !important; transition: opacity 0.3s ease; }
.tb-product-card .ct-media-container img { width: 100%; height: 500px !important; display: block !important; aspect-ratio: 1/1 !important; object-fit: contain !important; margin-bottom: 0 !important; mix-blend-mode: darken !important; }

.tb-card-row-1 { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px !important; width: 100%; min-height: 18px; }
.tb-card-title { font-size: 14px !important; text-transform: uppercase; margin: 0 !important; color: #000; font-weight: 500 !important; line-height: 1.3; padding-right: 10px; display: block !important; }
.tb-loop-swatches { display: flex; gap: 5px; flex-shrink: 0; padding-top: 1px; }
.tb-loop-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #ccc; display: block; cursor: pointer; box-sizing: border-box; }
.tb-loop-swatch.is-selected { border: 1px solid #b5b2ad; box-shadow: 0 0 0 2px #fff inset, 0 0 0 0px #000; }
.tb-loop-swatch:hover { border-color: #b5b2ad; transform: scale(1.1); }
.tb-card-row-2 { margin-top: 0px; }


/* ============================================================
   6. ICONS & HOVER EFFECTS
   ============================================================ */
.tb-product-icons { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; opacity: 0; transition: 0.3s; pointer-events: none; z-index: 10; }
.tb-product-card:hover .tb-product-icons { opacity: 1; pointer-events: auto; }
.tb-icon-btn { width: 34px; height: 34px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.08); cursor: pointer; border: 0; padding: 0; }
.tb-icon-btn:hover { background: #000; color: #fff; }

/* Cart Icon */
.tb-icon-cart { color: #000; position: relative; }
.tb-icon-cart:hover { color: #fff; }
.tb-icon-cart::before, .tb-icon-cart::after { content: ""; position: absolute; background: currentColor; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tb-icon-cart::before { width: 10px; height: 1px; }
.tb-icon-cart::after { width: 1px; height: 10px; }

/* Wishlist Icon */
.tb-icon-wishlist { color: #000; transition: 0.2s; }
.tb-icon-wishlist:hover { background: #000; color: #fff; }
.tb-icon-wishlist svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: fill 0.3s; }
.tb-icon-wishlist.is-active svg { fill: currentColor; stroke: currentColor; } 


/* ============================================================
   7. DRAWERS (Filter & Quick Add)
   ============================================================ */
.tb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99990; opacity: 0; visibility: hidden; transition: 0.3s; }
.tb-overlay.is-active { opacity: 1; visibility: visible; }

.tb-drawer { 
    position: fixed; 
    top: 0; 
    right: -680px; 
    width: 640px; 
    max-width: 90vw; 
    height: 100vh; 
    background: #fff; 
    z-index: 99999; 
    display: flex; 
    flex-direction: column; 
    box-shadow: -5px 0 20px rgba(0,0,0,0.05); 
    visibility: hidden; 
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0.4s; 
}
.tb-drawer.is-open { 
    right: 0; 
    visibility: visible; 
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0s; 
}

.tb-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 35px; }
.tb-drawer-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.15em; margin: 0; font-weight: 600; }
.tb-close-btn { font-size: 24px; cursor: pointer; background: none; border: 0; padding: 0; line-height: 1; opacity: 0.5; }
.tb-drawer-footer { padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f5f5f5; margin-top: auto; }
.tb-apply-btn { background: #000; color: #fff; border: 0; padding: 14px 40px; text-transform: uppercase; font-size: 11px; letter-spacing: 0.15em; font-weight: 600; cursor: pointer; }
.tb-clear-btn { background: none; border: 0; text-decoration: underline; text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; cursor: pointer; }
.tb-filter-content { padding: 10px 35px; overflow-y: auto; flex: 1; }

/* Filter Groups */
.tb-filter-group { border-top: 1px solid #eee; padding: 15px 0; }
.tb-filter-head { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; }
.tb-filter-body { margin-top: 30px; display: none; }
.tb-filter-head::after { content: ""; display: block; width: 6px; height: 6px; border-right: 1px solid #000; border-bottom: 1px solid #000; transform: rotate(45deg); transition: transform 0.2s ease; margin-left: auto; margin-top: 4px; }
.tb-filter-group.is-collapsed .tb-filter-head::after { transform: rotate(-135deg); }

/* Checkboxes & Swatches */
.tb-custom-check-label { display: flex; align-items: center; gap: 20px; line-height: 1; margin-bottom: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; color: #333; position: relative; }
.tb-custom-check-label input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.tb-checkmark { height: 16px; width: 16px; border: 1px solid #ccc; background-color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: 0.2s; }
.tb-custom-check-label:hover .tb-checkmark { border-color: #000; }
.tb-custom-check-label input:checked ~ .tb-checkmark { background-color: #000; border-color: #000; }
.tb-checkmark::after { content: ""; display: none; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.tb-custom-check-label input:checked ~ .tb-checkmark::after { display: block; }
.tb-filter-count { font-size: 10px; color: #999; margin-left: 4px; }
.tb-filter-swatch-label { display: flex; align-items: center; gap: 10px; line-height: 1; margin-bottom: 20px; font-size: 12px; cursor: pointer; }
.tb-filter-swatch-circle { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #b5b2ad; background-size: cover; box-sizing: border-box; flex-shrink: 0; }
.tb-filter-swatch-label input { display: none; } 
.tb-filter-swatch-label input:checked + .tb-filter-swatch-circle { border: 1px solid #b5b2ad; box-shadow: 0 0 0 2px #fff inset, 0 0 0 0px #000; }

/* Price Slider */
.tb-price-labels { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; margin-bottom: 12px; }
.tb-slider-wrapper { position: relative; width: 100%; height: 4px; background: #e5e5e5; border-radius: 2px; margin-bottom: 20px; }
.tb-slider-fill { position: absolute; height: 100%; background: #000; left: 0; right: 0; border-radius: 2px; z-index: 1; }
.tb-range-input { position: absolute; top: -6px; left: 0; width: 100%; height: 16px; -webkit-appearance: none; appearance: none; background: none; pointer-events: none; margin: 0; z-index: 2; }
.tb-range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #000; cursor: pointer; pointer-events: auto; border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.tb-range-input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #000; cursor: pointer; pointer-events: auto; border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }


/* ============================================================
   8. QUICK ADD STYLES
   ============================================================ */
.tb-qa-header { padding: 40px 40px 20px 40px; display: flex; gap: 20px; align-items: flex-start; }
.tb-qa-img { width: 80px; height: auto; object-fit: cover; }
.tb-qa-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; line-height: 1.4; margin: 0; font-weight: 400; }
.tb-qa-body { padding: 20px 40px 100px 40px; overflow-y: auto; flex: 1; }
.tb-qa-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; display: block; color: #666; }
.tb-qa-us-dropdown { font-size: 12px; text-transform: uppercase; margin-bottom: 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.tb-qa-color-section { margin-bottom: 30px; }
.tb-qa-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 15px; display: block; color: #666; font-weight: 600; }
.tb-qa-colors { display: flex; gap: 12px; flex-wrap: wrap; }
.tb-qa-color-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #e0e0e0; cursor: pointer; box-sizing: border-box; background-size: cover; transition: all 0.2s ease; }
.tb-qa-color-swatch:hover { transform: scale(1.1); border-color: #b5b2ad; }
.tb-qa-color-swatch.is-selected { border: 1px solid #b5b2ad; box-shadow: 0 0 0 2px #fff inset, 0 0 0 0px #000; }
.tb-size-item { padding: 15px 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; text-transform: uppercase; cursor: pointer; color: #333; }
.tb-size-item:first-child { border-top: 1px solid #f0f0f0; }
.tb-size-item:hover { font-weight: 600; color: #000; }
.tb-size-item.is-selected { font-weight: 600; color: #000; position: relative; }
.tb-size-item.is-selected::after { content: "\2713"; position: absolute; right: 0; }
.tb-size-item.is-hidden { display: none; } 
.tb-qa-bottom-bar { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 40px 40px 40px; background: #fff; border-top: 1px solid #eee; }
.tb-qa-footer-btn { width: 100%; background: #111; color: #fff; border: 0; padding: 18px; text-transform: uppercase; font-size: 12px; letter-spacing: 0.15em; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 15px; margin: 0; }
.tb-qa-footer-btn span { pointer-events: none; }


/* ============================================================
   9. RESPONSIVE
   ============================================================ */
@media(min-width: 1025px) {
    .tb-grid-2, .tb-grid-1 { display: none !important; } 
    .tb-products-grid ul.products { grid-template-columns: repeat(4, 1fr); } 
}

@media(max-width: 1024px) and (min-width: 768px) {
    .tb-grid-4, .tb-grid-1 { display: none !important; } 
    .tb-grid-3, .tb-grid-2 { display: block !important; } 
    .tb-products-grid ul.products { grid-template-columns: repeat(3, 1fr); gap: 40px 20px; } 
    .tb-product-card .ct-media-container img { height: 350px !important; }
}

@media (max-width: 767px) {
    .tb-header-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    .tb-toolbar { width: 100% !important; justify-content: space-between !important; }
    .tb-grid-4, .tb-grid-3 { display: none !important; }
    .tb-grid-2, .tb-grid-1 { display: block !important; }
    .tb-tools-group { width: auto; justify-content: flex-end; }
    .tb-sort-dropdown { width: auto; margin-left: 20px; order: 2; }
    .tb-sort-label { border: 0; padding: 0; }
    .tb-product-card .ct-media-container img { height: 250px !important; }
}