/* Modern header nav uses .ec-cart-trigger in-flow; see ec-mobile.css */
.ec-cart-trigger.ec-cart-trigger--legacy-fixed {
    position: fixed;
    top: 33px;
    right: 20px;
    z-index: 9;
    background: #eae9e9;
}

.ec-cart-panel .ec-cart-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
}

.ec-cart-panel .ec-cart-item:last-child {
    border-bottom: none;
}

/* Product media + title → details page */
.ec-cart-item-media-wrap {
    flex: 0 0 auto;
}
.ec-cart-item-media {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #0f172a;
    text-decoration: none !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.ec-cart-item-media:hover,
.ec-cart-item-media:focus-visible {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}
.ec-cart-item-media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
}
.ec-cart-item-img,
.ec-cart-item-video,
.ec-checkout-line-img,
.ec-checkout-line-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0f172a;
}
.ec-cart-item-video,
.ec-checkout-line-video {
    pointer-events: none;
}
.ec-cart-item-media:has(video),
.ec-checkout-line-media:has(video) {
    position: relative;
}
.ec-cart-item-media:has(video)::after,
.ec-checkout-line-media:has(video)::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
    pointer-events: none;
    z-index: 1;
}
.ec-cart-item-title {
    color: inherit;
    text-decoration: none !important;
}
.ec-cart-item-title:hover,
.ec-cart-item-title:focus-visible {
    color: #1d4ed8;
    text-decoration: underline !important;
    outline: none;
}

html[data-theme="dark"] .ec-cart-item-media {
    background: #121a2c;
    border-color: rgba(148, 163, 184, 0.18);
}
html[data-theme="dark"] .ec-cart-item-media:hover,
html[data-theme="dark"] .ec-cart-item-media:focus-visible {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
html[data-theme="dark"] .ec-cart-item-title:hover,
html[data-theme="dark"] .ec-cart-item-title:focus-visible {
    color: #7dd3fc;
}
html[data-theme="dark"] .ec-cart-panel .ec-cart-item {
    border-bottom-color: rgba(148, 163, 184, 0.12);
}
.ec-qty-field[hidden],
.ec-qty-field.is-gone {
    display: none !important;
}
.ec-product-buy.is-cart-full .ec-add-to-cart {
    width: 100%;
}
.ec-cart-item-focus {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
    border-radius: 0.5rem;
    background: rgba(37, 99, 235, 0.08);
}

.ec-cart-qty {
    width: 4rem;
}

.ec-cart-empty {
    color: #6c757d;
    padding: 2rem 0;
    text-align: center;
}

.ec-add-cart-row .input-group {
    padding: 10px;
}

/* Qty + Add to cart controls (shop cards + details) */
.ec-add-cart-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.ec-qty-field {
    flex: 0 0 auto;
    width: 4.75rem;
    min-width: 4.25rem;
}

.ec-qty-field .form-label {
    margin-bottom: 0.25rem;
}

.ec-qty-field .ec-qty-input,
.ec-qty-field .qtyClass {
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums;
    /* Prevent iOS zoom on focus (needs ≥16px) while staying compact */
    font-size: 1rem;
}

.ec-add-cart-btn-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.ec-add-cart-btn-wrap .ec-add-to-cart {
    white-space: nowrap;
}

.ec-add-cart-meta {
    min-width: 0;
}

.ec-checkout-page .ec-pay-panel .btn {
    font-weight: 600;
}

.ec-checkout-summary {
    position: sticky;
    top: 5.5rem;
}

#ecStoreCart .offcanvas-body {
    display: flex;
    flex-direction: column;
}

#ec-cart-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}