/* ==========================================================================
   Cart & Checkout Stylesheet - Hamleys Theme
   Domain: ashajain.in
   ========================================================================== */

.cart-page-wrapper,
.checkout-page-wrapper {
    background-color: var(--bg-light);
    padding: 35px 0 80px;
    min-height: 80vh;
}

/* 3-Step Progress Bar */
.cart-step-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 580px;
    margin: 0 auto 30px;
    gap: 12px;
}
.step-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}
.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}
.step-point.active {
    color: var(--primary-color);
}
.step-point.active .step-num {
    background: var(--primary-color);
    color: #ffffff;
}
.step-divider {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
}
.step-divider.active-line {
    background: var(--primary-color);
}

/* Free Delivery Threshold Meter */
.free-shipping-progress-card {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.truck-icon {
    font-size: 24px;
}
.meter-text-wrap {
    flex: 1;
}
.meter-text-wrap span {
    font-size: 13.5px;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
}
.shipping-meter-bar {
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.meter-fill {
    height: 100%;
    background: #10b981;
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Cart Grid: Items on Left + Sticky Summary on Right */
.cart-dynamic-layout,
.checkout-split-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: flex-start;
}

/* Left: Cart Items */
.cart-items-column {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}
.cart-items-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 20px;
}
.cart-items-header-bar h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text-dark);
    margin: 0;
}
.btn-clear-cart {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.cart-items-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cart-item-row {
    display: grid;
    grid-template-columns: 75px 1fr auto auto;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}
.cart-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.item-thumb {
    width: 75px;
    height: 75px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}
.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
}
.item-title a {
    color: var(--text-dark);
}
.item-unit-price {
    font-size: 13px;
    color: var(--text-muted);
}

.item-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-light);
}
.btn-qty {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
}
.qty-num {
    width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.item-total-block {
    display: flex;
    align-items: center;
    gap: 12px;
}
.total-figure {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 900;
    color: var(--text-dark);
}
.btn-remove-item {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
.btn-remove-item:hover {
    color: #dc2626;
}

/* Order Summary Sticky Card */
.order-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 90px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
.summary-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.cart-coupon-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.cart-coupon-wrap input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}
.cart-coupon-wrap button {
    background: var(--text-dark);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12.5px;
    cursor: pointer;
}
.coupon-status-msg {
    font-size: 11.5px;
    margin-bottom: 16px;
}
.coupon-status-msg.success { color: #007934; font-weight: 700; }
.coupon-status-msg.error { color: #dc2626; }

.summary-calc-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--text-muted);
}
.calc-row strong {
    color: var(--text-dark);
}
.calc-row.grand-total {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-dark);
}
.calc-row.grand-total strong {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary-color);
}
.text-green {
    color: #007934 !important;
}
.calc-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}
.tax-inclusive-tag {
    font-size: 11.5px;
    color: var(--text-muted);
}

.btn-checkout-proceed,
.btn-confirm-order {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
    padding: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 14px rgba(227, 0, 22, 0.3);
}
.btn-checkout-proceed:hover,
.btn-confirm-order:hover {
    background: var(--primary-hover);
}

.summary-perks-list {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Empty Cart State */
.empty-cart-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
}
.empty-toy-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 12px;
}
.empty-cart-card h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.empty-cart-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

/* Checkout Form Boxes */
.form-section-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.form-box-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.c-field-group.full-width {
    grid-column: span 2;
}
.c-field-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.c-field-group input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13.5px;
    outline: none;
}
.c-field-group input:focus {
    border-color: var(--primary-color);
}
.req {
    color: #dc2626;
}

/* Payment Radio Cards */
.payment-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.payment-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    background: var(--bg-light);
}
.payment-radio-card input {
    margin-top: 3px;
    accent-color: var(--primary-color);
}
.radio-meta strong {
    display: block;
    font-size: 13.5px;
    color: var(--text-dark);
}
.radio-meta small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Checkout Item Row Preview */
.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 240px;
    overflow-y: auto;
}
.chk-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.chk-item-row img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
}
.chk-item-info {
    flex: 1;
}
.chk-item-info strong {
    display: block;
    font-size: 12.5px;
    color: var(--text-dark);
}
.chk-item-price {
    font-weight: 800;
}
.checkout-security-badges {
    margin-top: 18px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Order Success State */
.order-success-card {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: #ffffff;
    font-size: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.order-success-card h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.order-number-box {
    background: #f1f5f9;
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-block;
    font-size: 16px;
    margin: 16px 0;
}
.order-notice {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .cart-dynamic-layout,
    .checkout-split-layout {
        grid-template-columns: 1fr;
    }
    .order-summary-card {
        position: static;
    }
}
@media (max-width: 600px) {
    .cart-item-row {
        grid-template-columns: 60px 1fr;
        gap: 12px;
    }
    .item-total-block {
        grid-column: span 2;
        justify-content: space-between;
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
    }
    .checkout-form-grid {
        grid-template-columns: 1fr;
    }
    .c-field-group.full-width {
        grid-column: span 1;
    }
}