/* ==========================================================
   CLENA SHOP PAGE  —  shop.css
   ========================================================== */

/* ----------------------------------------------------------
   PAGE WRAPPER
---------------------------------------------------------- */
.clena-shop-page {
    background: #ffffff;
}

/* Hide mobile-specific filter elements on desktop */
.filter-toggle-btn,
.sidebar-close-btn,
.sidebar-overlay {
    display: none;
}

.shop-content-section {
    padding: 40px 0 80px;
}

/* ----------------------------------------------------------
   TWO-COLUMN LAYOUT
---------------------------------------------------------- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.shop-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Each sidebar block */
.sidebar-block {
    background: #fff;
    border: 1px solid #ffffff;
    border-radius: 14px;
    padding: 20px 18px;
    margin-bottom: 14px;
}

/* Section label */
.sidebar-label {
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #9aa3b8 !important;
    margin: 0 0 14px !important;
    line-height: 1 !important;
}

/* ----------------------------------------------------------
   CATEGORY LIST
---------------------------------------------------------- */
.sidebar-cat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 9px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    cursor: pointer;
}

.cat-link:hover {
    background: #ffffff;
}

.cat-link .cat-name {
    font-size: 13.5px;
    font-weight: 500;
    color: #444;
    transition: color 0.18s;
}

.cat-link:hover .cat-name {
    color: var(--primary);
}

.cat-link .cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    background: #e8ecf7;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 0 6px;
    flex-shrink: 0;
}

/* Active category */
.cat-link.is-active {
    background: var(--primary);
}

.cat-link.is-active .cat-name {
    color: #fff;
    font-weight: 700;
}

.cat-link.is-active .cat-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ----------------------------------------------------------
   PRICE SLIDER
---------------------------------------------------------- */
/* Price slider container — provides space above the track for the thumb */
.price-track-wrap {
    margin-bottom: 14px;
    padding-top: 14px;
    /* room for thumb to sit above */
}

/* Visible track bar */
.price-track {
    position: relative;
    height: 5px;
    background: #e4e8f0;
    border-radius: 5px;
    /* NO overflow:hidden — would clip the thumb */
}

/* Filled portion of the track (width set by JS) */
.price-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    pointer-events: none;
    transition: width 0.05s;
    width: 0%;
}

/* The actual range input — pulled up so its thumb sits centred on the track */
.price-slider {
    display: block;
    width: 100%;
    margin-top: -13px;
    /* pull up to overlap track centre */
    height: 26px;
    /* tall hit-area keeps thumb clickable */
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
    /* above the track div */
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
}

.price-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: grab;
    border: 3px solid var(--primary);
}

.price-slider::-webkit-slider-runnable-track {
    background: transparent;
}

.price-slider::-moz-range-track {
    background: transparent;
}

.price-slider:focus {
    outline: none;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.price-label strong {
    color: var(--primary);
    font-weight: 700;
}

/* ----------------------------------------------------------
   PACK SIZE BUTTONS
---------------------------------------------------------- */
.pack-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pack-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border: 1.5px solid #d4d9e8;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #555;
    background: #fff;
    text-decoration: none;
    transition: all 0.18s;
}

.pack-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f4f4f5;
}

.pack-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ----------------------------------------------------------
   BULK OFFER BOX
---------------------------------------------------------- */
.sidebar-bulk-box {
    background: var(--primary);
    border-radius: 14px;
    padding: 22px 20px;
    position: relative;
    overflow: hidden;
}

.sidebar-bulk-box::before,
.sidebar-bulk-box::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-bulk-box::before {
    width: 120px;
    height: 120px;
    top: -30px;
    right: -30px;
}

.sidebar-bulk-box::after {
    width: 70px;
    height: 70px;
    bottom: -20px;
    left: -20px;
}

.bulk-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.bulk-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 18px;
}

.bulk-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--primary) !important;
    font-size: 12.5px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.bulk-cta:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-hover) !important;
    text-decoration: none;
}

/* ==========================================================
   SHOP MAIN AREA
   ========================================================== */
.shop-main {
    min-width: 0;
    /* prevent grid blowout */
}

/* ----------------------------------------------------------
   TOOLBAR
---------------------------------------------------------- */
.shop-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

/* ---- Search ---- */
/* wrapper is position:relative only — no flex, so the block input fills it */
.toolbar-search {
    flex: 1;
    position: relative;
    min-width: 0;
}

/* icon is pinned inside the wrapper */
.toolbar-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%) !important;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    line-height: 0;
    z-index: 2;
    animation: none !important;
}

/* input takes full width of wrapper; left-pad makes room for the icon */
.toolbar-search .toolbar-search-input,
.toolbar-search input[type="search"].toolbar-search-input,
input#toolbarSearchInput,
.toolbar-search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    border: 1.5px solid #e4e8f0;
    border-radius: 10px;
    padding-left: 44px !important;
    padding-right: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 44px;
    color: #333;
    background: #f7f9fc;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.toolbar-search-input:focus {
    border-color: var(--primary);
    background: #fff;
}

.toolbar-search-input::placeholder {
    color: #b0b8cc;
}

/* Hide native browser search cancel and clear buttons (Chrome, Edge, Safari) */
.toolbar-search input[type="search"]::-webkit-search-cancel-button,
.toolbar-search input[type="search"]::-webkit-search-decoration,
.toolbar-search input[type="search"]::-webkit-search-results-button,
.toolbar-search input[type="search"]::-webkit-search-results-decoration,
.toolbar-search-input::-webkit-search-cancel-button,
.toolbar-search-input::-webkit-search-decoration,
.toolbar-search-input::-webkit-search-results-button,
.toolbar-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.toolbar-search input[type="search"]::-ms-clear,
.toolbar-search input[type="search"]::-ms-reveal,
.toolbar-search-input::-ms-clear,
.toolbar-search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

/* Clear button on right */
.toolbar-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 0;
    z-index: 2;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.toolbar-search-clear:hover {
    background: #cbd5e1;
    color: #1e293b;
    transform: translateY(-50%) scale(1.08);
}

/* No animation on search icon during search */
.toolbar-search.is-loading .toolbar-search-icon {
    animation: none !important;
    color: #94a3b8;
}

/* Live Search Dropdown */
.toolbar-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(18, 38, 63, 0.14), 0 2px 6px rgba(18, 38, 63, 0.04);
    border: 1px solid #e6ebf3;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8391a5;
}

.search-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f6fa;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.is-selected {
    background-color: #f2f6fd;
}

.search-dropdown-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e9edf5;
}

.search-dropdown-info {
    flex: 1;
    min-width: 0;
}

.search-dropdown-cat {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-title mark {
    background: transparent;
    color: var(--primary, #274797);
    font-weight: 700;
    padding: 0;
}

.search-dropdown-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary, #274797);
    white-space: nowrap;
    text-align: right;
}

.search-dropdown-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.search-dropdown-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary, #274797);
    text-decoration: none;
    transition: color 0.15s, transform 0.15s;
}

.search-dropdown-view-all:hover {
    color: #1a3370;
    transform: translateX(2px);
}

.search-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* ---- Result count + sort ---- */
.toolbar-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    white-space: nowrap;
    align-self: center;
    /* vertically centre in the flex toolbar */
}

.toolbar-count,
.toolbar-count p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
}

/* WC ordering select */
.toolbar-sort .woocommerce-ordering,
.toolbar-sort form {
    margin: 0 !important;
}

.toolbar-sort select,
.woocommerce-ordering select {
    height: 42px !important;
    border: 1.5px solid #e4e8f0 !important;
    border-radius: 10px !important;
    padding: 0 36px 0 14px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: #f7f9fc !important;
    outline: none !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    min-width: 155px;
}

/* ==========================================================
   WOOCOMMERCE PRODUCT GRID RESET
   ========================================================== */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    padding: 0 !important;
}

/* ==========================================================
   PRODUCT CARD
   ========================================================== */
.product-card {
    list-style: none;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Fade-in setup — JS adds .card-visible */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease,
        box-shadow 0.25s ease;
}

.product-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    border-color: #e4e4e7;
}

/* Image */
.card-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ffffff;
    flex-shrink: 0;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* show full image — no cropping */
    display: block;
    transition: transform 0.4s ease;
    padding: 8px;
    /* small breathing room around the image */
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.04);
}

/* Badge container — stacks vertically in the top-left of the image */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

/* ---- Base badge ---- */
.card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 4px 12px;
    border-radius: 30px;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ---- DISCOUNT badge (red) ---- */
.bdg-sale {
    background: #e53e3e;
    font-size: 10px;
    min-width: 72px;
    /* fixed width for "Discount" */
    padding: 5px 12px;
}

/* ---- NEW badge (green) ---- */
.bdg-new {
    background: #22c55e;
    font-size: 10px;
    min-width: 42px;
    /* narrower — "New" is short */
    padding: 5px 10px;
}

/* ---- BEST SELLER badge (brand primary) ---- */
.bdg-bestseller {
    background: var(--primary);
    font-size: 9.5px;
    min-width: 82px;
    /* widest — "Best Seller" is longest */
    padding: 5px 12px;
    letter-spacing: 0.5px;
}

/* ---- OUT OF STOCK badge (red) ---- */
.bdg-out-of-stock {
    background: #dc2626;
    font-size: 9.5px;
    min-width: 82px;
    padding: 5px 12px;
    letter-spacing: 0.5px;
}

/* Card body */
.card-body {
    padding: 15px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.card-meta-wrap .card-cat {
    margin-bottom: 0;
}

.card-stock-badge.out-of-stock {
    display: inline-flex;
    align-items: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.2;
    white-space: nowrap;
}

.card-cat {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9aa3b8;
    margin-bottom: 5px;
    line-height: 1;
}

.card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.45;
    margin: 0 0 8px !important;
}

.card-title a {
    color: #111111;
    text-decoration: none;
    transition: color 0.18s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--primary);
}

.card-price {
    font-size: 19px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 7px;
    line-height: 1.2;
}

.card-price del {
    font-size: 13px;
    color: #bbb;
    font-weight: 500;
}

.card-price ins {
    text-decoration: none;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.card-rating .star-rating {
    font-size: 13px;
    color: #f59e0b;
    margin: 0;
    line-height: 1;
}

.rating-count {
    font-size: 11.5px;
    color: #9aa3b8;
    font-weight: 500;
}

/* Push ATC to bottom of card */
.card-atc {
    margin-top: auto;
}

/* ---- ATC button base ---- */
.card-atc a.button,
.card-atc button.button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    height: 42px !important;
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 9px !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.7px !important;
    cursor: pointer !important;
    white-space: nowrap;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Cart icon */
.card-atc a.button::before,
.card-atc button.button::before {
    content: '';
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

/* ---- Hover state ---- */
.card-atc a.button:hover,
.card-atc button.button:hover {
    background: var(--secondary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ---- Active / press ---- */
.card-atc a.button:active,
.card-atc button.button:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: none !important;
}

/* ATC loading state (JS-controlled) */
.card-atc .button.atc-loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

/* Hide standard "View cart" link under the ATC button */
.product-card .added_to_cart {
    display: none !important;
}

/* Out of Stock ATC button — clean centered label without cart bag icon */
.card-atc a.button.out-of-stock::before,
.card-atc button.button.out-of-stock::before {
    display: none !important;
}

.card-atc a.button.out-of-stock,
.card-atc button.button.out-of-stock {
    background: var(--primary) !important;
    color: #fff !important;
    cursor: pointer !important;
}

.card-atc a.button.out-of-stock:hover,
.card-atc button.button.out-of-stock:hover {
    background: var(--secondary) !important;
}


/* ==========================================================
   PAGINATION
   ========================================================== */
.shop-pagination {
    margin-top: 44px;
    display: flex;
    justify-content: center;
}

.woocommerce nav.woocommerce-pagination {
    display: inline-block;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none !important;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none !important;
    margin: 0 !important;
    float: none !important;
    display: block;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: 1.5px solid #e4e8f0 !important;
    border-radius: 9px;
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    background: #fff;
    transition: all 0.18s;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #f4f4f5 !important;
    border-color: var(--primary) !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.woocommerce nav.woocommerce-pagination ul li span.dots {
    border: none !important;
    background: transparent !important;
    color: #aaa !important;
    font-size: 16px;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.shop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 70px 20px;
    background: #fff;
    border: 1.5px dashed #d4d9e8;
    border-radius: 16px;
    text-align: center;
    color: #9aa3b8;
}

.shop-empty p {
    font-size: 15px;
    color: #7a84a0;
    font-weight: 500;
    margin: 0;
}

.shop-empty a {
    display: inline-flex;
    align-items: center;
    padding: 11px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.shop-empty a:hover {
    background: var(--secondary);
}

/* ==========================================================
   WC NOTICES (cart notices etc.)
   ========================================================== */
.clena-shop-page .woocommerce-message,
.clena-shop-page .woocommerce-info,
.clena-shop-page .woocommerce-error {
    border-radius: 10px;
    margin-bottom: 20px;
    border-top-color: var(--secondary) !important;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* 3-col → 2-col at 1180 */
@media (max-width: 1180px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Collapse sidebar at 960 and convert to a mobile slide-out drawer */
@media (max-width: 960px) {
    body.sidebar-open {
        overflow: hidden !important;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    /* Toggle button in toolbar */
    .filter-toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 44px;
        padding: 0 20px;
        background: #f7f9fc;
        border: 1.5px solid #e4e8f0;
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.22s ease;
        outline: none;
    }

    .filter-toggle-btn:hover {
        background: #ffffff;
        border-color: var(--primary);
        color: var(--primary);
    }

    .filter-toggle-btn svg {
        stroke: currentColor;
    }

    /* Sidebar Close Button */
    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.22s ease;
        outline: none;
        z-index: 10002;
    }

    .sidebar-close-btn:hover {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
    }

    .sidebar-close-btn svg {
        stroke: currentColor;
    }

    /* Sidebar Backdrop Overlay */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.4);
        backdrop-filter: blur(4px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    }

    .sidebar-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar Container as Left Drawer */
    .shop-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: #ffffff !important;
        z-index: 10000 !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.08) !important;
        padding: 60px 24px 40px !important;
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
        gap: 25px;
        margin: 0 !important;
        border: none !important;
    }

    .shop-sidebar.sidebar-open {
        transform: translateX(0) !important;
    }

    /* Admin Bar Spacing offsets */
    .admin-bar .shop-sidebar {
        top: 32px;
        height: calc(100vh - 32px);
    }

    .sidebar-bulk-box {
        margin-top: 15px;
    }
}

/* Handle smaller admin bar viewport sizes */
@media (max-width: 782px) {
    .admin-bar .shop-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }

    .admin-bar .sidebar-overlay {
        top: 46px;
    }
}

/* Toolbar shrinks and wraps nicely */
@media (max-width: 720px) {
    .shop-toolbar {
        flex-wrap: wrap;
        gap: 12px;
        align-items: center !important;
    }

    .toolbar-search {
        width: 100%;
        flex: none;
    }

    .filter-toggle-btn {
        flex-shrink: 0;
        height: 42px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
        margin: 0 !important;
    }

    /* Hide result count on mobile to prevent layout blowout */
    .toolbar-count {
        display: none !important;
    }

    /* Align sorting dropdown right next to filter button */
    .toolbar-meta {
        flex: 1;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        align-self: center !important;
        margin: 0 !important;
    }

    .toolbar-sort,
    .toolbar-sort .woocommerce-ordering,
    .toolbar-sort form,
    .woocommerce-ordering {
        margin: 0 !important;
        float: none !important;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        justify-content: flex-end !important;
    }

    .toolbar-sort select,
    .woocommerce-ordering select {
        height: 42px !important;
        width: 100% !important;
        max-width: 180px !important;
        min-width: 130px !important;
        padding: 0 24px 0 10px !important;
        background-position: right 8px center !important;
        font-size: 12.5px !important;
        margin: 0 !important;
    }
}

/* 2-col cards on mobile */
@media (max-width: 500px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .product-card .card-body {
        padding: 12px 10px 14px !important;
    }

    .product-card .card-title {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }

    .product-card .card-price {
        font-size: 15px !important;
        margin-bottom: 5px !important;
    }

    .product-card .card-rating {
        margin-bottom: 10px !important;
        gap: 4px !important;
    }

    .product-card .card-rating .star-rating {
        font-size: 11px !important;
    }

    .product-card .rating-count {
        font-size: 10px !important;
    }

    .card-atc a.button,
    .card-atc button.button {
        height: 36px !important;
        font-size: 10px !important;
        letter-spacing: 0.2px !important;
        gap: 4px !important;
    }

    .card-atc a.button::before,
    .card-atc button.button::before {
        width: 12px !important;
        height: 12px !important;
    }

    .shop-content-section {
        padding: 20px 0 60px;
    }
}

/* ==========================================================
   SHOP HERO CAROUSEL
   ========================================================== */
/* ==========================================
   Shop Hero Carousel
========================================== */

.shop-hero-carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    overflow: hidden;
}

.shop-hero-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.shop-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease;
    z-index: 1;
}

.shop-hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.shop-hero-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

@media (max-width: 960px) {
    .shop-hero-carousel {
        height: auto;
        aspect-ratio: 3.2 / 1;
    }
}

@media (max-width: 480px) {
    .shop-hero-carousel {
        height: auto;
        aspect-ratio: 3.2 / 1;
        margin-bottom: 20px;
    }

    .shop-hero-dots {
        bottom: 12px;
        gap: 6px;
    }

    .shop-hero-dot {
        width: 7px;
        height: 7px;
    }
}