/* ============================================================
   cart.css — Kadir & Sons Cart Page
   Brand: #2b2928 charcoal | #fceb04 yellow
   ============================================================ */

/* ── Page Shell ─────────────────────────────────────────── */
.cart-page {
    background: #f5f4f1;
    min-height: calc(100vh - 140px);
    padding: 40px 0 80px;
}

/* ── Two-column Layout ──────────────────────────────────── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 28px;
    align-items: start;
}

/* ── Items Column ───────────────────────────────────────── */
.cart-items-col {
    background: #fff;
    border-radius: 8px;
   
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* ── Table Header ───────────────────────────────────────── */
.cart-items-header {
    display: grid;
    grid-template-columns: 1fr 110px 140px 100px 44px;
    gap: 0;
    padding: 14px 22px;
    background: #2b2928;
   
}

.cart-items-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Cart Row ───────────────────────────────────────────── */
.cart-row {
    display: grid;
    grid-template-columns: 1fr 110px 140px 100px 44px;
    align-items: center;
    gap: 0;
    padding: 18px 22px;
    border-bottom: 1px solid #f0eeeb;
    transition: background 0.2s, opacity 0.25s, transform 0.25s;
}

.cart-row:last-child {
    border-bottom: none;
}

.cart-row:hover {
    background: #fdfcfa;
}

.cart-row.removing {
    opacity: 0;
    transform: translateX(20px);
}

/* ── Product Cell ───────────────────────────────────────── */
.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 16px;
}

.cart-product-img {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f4f1;
    border: 1px solid #ece9e4;
    flex-shrink: 0;
}

.cart-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-product-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2b2928;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s;
}

.cart-product-name:hover {
    color: #666;
}

.cart-product-price-mobile {
    display: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
}

/* ── Price / Qty / Total Cells ──────────────────────────── */
.cart-col-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.cart-unit-price {
    color: #555;
    font-weight: 600;
}

.cart-col-qty {
    display: flex;
    align-items: center;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.cart-qty-btn {
    width: 34px;
    height: 34px;
    background: #f5f4f1;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #2b2928;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.cart-qty-btn:hover {
    background: #2b2928;
    color: #fceb04;
}

.cart-qty-input {
    width: 44px;
    height: 34px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2b2928;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.cart-col-total {
    font-size: 0.95rem;
}

.cart-line-total {
    font-weight: 800;
    color: #2b2928;
}

.cart-col-remove {
    display: flex;
    justify-content: center;
}

.cart-remove-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: 1.5px solid #e0dedd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: all 0.2s;
}

.cart-remove-btn:hover {
    background: #fff0f0;
    border-color: #e74c3c;
    color: #e74c3c;
}

/* ── Actions Row ────────────────────────────────────────── */
.cart-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: #fafaf8;
    border-top: 1px solid #ece9e4;
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-continue-link:hover {
    color: #2b2928;
}

.cart-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.cart-clear-btn:hover {
    color: #e74c3c;
}

/* ── Summary Sidebar ────────────────────────────────────── */
.cart-summary-col {
    position: sticky;
    top: 24px;
}

.cart-summary-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e7e4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.cart-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #2b2928;
 
}

.cart-summary-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cart-summary-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fceb04;
    background: rgba(252,235,4,0.15);
    border: 1px solid rgba(252,235,4,0.3);
    border-radius: 20px;
    padding: 2px 9px;
}

.cart-summary-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #555;
}

.cart-summary-row span:last-child {
    font-weight: 600;
    color: #2b2928;
}

.cart-shipping-note {
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
    font-weight: 400 !important;
}

.cart-summary-divider {
    height: 1px;
    background: #ece9e4;
    margin: 4px 0;
}

.cart-summary-total {
    font-size: 0.95rem !important;
}

.cart-summary-total span:first-child {
    font-weight: 800 !important;
    color: #2b2928 !important;
    font-size: 0.95rem;
}

.cart-summary-total span:last-child {
    font-weight: 800 !important;
    font-size: 1.15rem !important;
    color: #2b2928 !important;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 4px 20px 14px;
    padding: 14px 20px;
    background: #fceb04;
    color: #2b2928;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(252,235,4,0.3);
}

.cart-checkout-btn:hover {
    background: #f5e100;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(252,235,4,0.4);
}

.cart-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #bbb;
    margin: 0 20px 16px;
    padding: 0;
}

/* ── Empty State ────────────────────────────────────────── */
.cart-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e7e4;
}

.cart-empty-icon {
    width: 96px;
    height: 96px;
    background: #f5f4f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #bbb;
}

.cart-empty-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2b2928;
    margin: 0 0 10px;
}

.cart-empty-text {
    font-size: 0.9rem;
    color: #888;
    max-width: 360px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.cart-empty-cta {
    display: inline-flex;
    align-items: center;
    padding: 13px 32px;
    background: #2b2928;
    color: #fceb04;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background 0.2s;
}

.cart-empty-cta:hover {
    background: #3d3b3a;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-col {
        position: static;
        
    }
}

@media (max-width: 640px) {
    .cart-page {
        padding: 20px 0 60px;
    }

    /* Hide header row */
    .cart-items-header {
        display: none;
    }

    /* Stack rows as cards */
    .cart-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 12px;
        padding: 16px;
    }

    .cart-product-cell {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .cart-product-price-mobile {
        display: block;
    }

    .cart-col-price {
        display: none;
    }

    .cart-col-qty {
        justify-content: flex-start;
    }

    .cart-col-total {
        text-align: right;
    }

    .cart-col-remove {
        justify-content: flex-end;
        grid-row: 1;
        grid-column: 2;
        align-items: flex-start;
        padding-top: 0;
    }

    .cart-actions-row {
        padding: 12px 16px;
    }

    .cart-checkout-btn,
    .cart-summary-body,
    .cart-secure-note {
        margin-left: 16px;
        margin-right: 16px;
    }

    .cart-checkout-btn {
        width: calc(100% - 32px);
    }
}
