/* =========================================================
   TRUSTONE CART — NIKE STYLE (CLEAN + PREMIUM) FINAL (NO WARNINGS)
========================================================= */

/* =========================
   PAGE WRAPPER
========================= */
.cart-page {
    padding: 42px 0 90px;
    background: var(--bg);
}

.cart-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 18px;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 34px;
    align-items: start;
}

/* =========================
   HEADER
========================= */
.cart-title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin: 0 0 6px;
    color: var(--text);
}

.cart-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 24px;
}

/* =========================
   CART ITEM
========================= */
.cart-item {
    background: #fff;
    border: 1px solid rgba(2, 6, 23, 0.06);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
    padding: 16px 18px;

    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 18px;
    margin-bottom: 16px;
    align-items: center;
}

.cart-img {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid rgba(2, 6, 23, 0.05);
}

.cart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

.cart-item:hover .cart-img img {
    transform: scale(1.04);
}

.cart-name {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    color: var(--text);
}

.cart-price {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 12px;
}

/* =========================
   ACTIONS
========================= */
.cart-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Qty Stepper */
.qty-stepper {
    height: 38px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(2, 6, 23, 0.14);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 40px;
    height: 38px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease;
}

.qty-btn:hover {
    background: rgba(2, 6, 23, 0.06);
}

.qty-input {
    width: 44px;
    height: 38px;
    border: none;
    outline: none;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
    background: transparent;

    /* ✅ No warning: standard appearance + vendor */
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Hide spinner for Chrome/Safari */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

/* Remove button */
.remove-btn {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    color: #ef4444;
    transition: opacity 0.2s ease;
}

.remove-btn:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* Item total */
.cart-item-total {
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
    color: var(--text);
}

/* =========================
   SUMMARY
========================= */
.summary-card {
    background: #fff;
    border: 1px solid rgba(2, 6, 23, 0.06);
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.08);
    padding: 22px;

    position: sticky;
    top: 110px;
}

.summary-title {
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 16px;
    color: var(--text);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.summary-row span:first-child {
    color: var(--muted);
    font-weight: 600;
}

.summary-row span:last-child {
    font-weight: 900;
    color: var(--text);
}

.summary-divider {
    height: 1px;
    background: rgba(2, 6, 23, 0.10);
    margin: 16px 0;
}

.summary-total span {
    font-size: 15px;
    font-weight: 900;
}

/* Checkout button */
.checkout-btn {
    margin-top: 18px;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 14px;
    font-weight: 900;
    background: #111;
    color: #fff;

    transition: transform 0.25s ease, opacity 0.25s ease;
    display: block;
    text-align: center;
}

.checkout-btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
}

.summary-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
}

/* =========================
   EMPTY STATE
========================= */
.cart-empty {
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    border: 1px solid rgba(2, 6, 23, 0.08);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.06);
}

.cart-empty h3 {
    font-weight: 900;
    margin: 0 0 8px;
}

.cart-empty p {
    color: var(--muted);
    margin: 0 0 16px;
}

.cart-empty a {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 900;
    background: #111;
    color: #fff;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: relative;
        top: 0;
    }
}

@media (max-width: 575px) {
    .cart-title {
        font-size: 28px;
    }

    .cart-item {
        grid-template-columns: 90px 1fr;
        padding: 14px 14px;
    }

    .cart-img {
        width: 90px;
        height: 90px;
    }

    .cart-item-total {
        grid-column: 2;
        margin-top: 8px;
        text-align: left;
    }
}
