/* Cart drawer — slide-in panel (shared with product show) */
body.cart-drawer-open {
    overflow: hidden;
}
.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 94;
    background: rgba(17, 24, 39, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.cart-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.cart-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 95;
    display: flex;
    flex-direction: column;
    width: min(100vw, 420px);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
}
.cart-drawer.is-open {
    transform: translateX(0);
}
.cart-drawer__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.cart-drawer__footer {
    flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.cart-drawer-freeship {
    padding: 10px 16px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}
.cart-drawer-freeship--done {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    border-bottom-color: #bbf7d0;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}
.cart-drawer-freeship__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
}
.cart-drawer-freeship__text {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #78350f;
}
.cart-drawer-freeship__track {
    height: 6px;
    border-radius: 9999px;
    background: #fde68a;
    overflow: hidden;
}
.cart-drawer-freeship__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    transition: width 0.25s ease;
}
.cart-drawer-bill {
    padding: 12px 16px 10px;
    background: #f9fafb;
}
.cart-drawer-bill__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}
.cart-drawer-bill__row + .cart-drawer-bill__row {
    margin-top: 6px;
}
.cart-drawer-bill__row-value {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}
.cart-drawer-bill__row-value--free {
    color: #16a34a;
    font-weight: 700;
}
.cart-drawer-bill__row--error {
    color: #e2150c;
}
.cart-drawer-bill__shipping-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.cart-drawer-bill__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.cart-drawer-bill__total-value {
    font-size: 17px;
    color: #005366;
}
.cart-drawer-promo {
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fef3c7 100%);
    border-top: 2px solid #fb923c;
    border-bottom: 1px solid #fdba74;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.cart-drawer-promo__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.cart-drawer-promo__code {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #005366;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 3px 10px rgba(0, 83, 102, 0.35);
}
.cart-drawer-promo__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    color: #9a3412;
}
.cart-drawer-promo__sub {
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.35;
    color: #c2410c;
}
.cart-drawer-promo__form {
    display: flex;
    gap: 8px;
}
.cart-drawer-promo__input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}
.cart-drawer-promo__input:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.cart-drawer-promo__submit {
    flex-shrink: 0;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #ea580c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
    white-space: nowrap;
}
.cart-drawer-promo__submit:hover:not(:disabled) {
    background: #c2410c;
}
.cart-drawer-promo__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.cart-drawer-promo--success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-top: 2px solid #86efac;
    border-bottom: 1px solid #bbf7d0;
}
.cart-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}
.cart-popup-head__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.cart-popup-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #dcfce7;
    color: #16a34a;
    flex-shrink: 0;
}
.cart-popup-head__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}
.cart-popup-head__sub {
    margin: 2px 0 0;
    font-size: 0.875rem;
    color: #4b5563;
}
.cart-popup-head__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
}
.cart-popup-head__close:hover {
    color: #111827;
    background: #f3f4f6;
}
.cart-drawer__scroll .cart-popup-body {
    padding: 16px 20px 8px;
}
.cart-popup-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cart-popup-item {
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}
.cart-popup-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.cart-popup-item__inner {
    display: flex;
    gap: 16px;
}
.cart-popup-item__media {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
}
.cart-popup-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-popup-item__media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #9ca3af;
}
.cart-popup-item__name {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-popup-item__shop {
    margin: 0 0 8px;
    font-size: 0.75rem;
    color: #4b5563;
}
.cart-popup-item__shop a {
    color: #005366;
    font-weight: 500;
    text-decoration: none;
}
.cart-popup-item__shop a:hover {
    text-decoration: underline;
}
.cart-popup-item__variant {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
}
.cart-popup-item__custom {
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: #4b5563;
}
.cart-popup-item__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
.cart-popup-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cart-popup-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.cart-popup-qty__btn:hover:not(:disabled) {
    border-color: #005366;
    background: rgba(0, 83, 102, 0.06);
}
.cart-popup-qty__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.cart-popup-qty__value {
    min-width: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}
.cart-popup-item__price {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #005366;
    text-align: right;
}
.cart-popup-item__unit {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
}
.cart-popup-item__remove {
    padding: 4px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.cart-popup-item__remove:hover {
    color: #e2150c;
    background: rgba(226, 21, 12, 0.08);
}
.cart-popup-summary {
    padding: 0;
    background: transparent;
}
.cart-popup-actions {
    padding: 10px 16px 12px;
    background: #fff;
}
.cart-popup-actions__buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.cart-popup-actions__buttons .btn-cta,
.cart-popup-actions__buttons .btn-outline-petrol {
    flex: 1;
    min-height: 48px;
    justify-content: center;
    font-size: 0.9375rem;
}
.cart-popup-actions__continue {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #005366;
    text-align: center;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cart-popup-actions__continue:hover {
    color: #003d4d;
}
.cart-popup-recs {
    padding: 8px 20px 24px;
    background: #fff;
}
.cart-popup-recs__title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}
.cart-popup-recs__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.cart-popup-recs__empty {
    grid-column: 1 / -1;
    padding: 16px 0;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}
.cart-popup-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 0.9375rem;
    color: #9ca3af;
}
.cart-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 48px 24px;
}
@media (max-width: 640px) {
    .cart-drawer {
        width: 100vw;
    }
    .cart-popup-head,
    .cart-drawer__scroll .cart-popup-body,
    .cart-popup-summary,
    .cart-popup-actions,
    .cart-popup-recs {
        padding-left: 16px;
        padding-right: 16px;
    }
    .cart-popup-actions__buttons {
        flex-direction: column;
    }
}
