/* ============================================================
   isB2B – WooCommerce overrides
   Loaded on: shop, product, cart, checkout, my-account pages
   ============================================================ */

/* ---- V2 Portal: Inter font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- V2 Portal: full-bleed layout within Blocksy My Account ---- */
.is-portal-v2 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--ink);
}

/* Hide Blocksy's My Account nav on v2 pages */
.is-portal-v2 ~ .woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-navigation:has(~ .is-portal-v2) {
    display: none !important;
}

/* Hide the portal "new" tab from WC's account nav (it's a router, not a visible tab) */
.woocommerce-MyAccount-navigation li[class*="--new"] {
    display: none !important;
}

/* Give v2 content full width (WC limits it to .woocommerce-MyAccount-content max-width) */
.woocommerce-MyAccount-content:has(.is-portal-v2) {
    max-width: none;
    padding: 0;
    float: none;
    width: 100%;
}

/* ---- General ---- */
.woocommerce,
.woocommerce-page {
    font-size: 1rem;
}

/* Hide sale badges site-wide */
.onsale {
    display: none !important;
}

/* Featured category block title padding */
.wc-block-featured-category__title {
    padding: 0 20px 16px;
}

/* ---- Buttons ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 3px;
}

/* Primary brand colour on ALL .alt buttons — use !important to beat WC's purple
   (#7f54b3) which ships in woocommerce-general and loads before our stylesheet. */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: var(--theme-palette-color-1, #00aeef) !important;
    color: #fff !important;
    border-color: var(--theme-palette-color-1, #00aeef) !important;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: var(--theme-palette-color-2, #0090c8) !important;
    border-color: var(--theme-palette-color-2, #0090c8) !important;
}

/* Loop cards: "Select options" and "Add to cart" use .button without .alt —
   style them as the primary accent so all card CTAs match. */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button {
    background-color: var(--theme-palette-color-1, #00aeef);
    color: #fff;
    border-color: var(--theme-palette-color-1, #00aeef);
    border-radius: 4px;
    transition: background-color .15s, border-color .15s;
}
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product button.button:hover {
    background-color: var(--theme-palette-color-2, #0090c8);
    border-color: var(--theme-palette-color-2, #0090c8);
    color: #fff;
}

/* ============================================================
   Breadcrumb (archive + single product)
   ============================================================ */
.woocommerce-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-gray, #666);
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}
.woocommerce-breadcrumb a {
    color: var(--text-gray, #666);
    text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
    color: var(--theme-palette-color-1, #00aeef);
}

/* ============================================================
   Shop / category archive  (single top toolbar)
   ============================================================ */

/* Page heading — give it breathing room above the toolbar */
.woocommerce .page-title,
.woocommerce-products-header__title {
    font-size: 1.8rem;
    margin: 8px 0 20px;
}

/* Term description (if any) sits under the title, muted */
.woocommerce-products-header .term-description,
.woocommerce .term-description {
    color: var(--text-gray, #666);
    margin-bottom: 24px;
}

/* ── Shop page header: title row with sort icon aligned right ── */
.woocommerce-products-header {
    margin-bottom: 24px;
}
.woocommerce-products-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.woocommerce-products-header__row .woocommerce-products-header__title {
    margin: 0;
}

/* ── Sort control: <details>/<summary> icon trigger + link list ── */
.isb2b-sort-control {
    position: relative;
    flex-shrink: 0;
}
.isb2b-sort-trigger {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--isb2b-body, #4b4b4b);
    font-size: 0.875rem;
    font-weight: 500;
    user-select: none;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    background: #fff;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.isb2b-sort-trigger::-webkit-details-marker { display: none; }
.isb2b-sort-trigger::marker { display: none; }
.isb2b-sort-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.isb2b-sort-trigger:hover,
.isb2b-sort-control[open] .isb2b-sort-trigger {
    color: var(--isb2b-primary, #00aeef);
    border-color: var(--isb2b-primary, #00aeef);
}
.isb2b-sort-options {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    min-width: 190px;
    z-index: 200;
    padding: 4px 0;
}
.isb2b-sort-option {
    display: block;
    padding: 9px 16px;
    font-size: 0.875rem;
    color: var(--isb2b-dark, #333);
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.isb2b-sort-option:hover { background: var(--bg, #f4f5f7); color: var(--isb2b-primary, #00aeef); }
.isb2b-sort-option.is-active { color: var(--isb2b-primary, #00aeef); font-weight: 600; }

/* ── Result count — below the product grid as a quiet footnote ── */
.woocommerce-result-count {
    font-size: 0.8rem;
    color: var(--text-gray, #666);
    margin: 14px 0 0;
    text-align: center;
}

/* ---- Product grid ---- */

/* WC's woocommerce-layout.css applies a clearfix (::before / ::after content:' ')
   to ul.products for its float layout. Those pseudo-elements become grid items in
   our grid, creating one blank slot at the start and one at the end. Neutralise them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 24px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}
/* Override WC's float-based grid widths/margins (it sets width:22.05% etc.) */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.woocommerce ul.products li.product:hover {
    border-color: var(--theme-palette-color-1, #00aeef);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
/* Fixed-height image area so all cards align regardless of image aspect ratio */
.woocommerce ul.products li.product a.woocommerce-loop-product__link img,
.woocommerce ul.products li.product a img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: contain;
    border-radius: 4px;
    margin: 10px 0 14px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    padding: 0;
    margin: 0 0 4px;
    color: var(--isb2b-dark, #333);
    /* Clamp to exactly 2 lines so every card's title occupies the same height,
       keeping SKU / price / button aligned across cards in the same row. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 2);
}
/* Push price + button to the bottom so cards align regardless of title length */
.woocommerce ul.products li.product .price {
    color: var(--theme-palette-color-1, #00aeef);
    font-weight: 600;
    margin: auto 0 12px;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    margin: 0;
    width: 100%;
    text-align: center;
}

.isb2b-loop-sku {
    display: block;
    font-size: 0.78em;
    color: var(--text-gray, #666);
    margin: 2px 0 4px;
}

/* Tablet / mobile column counts */
@media (max-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
}
@media (max-width: 420px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
    .woocommerce ul.products li.product { padding: 10px 8px; }
    .woocommerce ul.products li.product a.woocommerce-loop-product__link img,
    .woocommerce ul.products li.product a img { height: 130px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 0.78rem; min-height: calc(1.4em * 2); }
}

/* Price skeleton — reserves layout space while AJAX price loads.
   :empty matches only until JS fills the span; no JS changes needed. */
.custom-ajax-price:empty {
    display: block;
    min-height: 1.4em;
    width: 72px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e0e0e0 25%, #ebebeb 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: isb2b-price-shimmer 1.2s ease-in-out infinite;
}

@keyframes isb2b-price-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Kit item labels — shimmer must be inline so it sits next to SKU/qty text */
.kit-group-details .custom-ajax-price:empty {
    display: inline-block;
    width: 5em;
    min-height: 1em;
    vertical-align: middle;
}

/* ============================================================
   Single product — clean two-column layout (gallery | summary)
   ============================================================ */

/* Replace WC's float layout with a grid.
   Row 1: gallery | summary. Row 2: tabs (full width). Row 3: related (full width).
   Tabs and related have z-index:3 + background:#fff so they slide cleanly over
   the sticky gallery as the user scrolls down. */
.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 24px 48px;
    margin-top: 24px;
    margin-bottom: 56px;
}
.single-product div.product > .woocommerce-product-gallery,
.single-product div.product > .summary {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

.single-product div.product > .woocommerce-product-gallery {
    grid-row: 1;
    align-self: start;
    overflow: hidden;
}

/* Gallery inner: thumbs column on left, main image on right */
.single-product .woocommerce-product-gallery {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: stretch !important;
}

/* Thumbs nav wrapper — JS injects this around .flex-control-thumbs to hold the
   up/down arrow buttons above and below the scrollable list. */
.single-product .woocommerce-product-gallery .isb2b-thumbs-nav {
    order: -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100px;
    flex-shrink: 0;
}

/* Up / down arrow buttons */
.single-product .woocommerce-product-gallery .isb2b-thumb-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 26px;
    flex-shrink: 0;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--theme-palette-color-3, #3a4f66);
    transition: color .15s;
}
.single-product .woocommerce-product-gallery .isb2b-thumb-arrow svg { width: 14px; height: 14px; }
.single-product .woocommerce-product-gallery .isb2b-thumb-arrow:hover:not(:disabled) {
    color: var(--isb2b-dark, #333);
}
.single-product .woocommerce-product-gallery .isb2b-thumb-arrow:disabled { opacity: 0.25; cursor: default; }

/* Thumbnail strip — fills the nav wrapper between the two arrows */
.single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: none;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
/* WC rule `.woocommerce div.product div.images .flex-control-thumbs li` is
   specificity (0,4,3) and sets width:25% + float:left. Need !important to beat it. */
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    width: 100px !important;
    height: 100px !important;
    float: none !important;
    flex-shrink: 0;
    list-style: none;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    opacity: 0.6 !important; /* WC sets opacity:.5 on unselected thumbs — slightly higher */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity .15s;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover {
    opacity: 1 !important;
}

/* Main image column — takes remaining width.
   Flexslider wraps .woocommerce-product-gallery__wrapper inside .flex-viewport,
   making .flex-viewport the flex item that must grow, not the wrapper. */
.single-product .woocommerce-product-gallery .flex-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    min-width: 0;
}

/* Flexslider's own prev/next arrow list is a direct child of the gallery and
   would otherwise sit in the flex row. We scroll via the thumbnail nav instead. */
.single-product .woocommerce-product-gallery .flex-direction-nav {
    display: none;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Magnifier icon — keep it inside the main image area */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}
.single-product div.product > .woocommerce-tabs {
    grid-column: 1 / -1;
}

/* Related / up-sells remain full-width below both columns */
.single-product div.product > .upsells,
.single-product div.product > .up-sells,
.single-product div.product > .related {
    grid-column: 1 / -1;
}

/* Summary column — consistent vertical rhythm between elements */
.single-product .summary.entry-summary > * {
    margin: 0 0 18px;
}
.single-product .summary .product_title {
    font-size: 1.7rem;
    line-height: 1.25;
    margin: 0 0 6px;
}
.isb2b-single-sku {
    display: block;
    font-size: 0.85em;
    color: var(--text-gray, #666);
    margin: 0 0 14px;
}
.single-product .summary .price {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--theme-palette-color-1, #00aeef);
    margin: 0 0 18px;
}
.single-product .summary .price .woocommerce-Price-amount { font-weight: 600; }
.single-product .summary .woocommerce-product-details__short-description {
    color: var(--isb2b-body, #4b4b4b);
    font-size: 0.95rem;
}
.single-product .summary .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* Stock status */
.single-product .summary .stock {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 14px;
}
.single-product .summary .stock.in-stock { color: #2a8a3e; }
.single-product .summary .stock.out-of-stock { color: #c0392b; }

/* ---- Variation selector (table.variations) → clean stacked rows ---- */
.single-product .variations_form .variations,
.single-product table.variations {
    border: 0;
    margin: 0 0 18px;
    width: 100%;
}
.single-product table.variations tbody,
.single-product table.variations tr {
    display: block;
}
.single-product table.variations tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.single-product table.variations th.label,
.single-product table.variations td.value {
    display: block;
    width: auto;
    padding: 0;
    text-align: left;
    border: 0;
}
.single-product table.variations th.label label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-gray, #666);
    margin: 0;
}
.single-product table.variations td.value {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.single-product table.variations select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%233a4f66' stroke-width='1.6' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 4px;
    padding: 10px 38px 10px 12px;
    font-size: 0.95rem;
    color: var(--isb2b-dark, #333);
    cursor: pointer;
    min-width: 220px;
    flex: 0 1 280px;
}
.single-product table.variations select:focus {
    border-color: var(--theme-palette-color-1, #00aeef);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
}
.single-product .reset_variations {
    font-size: 0.85rem;
    color: var(--text-gray, #666);
}

/* Per-variation price/availability panel */
.single-product .single_variation_wrap .woocommerce-variation {
    margin: 0 0 14px;
}
.single-product .single_variation .price {
    font-size: 1.3rem;
    margin: 0;
}

/* ---- Quantity + Add to cart row (simple + variable) ---- */
.single-product form.cart,
.single-product .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}
.single-product form.cart .quantity,
.single-product .woocommerce-variation-add-to-cart .quantity {
    margin: 0;
}
.single-product form.cart .quantity input.qty {
    width: 80px;
    height: 46px;
    padding: 8px 10px;
    border: 1px solid var(--theme-palette-color-5, #e1e8ed);
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
}
.single-product form.cart button.single_add_to_cart_button,
.single-product .woocommerce-variation-add-to-cart button.single_add_to_cart_button {
    min-height: 46px;
    padding: 0 28px;
    font-size: 1rem;
    border-radius: 4px;
    position: relative; /* anchors WC .loading spinner ::after */
}
/* Centre the spinning icon inside the button */
.single-product .single_add_to_cart_button.loading::after {
    top: 50%;
    transform: translateY(-50%);
}
/* Disabled add-to-cart (no variation chosen / out of stock) */
.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Related / up-sells heading */
.single-product .related > h2,
.single-product .up-sells > h2,
.single-product .upsells > h2 {
    font-size: 1.3rem;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-palette-color-5, #e1e8ed);
}

/* Product meta (categories / tags) */
.single-product .summary .product_meta {
    font-size: 0.85rem;
    color: var(--text-gray, #666);
    border-top: 1px solid var(--theme-palette-color-5, #e1e8ed);
    padding-top: 16px;
}
.single-product .summary .product_meta > span { display: block; margin-bottom: 4px; }

/* ---- Tabs ---- */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--theme-palette-color-1, #00aeef);
}

@media (max-width: 900px) {
    .single-product div.product {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .single-product div.product > .woocommerce-product-gallery {
        max-width: 100%;
        height: auto !important; /* overrides JS inline height from syncGalleryHeight */
    }
}

/* ---- Cart table ---- */
.woocommerce table.cart td,
.woocommerce table.cart th,
.wc-block-cart-items td,
.wc-block-cart-items th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 12px 8px;
    vertical-align: middle;
}

/* iOS Safari drops font-family on <td> when parent <tr> becomes display:grid
   (WC Blocks sets .wc-block-cart-items__row { display:grid } on mobile).
   Target the outer div container so all children inherit cleanly. */
.wc-block-cart {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wc-block-cart .wc-block-cart-item__wrap,
.wc-block-cart .wc-block-components-product-name,
.wc-block-cart .wc-block-cart-item__prices,
.wc-block-cart .wc-block-cart-item__quantity,
.wc-block-cart .wc-block-components-product-price,
.wc-block-cart .wc-block-components-formatted-money-amount,
.wc-block-cart .wc-block-components-product-price bdi,
.wc-block-cart .wc-block-components-formatted-money-amount bdi {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.woocommerce table.cart td.product-thumbnail img {
    max-width: 80px;
    border-radius: 3px;
}

.woocommerce table.cart input[type="number"] {
    max-width: 70px;
}

/* Cart totals */
.woocommerce .cart-collaterals .cart_totals {
    float: none;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

/* ---- Checkout ---- */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading {
    font-size: 1.15rem;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    border-radius: 3px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--theme-palette-color-1, #00aeef);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
}

/* Readonly billing email (set via functions.php) */
#billing_email[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

/* Order review table */
.woocommerce-checkout-review-order table.shop_table {
    border-collapse: collapse;
    width: 100%;
}

.woocommerce-checkout-review-order table.shop_table th,
.woocommerce-checkout-review-order table.shop_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e5e5;
}

/* ---- Order confirmation / thank-you ---- */
.woocommerce-order-received .woocommerce-thankyou-order-received {
    font-size: 1.1rem;
    color: #2a8a3e;
}


/* ---- My Account ---- */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: var(--theme-palette-color-1, #00aeef);
    color: #fff;
}

/* ---- Notices ---- */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--theme-palette-color-1, #00aeef);
}

.woocommerce-error {
    border-top-color: #c0392b;
}


div#customer_login {
    padding: 70px 0px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    div#customer_login {
    padding: 20px;
    margin: 30px;
    }
    .woocommerce table.cart td.product-remove,
    .woocommerce table.cart td.product-thumbnail {
        display: none;
    }

    .woocommerce .cart-collaterals .cart_totals {
        max-width: 100%;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100%;
        float: none;
    }
}

/* changes to order confirmation page - start*/
table.woocommerce-table.woocommerce-table--order-details.shop_table.order_details tfoot td, 
th.woocommerce-table__product-table.product-total, 
td.woocommerce-table__product-total.product-total {
    text-align: right;
}
 
small.shipped_via {
    display: none;
}

.woocommerce-customer-details address {
    padding: unset;
    margin-bottom: 20px;
    border: none;
}
/* changes to order confirmation page - end */

/* ---- Cart / mini-cart / checkout: SKU and UOM metadata ---- */

/* Cart block only: show native SKU/UOM metadata rows */
.wc-block-components-product-metadata {
    display: none;
}
.wc-block-cart .wc-block-components-product-metadata {
    display: block;
    margin-top: 4px;
}
.wc-block-cart .wc-block-components-product-metadata__description p {
    margin: 0;
    font-size: 11px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Mini-cart (PHP template): SKU/UOM via dl.variation — fix white label on Blocksy dark panel */
.ct-header-cart dl.variation,
.wc-block-mini-cart__drawer dl.variation {
    margin: 3px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1px 4px;
}
.ct-header-cart dl.variation dt,
.wc-block-mini-cart__drawer dl.variation dt {
    font-size: 11px;
    font-weight: 400;
    color: #888 !important;
    margin: 0;
}
.ct-header-cart dl.variation dd,
.wc-block-mini-cart__drawer dl.variation dd {
    font-size: 11px;
    color: #888 !important;
    margin: 0;
}


/* Checkout order review: align SKU/UOM label next to value */
.woocommerce-checkout-review-order dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 4px;
    margin: 3px 0 0;
}
.woocommerce-checkout-review-order dl.variation dt {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-gray);
    margin: 0;
}
.woocommerce-checkout-review-order dl.variation dd {
    font-size: 11px;
    color: var(--text-gray);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   Mobile — all screens ≤ 768px
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Product listing: reduced image height + tighter cards ── */
    .woocommerce ul.products li.product a.woocommerce-loop-product__link img,
    .woocommerce ul.products li.product a img { height: 160px; }
    .woocommerce ul.products li.product { padding: 12px 10px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 0.85rem; }
    /* Hide the Select options / Add to cart button — card taps through to product page */
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .added_to_cart { display: none; }

    /* ── Font sizes ── */
    .woocommerce-breadcrumb { font-size: 0.72rem; margin-bottom: 14px; }
    .woocommerce .woocommerce-products-header__title,
    .woocommerce .page-title,
    h1.page-title { font-size: 1.35rem; }
    .single-product .summary .product_title { font-size: 1.35rem; }
    .single-product .related h2,
    .single-product .up-sells h2,
    .single-product .upsells h2 { font-size: 1.1rem; margin-bottom: 18px; }

    /* ── Gallery: stack vertically — main image top, thumbs strip below ── */
    .single-product .woocommerce-product-gallery {
        flex-direction: column !important;
        gap: 0 !important;
    }
    /* Thumbs nav: pull below main image */
    .single-product .woocommerce-product-gallery .isb2b-thumbs-nav {
        order: 1;
        flex-direction: row;
        width: 100%;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        padding: 8px 0 0;
        gap: 6px;
    }
    .single-product .woocommerce-product-gallery .isb2b-thumbs-nav::-webkit-scrollbar { display: none; }
    /* Horizontal thumb strip */
    .single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex: unset;
        min-height: unset;
    }
    .single-product .woocommerce-product-gallery .flex-control-thumbs li {
        width: 64px !important;
        height: 64px !important;
    }
    /* Up/down arrows are for vertical scroll — hidden on mobile */
    .single-product .woocommerce-product-gallery .isb2b-thumb-arrow { display: none; }
}

.variation-SKU p {
    line-height: unset;
}

/* ---- Empty Cart button ---- */
.isb2b-empty-cart-btn {
    display: block;
    margin: 12px 0 0 auto;
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    border-radius: 3px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    margin: 10px;
    float: right;
}
.isb2b-empty-cart-btn:hover:not(:disabled) {
    border-color: #c0392b;
    color: #c0392b;
}
.isb2b-empty-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ── Checkout address selector ───────────────────────────────────────────── */
.is-ab-ship-to {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}
.is-ab-ship-to__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-gray);
    margin: 0 0 4px;
}
.is-ab-ship-to__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--isb2b-body);
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
}
.is-ab-ship-to__item:hover { border-color: #bbb; }
.is-ab-ship-to__item:has(input:checked) {
    border-color: var(--isb2b-primary);
    background: rgba(0,174,239,.04);
}
.is-ab-ship-to__item input[type="radio"] {
    margin: 3px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
 div.woocommerce .is-ab-ship-to__item input[type="radio"]:focus {
    outline: none !important;
}
.is-ab-ship-to__item span { flex: 1; }
.is-ab-ship-to__item--new { border-style: dashed; }
.is-ab-ship-to__item--new span { color: var(--theme-link-initial-color); font-weight: 400; font-size:15px;}
.woocommerce-shipping-fields span.error-message {display: none !important;}


/* Hidden pricing mode — guest login prompt */
.is-price-login-prompt {
    font-size: 0.85em;
    color: var(--text-gray);
}
.is-price-login-prompt a {
    color: var(--isb2b-primary);
    text-decoration: none;
    font-weight: 600;
}
.is-price-login-prompt a:hover {
    text-decoration: underline;
}

/* ── Fluid Checkout overrides ───────────────────────────────────────────────── */
.fc-checkout-notices {
    width: 100% !important;
}
