/* ── Cart Badge ── */
.apollo-cart-trigger {
    position: relative;
    display: flex;
    align-items: center;
}

.apollo-cart-badge {
    position: absolute;
    top: clamp(-0.4rem, -0.8vw, -0.375rem);
    right: clamp(-0.55rem, -1vw, -0.5rem);
    min-width: clamp(1rem, 2.2vw, 1.125rem);
    height: clamp(1rem, 2.2vw, 1.125rem);
    border-radius: 50%;
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-size: clamp(0.5625rem, 1.2vw, 0.625rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.apollo-cart-badge.hidden {
    display: none;
}

.apollo-cart-badge.bump {
    transform: scale(1.3);
}

/* ── Cart Drawer Overlay ── */
.apollo-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.apollo-cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ── Cart Drawer Panel ── */
.apollo-cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(20rem, 35vw, 26.25rem);
    max-width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -0.5rem 0 1.875rem rgba(0, 0, 0, 0.1);
}

.apollo-cart-overlay.visible .apollo-cart-drawer {
    transform: translateX(0);
}

.apollo-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.25rem, 3vw, 1.5rem);
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.apollo-cart-drawer-header h3 {
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    font-weight: 700;
    margin: 0;
}

.apollo-cart-close {
    width: clamp(1.75rem, 3.5vw, 2rem);
    height: clamp(1.75rem, 3.5vw, 2rem);
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    color: #333;
}

.apollo-cart-close:hover {
    background: #e5e5e5;
}

/* ── Cart Items ── */
.apollo-cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.apollo-cart-empty {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.25rem, 3vw, 1.5rem);
    color: #999;
}

.apollo-cart-empty p {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
}

.apollo-cart-empty a {
    color: #3fbcac;
    text-decoration: none;
    font-weight: 600;
}

.apollo-cart-item {
    display: flex;
    gap: clamp(0.875rem, 2vw, 1.125rem);
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.25rem, 3vw, 1.5rem);
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.apollo-cart-item-img {
    width: clamp(3.5rem, 8vw, 4.5rem);
    height: clamp(3.5rem, 8vw, 4.5rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: #f7f7f8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.apollo-cart-item-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.apollo-cart-item-info {
    flex: 1;
    min-width: 0;
}

.apollo-cart-item-name {
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
    font-weight: 700;
    margin-bottom: clamp(0.125rem, 0.5vw, 0.25rem);
}

.apollo-cart-item-variant {
    font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
    color: #999;
    margin-bottom: clamp(0.5rem, 1.2vw, 0.75rem);
}

.apollo-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: clamp(0.625rem, 1.5vw, 0.75rem);
    gap: clamp(0.625rem, 1.5vw, 0.75rem);
}

.apollo-cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: clamp(0.375rem, 0.8vw, 0.5rem);
}

.apollo-cart-item-qty button {
    width: clamp(1.75rem, 3.8vw, 2.25rem);
    height: clamp(1.75rem, 3.8vw, 2.25rem);
    border: none;
    background: #fff;
    font-size: clamp(0.875rem, 1.8vw, 1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.1s;
    flex-shrink: 0;
}

.apollo-cart-item-qty button:hover {
    background: #f5f5f5;
}

.apollo-cart-item-qty span {
    min-width: clamp(1.75rem, 3.8vw, 2.25rem);
    text-align: center;
    font-size: clamp(0.8125rem, 1.6vw, 0.875rem);
    font-weight: 600;
    line-height: clamp(1.75rem, 3.8vw, 2.25rem);
}

.apollo-cart-item-price {
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
    font-weight: 700;
    white-space: nowrap;
}

.apollo-cart-item-remove {
    flex-shrink: 0;
    width: clamp(1.25rem, 2.8vw, 1.5rem);
    height: clamp(1.25rem, 2.8vw, 1.5rem);
    border: none;
    background: none;
    color: #ccc;
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    margin-top: 0.125rem;
}

.apollo-cart-item-remove:hover {
    color: #e74c3c;
}

/* ── Cart Footer ── */
.apollo-cart-drawer-footer {
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1.25rem, 3vw, 1.5rem);
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.apollo-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.apollo-cart-subtotal-label {
    font-size: clamp(0.8125rem, 1.6vw, 0.875rem);
    color: #666;
    font-weight: 600;
}

.apollo-cart-subtotal-value {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    font-weight: 700;
}

.apollo-cart-footer-btns {
    display: flex;
    flex-direction: column;
    gap: clamp(0.375rem, 1vw, 0.5rem);
}

.apollo-cart-checkout-btn {
    display: block;
    text-align: center;
    padding: clamp(0.75rem, 1.8vw, 0.875rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.8125rem, 1.6vw, 0.875rem);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.apollo-cart-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.375rem 1.25rem rgba(63, 188, 172, 0.25);
}

.apollo-cart-view-btn {
    display: block;
    text-align: center;
    padding: clamp(0.625rem, 1.5vw, 0.75rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
    text-decoration: none;
    transition: background 0.15s;
}

.apollo-cart-view-btn:hover {
    background: #e8e8e8;
}

/* ── Promo Code ── */
.apollo-promo {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.apollo-promo-toggle {
    font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
    color: #3fbcac;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    padding: 0;
    margin-bottom: clamp(0.5rem, 1.2vw, 0.625rem);
    display: block;
    transition: color 0.15s;
}

.apollo-promo-toggle:hover {
    color: #2d9a8c;
}

.apollo-promo-form {
    display: flex;
    gap: clamp(0.375rem, 0.8vw, 0.5rem);
}

.apollo-promo-form.hidden {
    display: none;
}

.apollo-promo-input {
    flex: 1;
    padding: clamp(0.5rem, 1.2vw, 0.625rem) clamp(0.625rem, 1.5vw, 0.75rem);
    border: 1px solid #ddd;
    border-radius: clamp(0.375rem, 0.8vw, 0.5rem);
    font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    transition: border-color 0.15s;
}

.apollo-promo-input:focus {
    outline: none;
    border-color: #3fbcac;
    box-shadow: 0 0 0 clamp(0.125rem, 0.3vw, 0.1875rem) rgba(63, 188, 172, 0.1);
}

.apollo-promo-apply {
    padding: clamp(0.5rem, 1.2vw, 0.625rem) clamp(0.75rem, 1.8vw, 1rem);
    border: none;
    border-radius: clamp(0.375rem, 0.8vw, 0.5rem);
    background: #111;
    color: #fff;
    font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.apollo-promo-apply:hover {
    background: #333;
}

.apollo-promo-message {
    font-size: clamp(0.6875rem, 1.3vw, 0.75rem);
    margin-top: clamp(0.25rem, 0.6vw, 0.375rem);
    line-height: 1.4;
}

.apollo-promo-message.success {
    color: #16a34a;
}

.apollo-promo-message.error {
    color: #e74c3c;
}

.apollo-promo-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: clamp(0.375rem, 0.8vw, 0.5rem);
    padding: clamp(0.5rem, 1.2vw, 0.625rem) clamp(0.625rem, 1.5vw, 0.75rem);
}

.apollo-promo-applied-info {
    display: flex;
    align-items: center;
    gap: clamp(0.375rem, 0.8vw, 0.5rem);
}

.apollo-promo-applied-code {
    font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    color: #16a34a;
}

.apollo-promo-applied-desc {
    font-size: clamp(0.625rem, 1.2vw, 0.6875rem);
    color: #666;
}

.apollo-promo-remove {
    border: none;
    background: none;
    color: #999;
    font-size: clamp(0.875rem, 1.8vw, 1rem);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.apollo-promo-remove:hover {
    color: #e74c3c;
}

.apollo-cart-discount-row,
.cart-summary-row.discount,
.checkout-summary-row.discount {
    color: #16a34a;
}

/* ── Full Cart Page ── */
.cart-page {
    max-width: 68.75rem;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3.5vw, 3rem);
}

.cart-page h1 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead th {
    text-align: left;
    font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: #999;
    padding: 0 0 clamp(0.625rem, 1.5vw, 0.75rem);
    border-bottom: 2px solid #eee;
}

.cart-table tbody td {
    padding: clamp(1rem, 2.5vw, 1.25rem) 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cart-table .cart-col-product {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
}

.cart-table .cart-col-img {
    width: clamp(3.5rem, 7vw, 4.5rem);
    height: clamp(3.5rem, 7vw, 4.5rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: #f7f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-table .cart-col-img img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
}

.cart-table .cart-col-name {
    font-weight: 700;
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
}

.cart-table .cart-col-variant {
    font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
    color: #999;
}

.cart-table .cart-col-price {
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
    color: #555;
}

.cart-table .cart-col-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: clamp(0.375rem, 1vw, 0.5rem);
    width: fit-content;
}

.cart-table .cart-col-qty button {
    width: clamp(1.875rem, 4vw, 2.125rem);
    height: clamp(1.875rem, 4vw, 2.125rem);
    border: none;
    background: #fff;
    font-size: clamp(0.875rem, 2vw, 1rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    flex-shrink: 0;
}

.cart-table .cart-col-qty button:hover {
    background: #f5f5f5;
}

.cart-table .cart-col-qty span {
    min-width: clamp(2rem, 4vw, 2.25rem);
    text-align: center;
    font-size: clamp(0.8125rem, 1.6vw, 0.875rem);
    font-weight: 600;
    line-height: clamp(1.875rem, 4vw, 2.125rem);
}

.cart-table .cart-col-total {
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
    font-weight: 700;
}

.cart-table .cart-col-remove button {
    border: none;
    background: none;
    color: #ccc;
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    cursor: pointer;
    transition: color 0.15s;
}

.cart-table .cart-col-remove button:hover {
    color: #e74c3c;
}

.cart-summary {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.cart-summary-box {
    width: clamp(18rem, 35vw, 22.5rem);
    max-width: 100%;
    background: #f9fafb;
    border-radius: clamp(0.625rem, 1.5vw, 0.75rem);
    padding: clamp(1.25rem, 3vw, 1.5rem);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.625rem, 1.5vw, 0.75rem);
    font-size: clamp(0.8125rem, 1.6vw, 0.875rem);
}

.cart-summary-row.total {
    margin-top: clamp(0.625rem, 1.5vw, 0.75rem);
    padding-top: clamp(0.625rem, 1.5vw, 0.75rem);
    border-top: 2px solid #eee;
    margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
}

.cart-summary-row.total span:last-child {
    font-size: clamp(1.25rem, 2.5vw, 1.375rem);
    font-weight: 700;
}

.cart-summary-checkout {
    display: block;
    width: 100%;
    text-align: center;
    padding: clamp(0.75rem, 1.8vw, 0.875rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.875rem, 1.8vw, 0.9375rem);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: clamp(0.5rem, 1.2vw, 0.625rem);
}

.cart-summary-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.375rem 1.25rem rgba(63, 188, 172, 0.25);
}

.cart-summary-continue {
    display: block;
    text-align: center;
    color: #666;
    font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
    text-decoration: none;
}

.cart-summary-continue:hover {
    color: #3fbcac;
}

.cart-empty-state {
    text-align: center;
    padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 3vw, 1.25rem);
}

.cart-empty-state p {
    color: #999;
    font-size: clamp(0.875rem, 2vw, 1rem);
    margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
}

.cart-empty-state a {
    display: inline-block;
    padding: clamp(0.625rem, 1.5vw, 0.75rem) clamp(1.5rem, 3vw, 1.75rem);
    border-radius: clamp(0.5rem, 1.2vw, 0.625rem);
    background: linear-gradient(135deg, #6ee7b7, #3fbcac, #3a7bd5, #3d3370);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .apollo-cart-drawer {
        width: 100%;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        padding: clamp(0.75rem, 2vw, 1rem) 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: clamp(0.625rem, 1.5vw, 0.75rem);
    }

    .cart-table td {
        padding: 0;
        border: none;
    }

    .cart-summary {
        justify-content: stretch;
    }

    .cart-summary-box {
        width: 100%;
    }
}
