/* ============================================
   CART + CHECKOUT STYLES
   ============================================ */

.cart-page-body,
.checkout-page-body {
    background: #fff8f0;
}

.cart-hero {
    margin-top: var(--nav-h);
    padding: 56px 0 46px;
    background:
        radial-gradient(circle at 10% 20%, rgba(244,196,48,.2) 0%, transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(210,105,30,.25) 0%, transparent 30%),
        linear-gradient(135deg, #5f2c0f 0%, #8b4513 45%, #d2691e 100%);
    color: #fff;
}

.checkout-hero {
    background:
        radial-gradient(circle at 90% 20%, rgba(244,196,48,.25) 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(255,255,255,.15) 0%, transparent 35%),
        linear-gradient(135deg, #6b3410 0%, #8b4513 55%, #c95f1b 100%);
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    margin-bottom: 16px;
    color: rgba(255,255,255,.85);
}

.cart-breadcrumb a:hover {
    color: #f4c430;
}

.cart-breadcrumb span {
    font-weight: 600;
    color: #f4c430;
}

.cart-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 8px;
}

.cart-hero p {
    color: rgba(255,255,255,.85);
    max-width: 640px;
}

.cart-main {
    padding: 40px 0 80px;
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 28px;
    align-items: start;
}

.cart-items-card,
.cart-summary-card,
.checkout-form-card,
.checkout-summary-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 26px rgba(139,69,19,.12);
    border: 1px solid rgba(139,69,19,.08);
}

.cart-items-card,
.checkout-form-card {
    padding: 26px;
}

.cart-summary-card,
.checkout-summary-card {
    padding: 22px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}

.cart-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.cart-head-row h2,
.checkout-form-card h2,
.cart-summary-card h3,
.checkout-summary-card h3 {
    font-family: 'Playfair Display', serif;
    color: #6b3410;
}

.cart-head-row h2 {
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cart-link-btn {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(139,69,19,.08);
    color: #8b4513;
    font-weight: 600;
    font-size: .82rem;
}

.cart-link-btn:hover {
    background: rgba(139,69,19,.16);
}

.cart-item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 92px 1.6fr .9fr .9fr .9fr auto;
    align-items: center;
    gap: 12px;
    background: #fff8f0;
    border: 1px solid rgba(139,69,19,.08);
    border-radius: 14px;
    padding: 10px;
}

.cart-item-media {
    width: 92px;
    height: 78px;
    border-radius: 10px;
    overflow: hidden;
}

.cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h4 {
    color: #6b3410;
    font-size: .95rem;
    margin-bottom: 3px;
}

.cart-item-info p {
    color: #777;
    font-size: .8rem;
}

.cart-item-price,
.cart-item-total {
    color: #8b4513;
    font-weight: 700;
    font-size: .88rem;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(139,69,19,.15);
    padding: 4px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(139,69,19,.1);
    color: #6b3410;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #8b4513;
    color: #fff;
}

.remove-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(231,76,60,.12);
    color: #e74c3c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #555;
    font-size: .9rem;
}

.summary-row strong {
    color: #6b3410;
}

.total-row {
    border-top: 1px dashed rgba(139,69,19,.25);
    padding-top: 14px;
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 700;
}

.checkout-btn,
.place-order-btn,
.cart-cta-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border-radius: 999px;
    font-weight: 600;
    margin: 10px 0;
    background: linear-gradient(135deg, #8b4513, #d2691e);
    color: #fff;
}

.checkout-btn:hover,
.place-order-btn:hover,
.cart-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(139,69,19,.25);
}

.btn-disabled {
    opacity: .55;
    pointer-events: none;
}

.clear-cart-btn {
    width: 100%;
    padding: 11px;
    border-radius: 999px;
    border: 1px dashed rgba(139,69,19,.28);
    color: #8b4513;
    background: transparent;
    font-size: .85rem;
    font-weight: 600;
}

.clear-cart-btn:hover {
    background: rgba(139,69,19,.06);
}

.summary-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #6f6f6f;
    font-size: .84rem;
}

.summary-meta i {
    color: #d2691e;
    margin-right: 6px;
}

.cart-empty-state {
    text-align: center;
    padding: 30px 14px;
}

.cart-empty-state i {
    font-size: 2rem;
    color: rgba(139,69,19,.5);
    margin-bottom: 10px;
}

.cart-empty-state h3 {
    font-family: 'Playfair Display', serif;
    color: #6b3410;
    margin-bottom: 6px;
}

.cart-empty-state p {
    color: #777;
    font-size: .9rem;
    margin-bottom: 14px;
}

.summary-disabled {
    opacity: .6;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-grid {
    display: grid;
    gap: 14px;
}

.field-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    color: #5f5f5f;
    font-size: .85rem;
    font-weight: 600;
}

.field-group input,
.field-group textarea {
    border: 1px solid rgba(139,69,19,.2);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: .9rem;
}

.field-group input:focus,
.field-group textarea:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 3px rgba(139,69,19,.1);
}

.checkout-subtitle {
    margin-top: 6px;
    color: #6b3410;
    font-size: 1rem;
}

.payment-options {
    display: grid;
    gap: 9px;
}

.pay-option {
    border: 1px solid rgba(139,69,19,.18);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: .9rem;
}

.pay-option input {
    accent-color: #8b4513;
}

.checkout-item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(139,69,19,.2);
}

.checkout-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.checkout-item-row div {
    display: flex;
    flex-direction: column;
}

.checkout-item-row strong {
    color: #6b3410;
    font-size: .88rem;
}

.checkout-item-row span {
    color: #7a7a7a;
    font-size: .78rem;
}

.order-success {
    text-align: center;
    border: 1px solid rgba(39,174,96,.35);
    background: rgba(39,174,96,.08);
    border-radius: 14px;
    padding: 26px 16px;
}

.order-success i {
    color: #27ae60;
    font-size: 2rem;
    margin-bottom: 8px;
}

.order-success h3 {
    color: #1d7f45;
    margin-bottom: 6px;
}

.order-success p {
    color: #3d3d3d;
    margin-bottom: 14px;
}

@media (max-width: 1024px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-card,
    .checkout-summary-card {
        position: static;
    }
}

@media (max-width: 780px) {
    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 10px;
    }

    .cart-item-media {
        width: 70px;
        height: 64px;
    }

    .cart-item-price,
    .cart-item-qty,
    .cart-item-total,
    .remove-btn {
        grid-column: 2;
    }

    .field-grid.two-col {
        grid-template-columns: 1fr;
    }
}
