/*
 * Cart drawer items (woocommerce/cart/mini-cart.php).
 *
 *   [image]  Product name                         [trash]
 *            (variation pill)
 *            [ - 1 + ]                       ৳1150  ৳850
 *
 * Shoptimizer's drawer styles item rows with floats and absolutely positioned bits; this lays the
 * row out as a grid instead. Fixed px sizes: the desktop --herlan-font-* tokens are rem-based and come out at 12.8/13px here.
 */

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    min-height: 0;
    margin: 0;
    padding: 16px 0 !important;
    border-bottom: 1px solid #eef0f3;
    list-style: none;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item:last-child {
    border-bottom: 0;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-thumb {
    grid-column: 1;
    display: block;
    width: 92px;
    margin: 0;
    padding: 0;
    float: none;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-thumb img {
    display: block;
    position: static;
    float: none;
    width: 92px;
    height: auto;
    max-width: 100%;
    margin: 0;
    border-radius: 6px;
    object-fit: contain;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-name {
    display: block;
    margin: 0;
    padding: 0;
    padding-right: 34px;
    color: #111827;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Trash: top right of the row. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item a.remove {
    position: absolute;
    top: 14px;
    right: 0 !important;
    left: auto !important;
    z-index: 2;
    width: 28px;
    height: 28px;
    margin: 0;
}

/* Variation as a pill: "Tango Twist", with the attribute label dropped. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body dl.variation {
    display: inline-flex;
    flex-wrap: wrap;
    align-self: flex-start;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body dl.variation dt {
    display: none;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body dl.variation dd {
    display: inline-block;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 12px;
    line-height: 1.4;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body dl.variation dd p {
    margin: 0;
}

/* Stepper left, price right. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_container {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart {
    display: inline-flex;
    align-items: center;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_button {
    width: 28px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #111827;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_input {
    width: 32px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_input::-webkit-outer-spin-button,
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    flex: 1 1 auto;
    margin-left: auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    text-align: right;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price del {
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price ins {
    background: none;
    text-decoration: none;
}

/* Fallback row (item sold individually / no stepper): "1 × price" under the name. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-body > .quantity {
    display: block;
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

/* Selective-cart checkbox (added in front of the remove link) stays inline with the thumbnail. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-wpcse-minicart-checkbox {
    position: absolute;
    top: 14px;
    left: 0;
}

/* ── Drawer container: header, list, subtotal, buttons ──────────────────────
   One 20px gutter all round, one type scale (title 18, body 14, buttons 15) and 46px controls,
   like the checkout and account pages. Shoptimizer's own drawer rules use mixed sizes
   (17px title, 12px quantity, 14px and 18px buttons, 12px right padding on the list only). */
.shoptimizer-mini-cart-wrap .cart-drawer-heading {
    margin: 14px 20px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.shoptimizer-mini-cart-wrap .widget_shopping_cart {
    padding: 0 20px;
}

.shoptimizer-mini-cart-wrap ul.woocommerce-mini-cart {
    padding: 0 0 8px !important;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-name {
    font-size: 14px;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .shoptimizer-custom-quantity-mini-cart_input {
    font-size: 14px;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price {
    font-size: 15px;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__total {
    padding: 16px 0 12px;
    font-size: 15px;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__total strong,
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__total .amount {
    font-size: 15px;
    font-weight: 600;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__buttons a.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

/* Variation changer pill (opens the quick editor): swatch, chosen option, chevron. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-item-editable {
    display: block;
    align-self: flex-start;
    max-width: 100%;
    margin: 0;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-edit-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 30px;
    padding: 3px 10px 3px 5px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 12px;
    line-height: 1.2;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-edit-swatch {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-edit-attribute-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Cart page items on phones/tablets: same layout as the drawer ───────────
   [image]  Name                                   [trash]
            (option pill)
            [ - 2 + ]                          ৳499 (price)
   The cart row is a <tr> with absolutely positioned cells; here it is a grid. */
@media (max-width: 991px) {
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item {
        display: grid !important;
        grid-template-columns: 92px auto minmax(0, 1fr);
        grid-template-areas:
            "thumb name name"
            "thumb qty price";
        column-gap: 14px;
        row-gap: 8px;
        align-items: start;
        position: relative;
        padding: 16px !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td {
        position: static !important;
        width: auto !important;
        min-width: 0;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-thumbnail {
        grid-area: thumb;
        display: block !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-thumbnail img {
        display: block;
        width: 92px;
        height: auto;
        border-radius: 6px;
        object-fit: contain;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-name {
        grid-area: name;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-right: 34px !important;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-name .scwc-cart-item-editable {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        max-width: 100%;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-name .scwc-cart-edit-trigger {
        max-width: 100%;
        min-height: 34px;
        padding: 4px 12px 4px 6px;
        gap: 8px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-size: 14px;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-name .scwc-cart-edit-swatch {
        width: 24px;
        height: 24px;
        flex: 0 0 auto;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-name .scwc-cart-edit-attribute-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-quantity {
        grid-area: qty;
        display: block !important;
        align-self: center;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price {
        grid-area: price;
        display: flex !important;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: flex-end;
        align-self: center;
        gap: 6px;
        text-align: right;
        font-size: 15px;
        font-weight: 700;
        color: #111827;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price .amount,
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price ins {
        color: #111827;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price del,
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price del .amount {
        color: #6b7280;
        font-size: 12px;
        font-weight: 400;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-remove {
        position: absolute !important;
        top: 14px;
        right: 16px;
        display: flex !important;
        width: 28px !important;
        height: 28px;
        align-items: center;
        justify-content: center;
    }

    /* Stepper: plain - 2 +, like the drawer. */
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity {
        display: inline-flex;
        align-items: center;
        position: static;
        height: 30px;
        margin: 0;
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 991px) {
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity {
        display: inline-flex !important;
        align-items: center;
        width: auto !important;
        height: 30px !important;
        border: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity .quantity-nav {
        display: contents !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity .quantity-button {
        position: relative !important;
        inset: auto !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 28px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity .quantity-down { order: 1; }
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity input.qty {
        position: static !important;
        order: 2;
        width: 32px !important;
        height: 30px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
        box-shadow: none !important;
        color: #111827;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
    }
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item .quantity .quantity-up { order: 3; }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price,
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price .amount,
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price ins {
        color: #111827 !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price del,
    body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-price del .amount {
        color: #6b7280 !important;
    }
}

/* The item editor opened from the drawer must sit above it (the drawer is at the maximum z-index). */
.scwc-cart-edit-modal {
    z-index: 2147483647;
}

/* Image swatch inside the pill: the drawer's generic item-image rules (float, size) must not apply. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-edit-swatch img {
    position: static;
    float: none;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
}

/* Quick editor on wide screens (opened from the cart drawer, or the checkout's option pill).
   The cart page's wide layout (herlan-variation-changer.css) is for the full product editor; the quick
   editor was only styled inside max-width:782px. JS puts .scwc-quick-mode on the modal, and the
   phone rules are repeated here for that class, then the sheet is centred as a compact dialog. */
@media (min-width: 783px) {
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__dialog {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            width: 100%;
            max-width: none;
            height: auto;
            max-height: min(70dvh, calc(100dvh - 72px));
            margin: 0;
            /*border-radius: 10px 10px 0 0;*/
            box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.28);
            opacity: 1;
            transform: translateY(100%);
            transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .scwc-cart-edit-modal.scwc-quick-mode.is-open .scwc-cart-edit-modal__dialog {
            transform: translateY(0);
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__header {
            position: sticky;
            top: 0;
            z-index: 4;
            display: flex;
            min-height: 40px;
            justify-content: space-between;
            padding: 10px;
            border-bottom: 1px solid #e5e7eb;
            background: #fff;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__title {
            position: static;
            width: auto;
            height: auto;
            margin: 0;
            padding: 0;
            overflow: visible;
            clip: auto;
            color: #111827;
            font-size: 16px;
            /*font-weight: 700;*/
            line-height: 1.3;
            border: 0;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            /*background: #f3f4f6;*/
            color: #111827;
            font-size: 24px;
            line-height: 1;
            box-shadow: none;
            transform: none;
    }

    .scwc-cart-edit-modal.scwc-quick-mode.is-loading .scwc-cart-edit-modal__body {
            min-height: min(280px, calc(70dvh - 56px));
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content {
            max-width: none;
            padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-cart-edit-product-grid {
            grid-template-columns: 1fr;
            gap: 14px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor {
            display: block;
            gap: 18px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-quick-content {
            padding: 0 !important;
            background: #fff;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__gallery {
            padding: 10px 0 10px;
            background: #f7f7f7;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__media-strip {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: minmax(43%, 1fr);
            gap: 5px;
            overflow-x: auto;
            padding: 0 10px 0px;
            scroll-snap-type: x proximity;
            -webkit-overflow-scrolling: touch;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__media-card {
            display: flex;
            align-items: center;
            justify-content: center;
            aspect-ratio: 1.18 / 1;
            background: #f7f7f7;
            scroll-snap-align: start;
            overflow: hidden;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__media-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__heading {
            margin: 0;
            padding: 14px 12px 10px;
            border-bottom: 1px solid #f0f0f0;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__title {
            font-size: 16px;
            line-height: 1.25;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__price {
            font-size: 20px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__group,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__attribute {
            margin: 0;
            padding: 12px;
            border-bottom: 1px solid #f0f0f0;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__label {
            margin-bottom: 9px;
            font-size: 14px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__linked-products,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__option-list {
            flex-wrap: wrap;
            overflow-x: visible;
            padding-bottom: 2px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__linked-product,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__option--image {
            width: 35px;
            height: 35px;
            min-width: 35px;
            min-height: 35px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .herlan_single_product_tags,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .product_meta,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .commercekit-atc-sticky-tabs,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content form.commercekit_sticky-atc,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .commercekit_sticky-atc {
            display: none !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .woocommerce-product-gallery,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content #commercegurus-pdp-gallery-wrapper,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .commercegurus-gallery-wrap,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content div.product div.images {
            /*max-width: min(100%, 360px) !important;*/
            margin-left: auto !important;
            margin-right: auto !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .woocommerce-product-gallery .flex-viewport {
            max-height: 34vh;
            overflow: hidden;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .woocommerce-product-gallery img {
            max-height: 34vh;
            object-fit: contain;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .woocommerce-product-gallery .flex-control-thumbs {
            flex-wrap: nowrap;
            overflow-x: auto;
            padding-bottom: 4px;
            -webkit-overflow-scrolling: touch;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .woocommerce-product-gallery .flex-control-thumbs li {
            flex: 0 0 auto;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .summary.entry-summary,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper form.cart,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .summary.entry-summary form.cart,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .summary.entry-summary .variations_form,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .summary.entry-summary .woocommerce-variation-add-to-cart,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-product-action-row {
            position: static !important;
            inset: auto !important;
            transform: none !important;
            width: 100% !important;
            max-width: 100% !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper {
            display: block !important;
            margin: 10px 0 0 !important;
            padding: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            border: 0 !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper form.cart,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .summary.entry-summary .woocommerce-variation-add-to-cart {
            display: flex !important;
            align-items: stretch;
            gap: 8px;
            flex-wrap: nowrap;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-product-action-row {
            display: flex !important;
            gap: 8px;
            position: sticky !important;
            right: 0 !important;
            bottom: 0 !important;
            left: 0 !important;
            z-index: 3;
            padding: 10px !important;
            background: #fff !important;
            box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08) !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-product-action-row > .quantity {
            flex: 0 0 122px !important;
            width: 122px !important;
            min-width: 122px !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-cart-quick-editor__quantity {
            display: inline-grid !important;
            grid-template-columns: 38px 46px 38px !important;
            flex: 0 0 122px !important;
            width: 122px !important;
            min-width: 122px !important;
            max-width: 122px !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper .quantity {
            flex: 0 0 74px !important;
            min-width: 74px !important;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .mobile-add-to-cart-wrapper .single_add_to_cart_button,
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content .scwc-product-action-row .single_add_to_cart_button {
            flex: 1 1 auto !important;
            min-height: 40px !important;
            border-radius: 4px !important;
            background: #000 !important;
            color: #fff !important;
            font-weight: 700 !important;
            letter-spacing: 0 !important;
            height: 40px;
            line-height: 40px;
    }

    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__dialog {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: 460px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 48px);
        border-radius: 8px;
        transform: translate(-50%, -46%);
        opacity: 0;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .scwc-cart-edit-modal.scwc-quick-mode.is-open .scwc-cart-edit-modal__dialog {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-name:hover {
    color: var(--herlan-primary-color, #eb161e);
}

/* ── Prices on phones and tablets: one step smaller everywhere in the cart, and on product cards ───────
   Cart drawer 15 -> 13, subtotal 15 -> 14, struck-through price 11 -> 10, product cards 13 -> 12. */
@media (max-width: 991px) {
    .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price,
    .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price .amount {
        font-size: 13px;
    }

    .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price del,
    .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .herlan-mc-price del .amount {
        font-size: 10px;
    }

    .shoptimizer-mini-cart-wrap p.woocommerce-mini-cart__total.total,
    .shoptimizer-mini-cart-wrap p.woocommerce-mini-cart__total.total strong,
    .shoptimizer-mini-cart-wrap p.woocommerce-mini-cart__total.total .amount {
        font-size: 14px !important;
    }

    ul.products li.product .price,
    ul.products li.product .price .amount,
    ul.products li.product .price ins,
    ul.products li.product .price ins .amount {
        font-size: 12px;
    }

    ul.products li.product .price del,
    ul.products li.product .price del .amount {
        font-size: 10px;
    }
}

/* Same for the drawer pill: no 80px / 11px cap on the option value. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item .scwc-cart-edit-attribute-name {
    max-width: none;
    color: inherit;
    font-size: inherit;
    line-height: 1.2;
}

/* ── Item editor (quick editor): attribute labels capitalised, price like the cart's price ───────────────
   "variant: Sunset Beads" -> "Variant: Sunset Beads"; price = struck-through regular price (grey, small), bold
   sale price in the text colour, and the discount as the same pink pill used on cart lines. */
.scwc-cart-edit-modal .scwc-cart-quick-editor__label::first-letter {
    text-transform: uppercase;
}

.scwc-cart-edit-modal .scwc-cart-quick-editor__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.scwc-cart-edit-modal .scwc-cart-quick-editor__price .amount,
.scwc-cart-edit-modal .scwc-cart-quick-editor__price ins {
    color: #111827;
    font-size: inherit;
    font-weight: 700;
    text-decoration: none;
    background: none;
}

.scwc-cart-edit-modal .scwc-cart-quick-editor__price del,
.scwc-cart-edit-modal .scwc-cart-quick-editor__price del .amount {
    color: #6b7280;
    font-size: 13px;
    font-weight: 400;
}

.scwc-cart-edit-modal .scwc-cart-quick-editor__price .herlan-inline-discount-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    background: #ffe4e4;
    color: #e4002b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .scwc-cart-edit-modal .scwc-cart-quick-editor__price {
        font-size: 16px;
    }
}

/* ── Item editor gallery: like the product page's mobile gallery ─────────────────────────────────────
   One square image per swipe with a peek of the next one, no scrollbar, and an "n/total" counter at the
   bottom right (the product page's "1/7" pill). */
.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor .scwc-cart-quick-editor__gallery {
    padding: 0;
    background: #fff;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__media {
    position: relative;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor .scwc-cart-quick-editor__media-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% - 14px);
    gap: 0;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__media-strip::-webkit-scrollbar {
    display: none;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor .scwc-cart-quick-editor__media-card {
    aspect-ratio: 1 / 1;
    background: #fff;
    scroll-snap-align: start;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor .scwc-cart-quick-editor__media-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__counter {
    position: absolute;
    right: 18px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
}

/* The editor body scrolls inside the sheet. With the square gallery the content is taller than the sheet, and the
   body was not a scroll container, so the quantity and "Update cart" row (sticky at the bottom) was cut off. */
.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__dialog {
    display: flex;
    flex-direction: column;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* "Update cart" row: position:sticky only pins inside its parent's box, and its parents (the form, the summary)
   are only as tall as their own content. Letting those wrappers dissolve makes the editor body the row's
   containing block, so it stays at the bottom of the sheet while the rest scrolls. */
.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__content {
    overflow: visible;
}

.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor,
.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__summary,
.scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-quick-editor__form {
    display: contents;
}

/* Drawer stepper: flat. Shoptimizer gives the quantity box and its buttons a shadow and a tinted background. */
.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item :is(.shoptimizer-custom-quantity-mini-cart_container, .shoptimizer-custom-quantity-mini-cart, .shoptimizer-custom-quantity-mini-cart_button, .shoptimizer-custom-quantity-mini-cart_input) {
    box-shadow: none !important;
    background: none !important;
    border: 0 !important;
    filter: none !important;
}

/* ── Drawer layout: full-width item dividers, padding on the items, summary block ────────────────────────
   The 20px gutter used to sit on the container, which inset every divider. It now sits on each item and
   section, so the borders run edge to edge. */
.shoptimizer-mini-cart-wrap .widget_shopping_cart {
    padding: 0 !important;
}

.shoptimizer-mini-cart-wrap ul.woocommerce-mini-cart {
    padding: 0 !important;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item {
    padding: 16px 20px !important;
    border-bottom: 1px solid #eef0f3 !important;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item:last-child {
    border-bottom: 1px solid #eef0f3 !important;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item a.remove {
    right: 20px !important;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary {
    display: block;
    margin: 0 !important;
    padding: 14px 20px 6px !important;
    font-size: 13px !important;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    color: #4b5563;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary__value,
.shoptimizer-mini-cart-wrap .herlan-mc-summary__value .amount {
    color: #111827;
    font-size: 13px;
    font-weight: 500;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary__row--total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid #eef0f3;
    color: #111827;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary__row--total .herlan-mc-summary__label,
.shoptimizer-mini-cart-wrap .herlan-mc-summary__row--total .herlan-mc-summary__value,
.shoptimizer-mini-cart-wrap .herlan-mc-summary__row--total .herlan-mc-summary__value .amount {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.shoptimizer-mini-cart-wrap .woocommerce-mini-cart__buttons {
    padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}

/* A drawer cached in the browser from before the summary block (markup: <p class="woocommerce-mini-cart__total">
   with a bare "Subtotal:" line) keeps its gutter until the next cart change refreshes it. */
.shoptimizer-mini-cart-wrap p.woocommerce-mini-cart__total {
    padding: 14px 20px 6px !important;
    margin: 0 !important;
}

/* Drawer header: gutter as padding so its bottom border also runs the full width. */
.shoptimizer-mini-cart-wrap .cart-drawer-heading {
    margin: 0 !important;
    padding: 14px 20px !important;
}

.shoptimizer-mini-cart-wrap .herlan-mc-summary .woocommerce-Price-currencySymbol {
    position: static;
    vertical-align: baseline;
}

/* The hairline under the header is a ::before on the list, offset by -20px for Shoptimizer's own padded container. */
.shoptimizer-mini-cart-wrap ul.woocommerce-mini-cart::before {
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Phones: the item editor sheet is as tall as its content (the original cap was 70% of the screen, which put the
   gallery, price and options behind an inner scroll). It only scrolls when the content is taller than the screen. */
@media (max-width: 782px) {
    .scwc-cart-edit-modal.scwc-quick-mode .scwc-cart-edit-modal__dialog {
        height: auto;
        max-height: calc(100dvh - 16px);
    }

    .scwc-cart-edit-modal.scwc-quick-mode.is-loading .scwc-cart-edit-modal__body {
        min-height: 280px;
    }
}
