/* =====================================================
   Checkout & Buy Now Page
   Theme: "Harvest Receipt" — warm wheat tones, forest green,
   turmeric accent. Order summary styled like a grocery receipt.
   ===================================================== */

.checkout-cart-page {
    --bg: #f6f2e8;
    --surface: #ffffff;
    --ink: #23261f;
    --muted: #726e5f;
    --primary: #2f5233;
    --primary-dark: #203a24;
    --accent: #d9a404;
    --danger: #b3462c;
    --line: #e6dfc9;
    --radius: 14px;

    background: var(--bg);
    color: var(--ink);
    font-family:
        "Work Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    padding: 56px 0 80px;
    min-height: 100vh;
}

.checkout-cart-page * {
    box-sizing: border-box;
}

.checkout-cart-page .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Page heading / steps ---------- */
.cc-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Space Mono", monospace, sans-serif;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.cc-eyebrow span.step-active {
    color: var(--primary);
    font-weight: 700;
}

.cc-eyebrow .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
}

.cc-page-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 36px;
    color: var(--ink);
}

/* ---------- Layout ---------- */
.cc-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 32px;
    align-items: stretch; /* Fix: Dono cards ki height barabar rakhne ke liye */
}

@media (max-width: 991px) {
    .cc-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Order summary (receipt card) ---------- */
.cc-receipt,
.cc-form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px 28px 28px;
    box-shadow:
        0 1px 2px rgba(35, 38, 31, 0.04),
        0 12px 32px -18px rgba(35, 38, 31, 0.25);
    display: flex;
    flex-direction: column; /* Fix: Andar ke items stretch hone ke liye */
}

.cc-receipt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.cc-receipt-head h4 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 21px;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
}

.cc-count-pill {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 999px;
}

.cc-receipt-items {
    flex-grow: 1; /* Fix: Bachi hui height ye lega jisse total box hamesha bottom me rahe */
}

.cc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}

.cc-item:first-of-type {
    padding-top: 0;
}
.cc-item:last-child {
    border-bottom: none;
}

.cc-item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.cc-item-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
}

.cc-item-info {
    flex: 1;
    min-width: 0;
}

.cc-item-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-item-qty {
    font-family: "Space Mono", monospace;
    font-size: 12px;
    color: var(--muted);
}

.cc-item-price {
    font-family: "Space Mono", monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.cc-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.cc-item-remove:hover {
    background: rgba(179, 70, 44, 0.1);
}

.cc-item-remove svg {
    width: 15px;
    height: 15px;
}

/* ---------- Totals ---------- */
.cc-totals {
    margin-top: auto; /* Fix: Hamesha bottom par stick rahega */
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.cc-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 8px;
    font-family: "Space Mono", monospace;
}

.cc-totals-row.grand {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    align-items: center;
}

.cc-totals-row.grand .label {
    font-family: "Fraunces", Georgia, serif;
    font-size: 16px;
    color: var(--ink);
    font-weight: 600;
}

.cc-total-badge {
    font-family: "Space Mono", monospace;
    font-size: 19px;
    font-weight: 700;
    background: radial-gradient(circle, #e61a22 0%, #80000a 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    transform: rotate(-1deg);
}

/* ---------- Empty cart ---------- */
.cc-empty {
    text-align: center;
    padding: 48px 20px;
}
.cc-empty .cc-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    color: var(--accent);
}
.cc-empty p {
    font-family: "Fraunces", Georgia, serif;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 20px;
}

/* ---------- Billing form ---------- */
.cc-form-card h4 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.cc-form-sub {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 26px 0;
}

.cc-field {
    margin-bottom: 18px;
}

.cc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.checkout-cart-page .cc-input,
.checkout-cart-page textarea.cc-input {
    width: 100%;
    border: 1.5px solid var(--line);
    background: var(--bg);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14.5px;
    font-family: "Work Sans", sans-serif;
    color: var(--ink);
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.checkout-cart-page .cc-input::placeholder {
    color: #a39d87;
}
.checkout-cart-page .cc-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(47, 82, 51, 0.1);
}

.checkout-cart-page textarea.cc-input {
    min-height: 90px;
    resize: vertical;
}

.cc-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- Payment Methods (Added for Harvest Theme) ---------- */
.cc-payment-methods {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}
.cc-payment-option {
    flex: 1;
    cursor: pointer;
}
.cc-payment-option input {
    display: none;
}
.cc-payment-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.2s ease;
    background: var(--surface);
}
.cc-payment-box svg {
    width: 18px;
    height: 18px;
}
.cc-payment-option input:checked + .cc-payment-box {
    border-color: var(--primary);
    background: var(--bg);
    color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(47, 82, 51, 0.08);
}

/* ---------- Submit button ---------- */
.cc-submit {
    width: 100%;
    margin-top: 24px;
    background: var(--danger);
    color: #fdf9ef;
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: radial-gradient(circle, #e61a22 0%, #80000a 100%);
    box-shadow: 0 8px 20px -8px rgba(47, 82, 51, 0.6);
}

.cc-submit:hover {
    background: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -8px rgba(47, 82, 51, 0.7);
}
.cc-submit:active {
    transform: scale(0.99);
}
.cc-submit svg {
    width: 17px;
    height: 17px;
}

.cc-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 14px;
}

.cc-secure-note svg {
    width: 13px;
    height: 13px;
    color: var(--primary);
}

@media (max-width: 575px) {
    .cc-row-2 {
        grid-template-columns: 1fr;
    }
    .cc-payment-methods {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .checkout-cart-page * {
        transition: none !important;
    }
}
