.custom-cart-box {
    border: 1px solid #ccc;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    max-width: 300px;
    font-family: sans-serif;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.clear-cart {
    color: #aa0000;
    text-decoration: none;
    font-weight: bold;
}

.cart-item {
    margin-bottom: 8px;
}

.item-line {
    font-size: 15px;
    margin-bottom: 2px;
}

.remove-link {
    font-size: 13px;
    color: #0073aa;
    text-decoration: underline;
}

.cart-totals {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
    font-size: 15px;
}

.checkout-button {
    display: block;
    text-align: center;
    background: #852471;
    color: #fff;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
}

a.checkout-button:hover {
    color: black;
}

.astra-shop-summary-wrap a.ast-loop-product__link {
    pointer-events: none;
}

/* Desktop only box stays as is */
.desktop-cart-view {
    display: block;
}

td.product-name {
    display: contents !important;
}

.addon-list {
    font-size: 13px;
}

/* Inside Quick View*/

h2.quickview-title {
    margin-bottom: 0px !important;
    font-size: 22px;
}

.woocommerce-product-details__short-description p {
    margin-bottom: 5px;
}

.pizza-addons h3 {
    font-size: 20px;
}

p.pizza-addon-counter {
    margin-bottom: 0px !important;
}

.quickview-body-scrollable {
    padding-bottom: 0px;
}

.quickview-footer {
    padding: 0px;
}

button.mfp-close {
    opacity: 1;
    color: white !important;
}

@media screen and (max-width: 600px) {
    .desktop-cart-view {
        display: none;
    }
}

/* =========================================================================
   Sticky cart bar + slide-up basket
   (selectors are prefixed with .rwd-cmcs to beat theme button styles)
   ========================================================================= */

.rwd-cmcs {
    --rwd-green: #852471;
    --rwd-green-dark: #601a51;
    --rwd-green-soft: #f2f7ea;
    --rwd-ink: #1c2130;
    --rwd-muted: #6b7280;
    --rwd-line: #e7eae2;
    --rwd-danger: #c0392b;
    --rwd-radius: 12px;
    font-family: inherit;
}

.rwd-cmcs .rwd-ico {
    display: block;
    flex: none;
}

.rwd-cmcs .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.rwd-cmcs button {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    box-shadow: none;
}

/* ---------- sticky bar ---------- */

.rwd-cmcs .mobile-cart-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    align-items: center;
    gap: 8px;
    padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
    background: var(--rwd-green);
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
}

/* Fixed controls must be sized against the phone viewport, not their
 * shortcode's original container. This keeps the app-style basket bar inside
 * the screen even when the menu layout is wider than the visual viewport. */
@media (max-width: 767px) {
    .rwd-cmcs .mobile-cart-bar {
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        min-height: 56px;
        box-sizing: border-box;
        gap: 6px;
        padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    }

    .rwd-cmcs .mobile-cart-bar .rwd-bar-view {
        gap: 7px;
        overflow: hidden;
        padding: 2px 0;
    }

    .rwd-cmcs .rwd-bar-text {
        gap: 5px;
        overflow: hidden;
    }

    .rwd-cmcs .rwd-bar-label {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px;
    }

    .rwd-cmcs .rwd-bar-total { font-size: 14px; }

    .rwd-cmcs .mobile-cart-bar .checkout-btn-inline {
        min-width: 88px;
        min-height: 38px;
        justify-content: center;
        padding: 8px 11px;
        font-size: 12px;
        white-space: nowrap;
    }

    body.rwd-mobile-cart-visible {
        padding-bottom: calc(var(--rwd-mobile-cart-offset, 56px) + 8px);
    }

    .rwd-cmcs .cart-slide-panel {
        left: 0 !important;
        right: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top))) !important;
        box-sizing: border-box;
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.rwd-cmcs .mobile-cart-bar.is-visible {
    display: flex;
}

body.rwd-mobile-cart-visible {
    padding-bottom: var(--rwd-mobile-cart-offset, 0px);
}

.rwd-cmcs .mobile-cart-bar .rwd-bar-view {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 2px 4px;
    background: transparent;
    color: #fff;
    border: 0;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
}

.rwd-cmcs .mobile-cart-bar .rwd-bar-view:focus-visible,
.rwd-cmcs .mobile-cart-bar .checkout-btn-inline:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.rwd-cmcs .rwd-bar-bag {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.rwd-cmcs .rwd-bar-bag .rwd-ico {
    width: 16px;
    height: 16px;
}

.rwd-cmcs .rwd-bar-count {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--rwd-ink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--rwd-green);
}

/* label + total on one line keeps the bar short */
.rwd-cmcs .rwd-bar-text {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rwd-cmcs .rwd-bar-label {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    white-space: nowrap;
}

.rwd-cmcs .rwd-bar-label .rwd-ico {
    width: 13px;
    height: 13px;
}

.rwd-cmcs .rwd-bar-total {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.rwd-cmcs .rwd-bar-total .woocommerce-Price-amount,
.rwd-cmcs .rwd-bar-total bdi {
    color: inherit;
}

.rwd-cmcs .mobile-cart-bar .checkout-btn-inline {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 7px;
    background: #fff;
    color: var(--rwd-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ---------- backdrop ---------- */

.rwd-cmcs .rwd-cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(17, 20, 28, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.rwd-cmcs .rwd-cart-backdrop.active {
    opacity: 1;
}

.rwd-cmcs .rwd-cart-backdrop[hidden] {
    display: none;
}

html.rwd-cart-lock,
html.rwd-cart-lock body {
    overflow: hidden;
}

/* ---------- panel (bottom sheet on phones) ---------- */

.rwd-cmcs .cart-slide-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    max-height: 88dvh;
    background: #fff;
    color: var(--rwd-ink);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s;
}

.rwd-cmcs .cart-slide-panel.active {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s;
}

.rwd-cmcs .cart-slide-panel.is-dragging {
    transition: none;
}

.rwd-cmcs .rwd-cart-handle {
    flex: none;
    display: flex;
    justify-content: center;
    padding: 10px 0 2px;
    touch-action: none;
}

.rwd-cmcs .rwd-cart-handle span {
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: #d5d9cf;
}

.rwd-cmcs .cart-slide-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rwd-cmcs .cart-slide-header {
    flex: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 20px 14px;
    border-bottom: 1px solid var(--rwd-line);
}

.rwd-cmcs .cart-slide-panel .cart-slide-header {
    touch-action: none;
}

.rwd-cmcs .rwd-cart-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--rwd-ink);
}

.rwd-cmcs .rwd-cart-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--rwd-muted);
}

.rwd-cmcs .cart-slide-header .rwd-cart-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f2ef;
    color: var(--rwd-ink);
    cursor: pointer;
}

.rwd-cmcs .cart-slide-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 20px;
}

.rwd-cmcs .rwd-cart-fulfilment {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--rwd-green-soft);
    color: #4a6a20;
    font-size: 13px;
    font-weight: 600;
}

.rwd-cmcs .rwd-cart-fulfilment .rwd-ico {
    width: 16px;
    height: 16px;
}

/* ---------- items ---------- */

.rwd-cmcs .rwd-cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rwd-cmcs .rwd-cart-item {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--rwd-line);
    transition: opacity 0.2s ease;
}

.rwd-cmcs .rwd-cart-item:last-child {
    border-bottom: 0;
}

.rwd-cmcs .rwd-cart-item.is-updating {
    opacity: 0.45;
    pointer-events: none;
}

.rwd-cmcs .rwd-ci-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rwd-cmcs .rwd-ci-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--rwd-ink);
}

.rwd-cmcs .rwd-ci-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--rwd-green-soft);
    color: #4a6a20;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.rwd-cmcs .rwd-ci-price {
    flex: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--rwd-ink);
}

.rwd-cmcs .rwd-ci-details {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--rwd-muted);
}

.rwd-cmcs .rwd-ci-details li {
    margin: 0;
}

.rwd-cmcs .rwd-ci-note {
    margin-top: 8px;
    padding: 6px 10px;
    border-left: 3px solid var(--rwd-green);
    border-radius: 0 6px 6px 0;
    background: #fafbf8;
    font-size: 13px;
    color: #444;
}

.rwd-cmcs .rwd-ci-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.rwd-cmcs .rwd-ci-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rwd-line);
    border-radius: 999px;
    background: #fff;
}

.rwd-cmcs .rwd-ci-stepper .rwd-ci-qty-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rwd-green-dark);
    cursor: pointer;
}

.rwd-cmcs .rwd-ci-stepper .rwd-ci-qty-btn .rwd-ico {
    width: 18px;
    height: 18px;
}

.rwd-cmcs .rwd-ci-stepper .rwd-ci-qty-btn:disabled {
    color: #c3c7bd;
    cursor: not-allowed;
}

.rwd-cmcs .rwd-ci-qty {
    min-width: 28px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.rwd-cmcs .rwd-ci-qty-fixed {
    font-size: 13px;
    font-weight: 600;
    color: var(--rwd-muted);
}

.rwd-cmcs .rwd-ci-actions .rwd-ci-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--rwd-danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.rwd-cmcs .rwd-ci-actions .rwd-ci-remove .rwd-ico {
    width: 17px;
    height: 17px;
}

.rwd-cmcs .rwd-ci-actions .rwd-ci-remove:hover {
    background: #fdecea;
}

/* ---------- footer ---------- */

.rwd-cmcs .cart-slide-footer {
    flex: none;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rwd-line);
    background: #fff;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.05);
}

.rwd-cmcs .rwd-cart-totals {
    margin: 0 0 12px;
    font-size: 14px;
}

.rwd-cmcs .rwd-cart-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
}

.rwd-cmcs .rwd-cart-totals dt,
.rwd-cmcs .rwd-cart-totals dd {
    margin: 0;
    font-weight: 400;
    color: var(--rwd-muted);
}

.rwd-cmcs .rwd-cart-totals .is-discount dd {
    color: var(--rwd-green-dark);
}

.rwd-cmcs .rwd-cart-totals .is-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed var(--rwd-line);
}

.rwd-cmcs .rwd-cart-totals .is-total dt,
.rwd-cmcs .rwd-cart-totals .is-total dd {
    font-size: 17px;
    font-weight: 700;
    color: var(--rwd-ink);
}

.rwd-cmcs .rwd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.rwd-cmcs .rwd-btn-primary,
.rwd-cmcs .rwd-btn-primary:visited {
    background: var(--rwd-green);
    color: #fff !important;
}

.rwd-cmcs .rwd-btn-primary:hover,
.rwd-cmcs .rwd-btn-primary:focus-visible {
    background: var(--rwd-green-dark);
    color: #fff !important;
}

.rwd-cmcs .rwd-cart-checkout {
    width: 100%;
}

.rwd-cmcs .rwd-cart-secondary {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.rwd-cmcs .rwd-cart-secondary .rwd-link {
    margin: 0;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    color: var(--rwd-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.rwd-cmcs .rwd-cart-secondary .rwd-cart-clear {
    color: var(--rwd-danger);
}

.rwd-cmcs .rwd-cart-secondary .rwd-cart-clear.is-confirm {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--rwd-danger);
    color: #fff;
    text-decoration: none;
}

/* ---------- empty state ---------- */

.rwd-cmcs .rwd-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px calc(36px + env(safe-area-inset-bottom));
    text-align: center;
}

.rwd-cmcs .rwd-cart-empty-ico {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--rwd-green-soft);
    color: var(--rwd-green-dark);
}

.rwd-cmcs .rwd-cart-empty-ico .rwd-ico {
    width: 30px;
    height: 30px;
}

.rwd-cmcs .rwd-cart-empty-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.rwd-cmcs .rwd-cart-empty-text {
    margin: 4px 0 20px;
    font-size: 14px;
    color: var(--rwd-muted);
}

/* ---------- error toast ---------- */

.rwd-cmcs .rwd-cart-toast {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    z-index: 2;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--rwd-ink);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.rwd-cmcs .rwd-cart-toast[hidden] {
    display: none;
}

.rwd-cmcs .cart-slide-panel.is-busy button {
    cursor: progress;
}

/* ---------- sidebar box (desktop column) ---------- */

.rwd-cmcs.rwd-cart-box {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--rwd-line);
    border-radius: 16px;
    background: #fff;
    color: var(--rwd-ink);
    font-family: inherit;
    box-shadow: 0 6px 24px rgba(28, 33, 48, 0.07);
}

.rwd-cmcs.rwd-cart-box .cart-slide-header {
    padding: 16px 18px 12px;
}

.rwd-cmcs.rwd-cart-box .rwd-cart-title {
    font-size: 18px;
}

.rwd-cmcs.rwd-cart-box .cart-slide-body {
    max-height: min(55vh, 520px);
    padding: 4px 18px;
}

.rwd-cmcs.rwd-cart-box .rwd-ci-name,
.rwd-cmcs.rwd-cart-box .rwd-ci-price {
    font-size: 14px;
}

.rwd-cmcs.rwd-cart-box .rwd-ci-stepper .rwd-ci-qty-btn {
    width: 32px;
    height: 32px;
}

.rwd-cmcs.rwd-cart-box .cart-slide-footer {
    padding: 14px 18px 16px;
    background: #fafbf8;
    box-shadow: none;
}

.rwd-cmcs.rwd-cart-box .rwd-btn {
    padding: 12px 18px;
    font-size: 15px;
}

.rwd-cmcs.rwd-cart-box .rwd-cart-secondary {
    justify-content: center;
}

.rwd-cmcs.rwd-cart-box .rwd-cart-empty {
    padding: 28px 18px;
}

.rwd-cmcs.rwd-cart-box .rwd-cart-toast {
    top: 58px;
}

.rwd-cmcs.rwd-cart-box.is-busy {
    cursor: progress;
}

/* ---------- tablets / desktop: right-hand drawer ---------- */

@media (min-width: 768px) {
    .rwd-cmcs .cart-slide-panel {
        left: auto;
        top: 0;
        width: 420px;
        max-width: 100%;
        max-height: none;
        border-radius: 20px 0 0 20px;
        transform: translateX(105%);
    }

    .rwd-cmcs .cart-slide-panel.active {
        transform: translateX(0);
    }

    .rwd-cmcs .rwd-cart-handle {
        display: none;
    }

    .rwd-cmcs .cart-slide-panel .cart-slide-header {
        padding-top: 22px;
    }

    .rwd-cmcs .mobile-cart-bar {
        justify-content: center;
    }

    .rwd-cmcs .mobile-cart-bar .rwd-bar-view {
        flex: 0 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rwd-cmcs .cart-slide-panel,
    .rwd-cmcs .cart-slide-panel.active,
    .rwd-cmcs .rwd-cart-backdrop {
        transition: none;
    }
}
