/* ══════════════════════════════════════════════
   CART PAGE CSS
   ══════════════════════════════════════════════ */

/* Force header to be solid on cart page to ensure nav text visibility */
.cart-page .site-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.cart-page .site-header .logo span {
    -webkit-text-fill-color: var(--text-1);
    color: var(--text-1);
}
.cart-page .site-header .nav-link,
.cart-page .site-header .nav-icon-link {
    color: var(--text-2);
}
.cart-page .site-header .nav-link:hover,
.cart-page .site-header .nav-icon-link:hover {
    color: var(--text-1);
}
.cart-page .search-bar input {
    color: var(--text-1);
}
.cart-page .search-bar svg {
    stroke: var(--text-2);
}

/* ── BREADCRUMBS ── */
.breadcrumbs {
    padding: 24px 40px;
    margin-top: 80px; /* Offset for fixed header */
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}
.breadcrumbs a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}
.breadcrumbs a:hover {
    color: var(--accent-cyan);
}
.breadcrumbs .sep {
    margin: 0 8px;
    color: var(--text-3);
    font-size: 12px;
}
.breadcrumbs .current {
    color: var(--text-3);
    font-size: 13px;
}

/* ── CART LAYOUT ── */
.cart-container {
    max-width: 1320px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.cart-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 32px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.cart-title span {
    font-size: 16px;
    color: var(--text-3);
    font-weight: 400;
    font-family: var(--font-body);
}

/* ── CART ITEMS ── */

.cart-item-card {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 24px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    align-items: center;
    transition: box-shadow 0.3s, border-color 0.3s;
}
.cart-item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(14, 165, 233, 0.2);
}

.cart-item-img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-item-name {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
    text-decoration: none;
    transition: color 0.3s;
}
.cart-item-name:hover {
    color: var(--accent-cyan);
}
.cart-item-meta {
    font-size: 13px;
    color: var(--text-2);
    display: flex;
    gap: 12px;
}
.cart-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.cart-item-qty button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}
.cart-item-qty button:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-1);
}
.cart-item-qty input {
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    -moz-appearance: textfield;
}
.cart-item-qty input::-webkit-outer-spin-button,
.cart-item-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 120px;
}
.cart-item-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-cyan);
}
.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}
.cart-item-remove:hover {
    color: var(--red);
}

/* ── ORDER SUMMARY ── */
.order-summary {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 24px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 16px;
}
.summary-line.total {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
}
.summary-line.total .val {
    color: var(--accent-cyan);
    font-size: 24px;
}

.promo-code {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    margin-top: 24px;
}
.promo-code input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
}
.promo-code input:focus {
    border-color: var(--accent-cyan);
}
.promo-code button {
    padding: 0 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.promo-code button:hover {
    background: rgba(15, 23, 42, 0.08);
}

.btn-checkout {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--text-1);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
}
.btn-checkout:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
}

.summary-note {
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

/* ── EMPTY CART ── */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: none;
}
.empty-cart.active {
    display: block;
}
.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}
.empty-cart h2 {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--text-1);
    margin-bottom: 12px;
}
.empty-cart p {
    color: var(--text-2);
    margin-bottom: 32px;
}
.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-cyan);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}
.btn-continue:hover {
    background: #0284c7;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .breadcrumbs {
        padding: 16px 24px;
    }
    .cart-container {
        padding: 0 24px;
    }
    .cart-item-card {
        grid-template-columns: 80px 1fr;
        grid-template-areas: 
            "img info"
            "img qty"
            "price price";
        padding: 16px;
        gap: 16px;
    }
    .cart-item-img {
        grid-area: img;
        width: 80px;
        height: 80px;
    }
    .cart-item-details {
        grid-area: info;
    }
    .cart-item-qty {
        grid-area: qty;
        justify-self: start;
    }
    .cart-item-price-col {
        grid-area: price;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border);
        padding-top: 16px;
    }
    .cart-title {
        font-size: 24px;
        flex-direction: column;
        gap: 4px;
    }
}
