/* ==========================================================
   1. SHOP PAGE LAYOUT (Minimal tweaks)
========================================================== */
.woocommerce-products-header { text-align: center; padding: 60px 20px 0 20px; border-bottom: none !important; margin-bottom: 40px; width: 100%; }
.woocommerce-products-header__title.page-title { font-family: 'Cormorant Garamond', serif; font-size: 46px; color: #111111; font-weight: 300; margin-bottom: 40px; }
.woocommerce-result-count { float: left; margin-bottom: 20px; color: #666; }
.woocommerce-ordering { float: right; margin-bottom: 20px; }

#secondary.widget-area { width: 25%; position: sticky; top: 120px; align-self: flex-start; background: #ffffff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04); border: 1px solid #f5f5f5; padding: 35px 30px; }
#secondary.widget-area .widget-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #333; font-weight: 300; border-bottom: 1px solid #eaeaea; padding-bottom: 15px; margin-bottom: 20px; }
#secondary.widget-area ul { list-style: none; padding: 0; margin: 0; }
#secondary.widget-area ul li { padding-bottom: 15px; }
#secondary.widget-area ul li a { text-decoration: none; color: #666666; font-size: 15px; font-family: 'Jost', sans-serif; font-weight: 300; transition: color 0.3s ease; }
#secondary.widget-area ul li.current-cat a, #secondary.widget-area ul li a:hover { color: #C08B4B; font-weight: 600; }
#secondary.widget-area select { font-family: 'Jost', sans-serif; width: 100%; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; color: #555; background-color: transparent; font-size: 14px; font-weight: 300; }

ul.products { clear: both; display: grid !important; padding: 0; list-style: none; margin: 0; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: 100% !important; margin: 0 !important; list-style: none; text-align: left; }
ul.products li.product.first { clear: none !important; margin-top: 0 !important; }
ul.products li.product img { border-radius: 0px; width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 5; margin-bottom: 15px; }
.marbo-grid-category a { color: #C08B4B; font-family: 'Jost', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; text-decoration: none; display: block; margin-bottom: 5px; }
ul.products li.product .woocommerce-loop-product__title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 300; color: #111; margin-bottom: 5px; }
ul.products li.product .price { font-family: 'Jost', sans-serif; color: #555; font-size: 15px; font-weight: 400; }
.woocommerce-pagination { clear: both; width: 100%; text-align: center; padding-top: 40px; }

/* ==========================================================
   2. ADVANCED PRODUCT CARD CSS (RIGHT CART + INFINITE LOOP)
========================================================== */
.marbo-card-media { position: relative; overflow: hidden; border-radius: 0; margin-bottom: 15px; aspect-ratio: 4 / 5 !important; background-color: #f9f9f9; cursor: pointer; }
.marbo-card-media img.marbo-gallery-img { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; opacity: 0; z-index: 1; transition: opacity 0.4s ease, transform 0.6s ease; }
.marbo-card-media img.marbo-gallery-img.active { opacity: 1; z-index: 2; }
.marbo-card-media:hover img.marbo-gallery-img.active { transform: scale(1.03); }

.marbo-progress-bar { position: absolute; bottom: 5px; left: 10px; right: 5px; height: 4px; width: 95%; border-radius: 50px; background-color: rgba(255, 255, 255, 0.2); z-index: 5; opacity: 0; transition: opacity 0.3s ease; }
.marbo-card-media:hover .marbo-progress-bar { opacity: 1; }
.marbo-progress-fill { height: 100%; width: 0%; background-color: #ffffff; }
.marbo-progress-fill.animating { animation: marboFillBar 2500ms linear forwards; }
@keyframes marboFillBar { 0% { width: 0%; } 100% { width: 100%; } }

.marbo-quick-buy-wrapper { position: absolute; bottom: 15px; right: 15px; z-index: 10; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.marbo-card-media:hover .marbo-quick-buy-wrapper { opacity: 1; transform: translateY(0); }
.marbo-quick-buy-wrapper .button.add_to_cart_button { display: inline-flex !important; align-items: center !important; justify-content: flex-start !important; background-color: #fff !important; color: transparent !important; border: 1px solid #eaeaea !important; border-radius: 50% !important; height: 40px !important; width: 31px !important; padding: 0 0 0 11px !important; margin: 0 !important; overflow: hidden !important; white-space: nowrap !important; box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important; font-family: 'Jost', sans-serif !important; font-size: 13px !important; font-weight: 500 !important; transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-radius 0.3s ease, color 0.3s ease, padding 0.3s ease, border-color 0.3s ease, background-color 0.3s ease !important; }
.marbo-quick-buy-wrapper .button.add_to_cart_button::before { content: ""; flex-shrink: 0; display: block; width: 18px !important; height: 18px !important; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23111" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1.5"></circle><circle cx="20" cy="21" r="1.5"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>') !important; background-size: contain; background-repeat: no-repeat; background-position: center; margin-right: 8px !important; transition: none !important; }
.marbo-quick-buy-wrapper .button.add_to_cart_button:hover { width: 125px !important; border-radius: 30px !important; padding: 0 0 0 15px !important; background-color: #fff !important; color: #111 !important; }
.marbo-quick-buy-wrapper .button.add_to_cart_button.loading::after, .marbo-quick-buy-wrapper .button.add_to_cart_button.added::after { display: none !important; }
.marbo-quick-buy-wrapper .button.add_to_cart_button.added { width: 145px !important; background-color: #27ae60 !important; color: #fff !important; }
.marbo-quick-buy-wrapper .button.add_to_cart_button.added::before { filter: invert(1); }

ul.products li.product .woocommerce-loop-product__title { font-family: 'Jost', sans-serif !important; font-size: 15px !important; font-weight: 600 !important; color: #111 !important; margin-top: 15px !important; margin-bottom: 5px !important; }
ul.products li.product .price { font-family: 'Jost', sans-serif !important; font-size: 14px !important; color: #777 !important; }
ul.products li.product .price ins { color: #111 !important; font-weight: 700 !important; text-decoration: none !important; }

/* ==========================================================
   3. TRANSPARENT ABSOLUTE HEADER & SMOOTH REVEAL (SHOP PAGE)
========================================================== */
.woocommerce-products-header { display: none !important; }

body.archive.woocommerce-page .site-header { position: absolute; top: 35px; left: 0; width: 100%; background-color: transparent; border-bottom: none; z-index: 1000; transform: none; transition: background-color 0.3s ease, color 0.3s ease; }
body.admin-bar.archive.woocommerce-page .site-header { top: 67px; }
@media screen and (max-width: 782px) { body.admin-bar.archive.woocommerce-page .site-header { top: 81px; } }

.marbo-full-cover-photo { width: 100%; height: 400px !important; margin-top: -100px !important; margin-bottom: 40px !important; border-radius: 0 !important; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.marbo-cover-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; background-image: var(--marbo-cover-image); z-index: 1; animation: marboInitialZoom 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; will-change: transform; }
@keyframes marboInitialZoom { 0% { transform: scale(1); opacity: 0; } 100% { transform: scale(1.05); opacity: 1; } }
.marbo-cover-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000000; opacity: var(--marbo-overlay-opacity, 0.2); z-index: 2; }
.marbo-cover-content { position: relative; z-index: 3; text-align: center; padding-top: 200px; padding-left: 20px; padding-right: 20px; }
.marbo-cover-subtitle { font-family: 'Jost', sans-serif !important; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #ffffff !important; margin: 0 0 5px 0 !important; }
.marbo-cover-title { font-family: 'Cormorant Garamond', serif !important; font-size: 52px !important; font-weight: 400 !important; color: #ffffff !important; margin: 0 !important; text-shadow: 0 2px 12px rgba(0,0,0,0.2); }

body.archive.woocommerce-page .site-header:not(.smart-sticky) .left-nav a,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .right-nav a,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .nav-icon,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .custom-text-logo,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .hamburger-btn,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .cart-trigger,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .search-trigger,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .header-action-btn i,
body.archive.woocommerce-page .site-header:not(.smart-sticky) .header-action-btn { color: #ffffff !important; }
body.archive.woocommerce-page .site-header:not(.smart-sticky) .left-nav a::after, body.archive.woocommerce-page .site-header:not(.smart-sticky) .right-nav a::after { background-color: #ffffff !important; }
body.archive.woocommerce-page .site-header:not(.smart-sticky) .custom-logo-link img { filter: invert(1) brightness(100) !important; }

@keyframes marboSlideDown { 0% { transform: translateY(-100%); opacity: 0.5; } 100% { transform: translateY(0); opacity: 1; } }
body.archive.woocommerce-page .site-header.smart-sticky { position: fixed; top: 0; background-color: #ffffff; border-bottom: 1px solid #f0f0f0; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transform: none; animation: marboSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
body.admin-bar.archive.woocommerce-page .site-header.smart-sticky { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar.archive.woocommerce-page .site-header.smart-sticky { top: 46px; } }

body.archive.woocommerce-page .site-header.smart-sticky .left-nav a, body.archive.woocommerce-page .site-header.smart-sticky .right-nav a, body.archive.woocommerce-page .site-header.smart-sticky .nav-icon, body.archive.woocommerce-page .site-header.smart-sticky .custom-text-logo, body.archive.woocommerce-page .site-header.smart-sticky .hamburger-btn, body.archive.woocommerce-page .site-header.smart-sticky .cart-trigger, body.archive.woocommerce-page .site-header.smart-sticky .search-trigger, body.archive.woocommerce-page .site-header.smart-sticky .header-action-btn i, body.archive.woocommerce-page .site-header.smart-sticky .header-action-btn { color: #111111 !important; }
body.archive.woocommerce-page .site-header.smart-sticky .custom-logo-link img { filter: none !important; }

/* ==========================================================
   4. PREMIUM SHOP FILTER BAR & SLIDE-OUT DRAWER UI
========================================================== */
.marbo-shop-layout-full { padding: 0 2% !important; max-width: 100% !important; box-sizing: border-box !important; }
.marbo-single-product-layout { max-width: 100%; margin: 40px auto; padding: 0 2%; }

.marbo-shop-filters-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; margin-bottom: 30px; border-bottom: 1px solid #eaeaea; flex-wrap: wrap; gap: 15px; }
.marbo-filter-btn { background: transparent; border: 1px solid #111; border-radius: 30px; padding: 10px 24px; font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #111; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.marbo-filter-btn:hover { background: #111; color: #fff; }
.marbo-results-count .woocommerce-result-count { margin: 0; font-family: 'Jost', sans-serif; font-size: 14px; color: #666; }

.marbo-filter-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.4); z-index: 999998; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.marbo-filter-overlay.active { opacity: 1; visibility: visible; }
.marbo-filter-drawer { position: fixed; top: 0; right: -450px; width: 400px; max-width: 90vw; height: 100vh; background: #fff; z-index: 999999; transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1); display: flex; flex-direction: column; box-shadow: -5px 0 30px rgba(0,0,0,0.1); }
.marbo-filter-drawer.active { right: 0; }
.filter-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; border-bottom: 1px solid #eaeaea; }
.filter-drawer-header h3 { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 500; margin: 0; color: #111; }
.filter-drawer-header button { background: none; border: none; font-size: 30px; color: #111; cursor: pointer; line-height: 1; }
.filter-drawer-body { padding: 30px; overflow-y: auto; flex: 1; }

/* WOOCOMMERCE WIDGET OVERRIDES */
.filter-drawer-body .widget, .marbo-widget-wrapper { margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid #eaeaea; width: 100%; }
.filter-drawer-body .widget-title { font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #111; margin-bottom: 15px; display: block; width: 100%; }
.marbo-widget-wrapper form.woocommerce-ordering { margin: 0; width: 100%; }
.filter-drawer-body select { width: 100%; padding: 14px 15px; border: 1px solid #ddd; border-radius: 6px; font-family: 'Jost', sans-serif; font-size: 14px; outline: none; cursor: pointer; background-color: #fafafa; color: #333; appearance: auto; }
.filter-drawer-body select:focus { border-color: #111; }
.filter-drawer-body ul { list-style: none; padding: 0; margin: 0; }
.filter-drawer-body ul li { padding: 12px 0; border-bottom: 1px solid #f9f9f9; font-family: 'Jost', sans-serif; font-size: 15px; color: #444; display: block !important; }
.filter-drawer-body ul li::after { content: ""; display: table; clear: both; }
.filter-drawer-body ul li:last-child { border-bottom: none; }
.filter-drawer-body ul li a { text-decoration: none; color: #444; transition: color 0.2s; display: inline-block; max-width: 80%; }
.filter-drawer-body ul li a:hover { color: #111; font-weight: 500; }
.filter-drawer-body ul li .count { font-size: 12px; color: #888; background: #f5f5f5; padding: 2px 8px; border-radius: 12px; float: right; margin-top: 2px; }
.filter-drawer-body ul li ul.children { display: block !important; width: 100% !important; clear: both !important; margin: 12px 0 -12px 0; padding: 0; border-top: 1px solid #f9f9f9; }
.filter-drawer-body ul li ul.children li { padding: 12px 0; font-size: 15px; border-bottom: 1px solid #f9f9f9; display: block !important; }
.filter-drawer-body .price_slider_wrapper .ui-slider { background: #eaeaea; height: 4px; border: none; border-radius: 2px; margin-bottom: 25px; margin-top: 15px; }
.filter-drawer-body .price_slider_wrapper .ui-slider-range { background: #111; }
.filter-drawer-body .price_slider_wrapper .ui-slider-handle { background: #fff; border: 2px solid #111; width: 18px; height: 18px; border-radius: 50%; top: -7px; outline: none; cursor: grab; }
.filter-drawer-body .price_slider_amount { display: flex; justify-content: space-between; align-items: center; font-family: 'Jost', sans-serif; }
.filter-drawer-body .price_slider_amount input[type="text"], .filter-drawer-body .price_slider_amount input[type="number"], .filter-drawer-body .wc-block-price-filter__controls input { border: 1px solid #dcdcdc !important; border-radius: 6px !important; font-size: 13px !important; padding: 8px 10px !important; width: 90px !important; text-align: center; color: #333; background: #fff; }
.filter-drawer-body .price_slider_amount input:focus, .filter-drawer-body .wc-block-price-filter__controls input:focus { border-color: #111 !important; outline: none !important; }
.filter-drawer-body .price_slider_amount button { background: #111; color: #fff; border: none; padding: 8px 18px; border-radius: 25px; font-size: 12px; text-transform: uppercase; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.filter-drawer-body .price_slider_amount button:hover { background: #333; }
.filter-drawer-body .price_slider_amount .price_label { font-size: 14px; color: #555; }
.filter-drawer-body .widget:empty, .filter-drawer-body .widget_layered_nav_filters, .filter-drawer-body .wc-block-active-filters { display: none !important; margin: 0 !important; padding: 0 !important; border: none !important; }

/* ==========================================================
   5. RESPONSIVE DESIGN (TABLET & MOBILE)
========================================================== */

/* Desktop: 4 Columns */
@media screen and (min-width: 1025px) {
    ul.products { grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; }
}

/* Tablet: 3x3 Grid */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    ul.products { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
}

/* Mobile Sidebar Slide Out Trigger */
#marbo-mobile-filter-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border: 1px solid #111; color: #111; padding: 12px 20px; font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 600; text-transform: uppercase; border-radius: 8px; margin-bottom: 25px; cursor: pointer; }

@media screen and (max-width: 1024px) {
    /* Mobile Sidebar Off-Canvas Layout */
    #secondary.widget-area {
        position: fixed; top: 0; left: -100%; width: 85%; max-width: 350px; height: 100vh;
        background: #fff; z-index: 100000; overflow-y: auto; padding: 30px 20px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1); transition: left 0.4s ease;
    }
    #secondary.widget-area.filters-active { left: 0; }
    
    /* Shop Page Transparent Header Reset for Tablet/Mobile */
    body.archive.woocommerce-page .site-header {
        position: absolute !important;
        top: 45px !important; 
        left: 0; width: 100%;
        background-color: transparent !important;
        border-bottom: none !important;
        z-index: 1000 !important;
        transform: none !important; 
        transition: background-color 0.3s ease, color 0.3s ease !important; 
    }
}

/* Mobile: 2x2 Grid & Cover Photo Tweaks */
@media screen and (max-width: 768px) {
    ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 04px !important; }
    .marbo-shop-cover-photo { height: 200px; margin-bottom: 25px; }
    .marbo-shop-cover-photo h2 { font-size: 32px; }
    
    .marbo-full-cover-photo { height: 300px !important; }
    .marbo-cover-title { font-size: 38px !important; }
    .marbo-cover-subtitle { font-size: 11px; }
}