/* ── Sliding Cart Panel ─────────────────────────────────────────────────────── */

.sliding-cart-trigger {
    cursor: pointer;
    padding: 0 12px 0 0;
}

.sliding-cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,.1);
    z-index: 1000;
    transition: right .3s ease;
    display: flex;
    flex-direction: column;
}
.sliding-cart-panel.active { right: 0; }

.sliding-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
}
.sliding-cart-overlay.active { opacity: 1; visibility: visible; }

/* ── Header ─────────────────────────────────────────────────────────────────── */

.cart-header {
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.cart-header-content { display: flex; align-items: center; }
.cart-header h3      { margin: 0; font-size: 18px; font-weight: 600; }

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #666;
}
.close-cart:hover { color: #000; }

/* ── Cart items ─────────────────────────────────────────────────────────────── */

.cart-items {
    flex: 1;
    overflow: hidden;
    padding: 20px;
    min-height: 300px;
}
.cart-items.scrollable  { overflow-y: auto; }
.cart-items:has(.empty-cart) { display: flex; align-items: center; justify-content: center; }

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}
.cart-item:last-child { border-bottom: none; }

.item-image { flex-shrink: 0; }
.item-image img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; }

.item-details   { flex: 1; }
.item-details h4 { margin: 0 0 5px; font-size: 16px; font-weight: 400; }

.item-attributes .attribute { display: block; font-size: 12px; color: #666; margin: 2px 0; }

.item-price { font-weight: 700; color: #710014; font-size: 18px; }

.remove-item {
    position: absolute;
    top: 15px;
    right: 0;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity .2s;
}
.remove-item:hover { opacity: .6; }

/* ── Quantity controls ──────────────────────────────────────────────────────── */

.quantity-controls { display: flex; align-items: center; gap: 10px; margin: 5px 0; }

.quantity-btn {
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity .2s;
}
.quantity-btn:hover { opacity: .6; }

.quantity-display { min-width: 20px; text-align: center; font-weight: 600; font-size: 18px; color: #000; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.cart-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

/* Subtotal row */
.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
}
.subtotal-label  { color: #444; font-weight: 500; }
.subtotal-amount { font-weight: 700; color: #000; }

/* Checkout button — light green */
.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background .25s ease;
}
.checkout-button:hover { background: #388e3c; color: #fff; }

.lock-icon { flex-shrink: 0; }

/* Payment logos — single trust-badge image */
.payment-logos {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}
.payment-trust-badge {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Empty cart ─────────────────────────────────────────────────────────────── */

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}
.empty-cart-icon { width: 80px; height: 80px; margin-bottom: 20px; opacity: .7; }
.empty-cart p    { margin: 0; font-size: 16px; }

/* ── Loader overlay (remove-item) ───────────────────────────────────────────── */

#cart-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}
.cart-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cart icon ──────────────────────────────────────────────────────────────── */

/* Trigger icon in header bar */
.cart-icon-svg { width: 32px; height: auto; color: #01082f; fill:#000 !important; }

/* Smaller icon inside the panel header */
.cart-header-icon { display: flex; align-items: center; margin-right: 8px; }
.cart-header-svg  { width: 30px; height: 30px; }

/* Close / qty / remove SVG sizes */
.close-cart-icon  { width: 40px; height: 40px; display: block; }
.qty-icon         { width: 20px; height: 20px; display: block; }
.remove-icon      { width: 20px; height: 20px; display: block; }

/* Empty cart illustration */
.empty-cart-icon svg { width: 80px; height: 80px; opacity: .7; }

/* ── WooCommerce price override ─────────────────────────────────────────────── */

.woocommerce-Price-amount {
    color: #000 !important;
    font-family: "Poppins";
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 21px !important;
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .sliding-cart-panel { width: 100%; right: -100%; }

    .cart-items {
        height: calc(100vh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-footer { background: #fff; }

    .cart-icon-svg    { width: 37px; }
    .empty-cart-icon  { width: 60px; height: 60px; margin-bottom: 15px; }
    .empty-cart p     { font-size: 14px; }

    .sliding-cart-trigger { padding: 0 12px 0 7px; font-size: 14px; }
}