/* ============================================
   Cart — 2-Step Checkout
   Matches old Next.js Wishlist + BillingAndDelivery
   ============================================ */

.is-invalid {
    border-color: #ff5050 !important;
}

.cricova-cart {
    max-width: 1308px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0 80px;
}

@media (max-width: 1023px) {
    .cricova-cart { padding: 0 20px 80px; }
}
@media (max-width: 639px) {
    .cricova-cart { padding: 0 10px 60px; }
}

/* ── Step visibility ───────────────────────── */
.cart-step {
    display: none;
}
.cart-step--active {
    display: block;
}

/* ═══════════════════════════════════════════
   STEP 1: WISHLIST / CART
   ═══════════════════════════════════════════ */

/* ── Cart table ────────────────────────────── */
.cart-table {
    width: 100%;
    border: 1px solid var(--color-white);
}

/* 12-col grid: 1(×) + 4(product) + 2(price) + 3(qty) + 2(subtotal) */
.cart-row {
    display: grid;
    grid-template-columns: 1fr 4fr 2fr 3fr 2fr;
    border-bottom: 1px solid var(--color-white);
}

.cart-row:last-child {
    border-bottom: none;
}

/* Instant feedback the moment × is clicked, and the fade the row plays out
   before it's actually removed from the DOM — without this the click gave
   no visible response until the old full-page reload flashed in. */
.cart-row--removing {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.3s ease, max-height 0.3s ease 0.3s, padding 0.3s ease 0.3s, border-width 0.3s ease 0.3s;
    max-height: 0;
    overflow: hidden;
}
.cart-remove-btn:disabled {
    opacity: 0.4;
    cursor: wait;
}

.cart-col {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--color-white);
}

.cart-col:last-child {
    border-right: none;
}

/* Header row — × merges into product: 5+2+3+2 */
.cart-row--header {
    grid-template-columns: 5fr 2fr 3fr 2fr;
    text-transform: uppercase;
    font-size: 32px;
    letter-spacing: 3px;
    font-weight: 500;
    font-family: var(--font-display), 'Cormorant', serif;
}

.cart-row--header .cart-col {
    justify-content: center;
    padding: 20px 16px;
}

.cart-row--header .cart-col--remove {
    display: none;
}

/* × column keeps right border */
.cart-row--item .cart-col--remove {
    border-right: 1px solid var(--color-white);
}

/* Mobile column labels (hidden on desktop) */
.cart-col__label {
    display: none;
}

/* ── Remove button ─────────────────────────── */
.cart-col--remove {
    justify-content: center;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.cart-remove-btn:hover {
    opacity: 1;
}

/* ── Product column ────────────────────────── */
.cart-product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product__img {
    flex-shrink: 0;
    width: 140px;
    height: 280px;
    margin-left: 50px;
}

.cart-product__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-product__name {
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-white);
    font-family: 'Manrope', sans-serif;
}

/* ── Price column ──────────────────────────── */
.cart-col--price {
    justify-content: center;
    font-size: 15px;
}

/* ── Quantity column ───────────────────────── */
.cart-col--qty {
    justify-content: center;
}

.cart-qty-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-white);
    border-radius: 9999px;
    padding: 8px 24px;
    max-width: 145px;
}

.cart-qty-value {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.cart-qty-arrows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-qty-up,
.cart-qty-down {
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.cart-qty-up:hover,
.cart-qty-down:hover {
    opacity: 1;
}

/* ── Subtotal column ───────────────────────── */
.cart-col--subtotal {
    justify-content: center;
    font-size: 15px;
}

/* ── Total row ─────────────────────────────── */
.cart-row--total {
    display: grid;
    grid-template-columns: 10fr 2fr;
    border-top: 1px solid var(--color-white);
    font-family: var(--font-display), 'Cormorant', serif;
}

.cart-total-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 24px 20px;
    font-size: 32px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cart-total-value {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    font-size: 32px;
    font-weight: 500;
}

/* ── Finalize button ───────────────────────── */
.cart-finalize-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.cart-finalize-btn {
    display: inline-block;
    padding: 24px 128px;
    background: var(--color-white);
    color: var(--color-black);
    border: 2px solid var(--color-white);
    border-radius: 68px;
    font-family: 'Manrope', sans-serif;
    font-size: 45px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-finalize-btn:hover {
    background: transparent;
    color: var(--color-white);
    transform: scale(1.02);
}

.cart-finalize-btn:active {
    transform: scale(0.98);
}

/* ── Empty cart ─────────────────────────────── */
.cricova-cart--empty {
    min-height: calc(100vh - 80px); /* fill viewport minus header */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-empty {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 60px 24px;
}

.cart-empty-glyph {
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 28px;
}

.cart-empty-glyph svg {
    display: inline-block;
}

.cart-empty-title {
    font-family: var(--font-display, 'Cormorant', serif);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-white);
    margin: 0 0 18px;
    line-height: 1.2;
}

.cart-empty-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 36px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.cart-empty-ctas {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.cart-empty-btn {
    display: block;
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-black);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-display, 'Cormorant', serif);
    font-size: 13px;
    letter-spacing: 3px;
    text-align: center;
    transition: all 0.25s ease;
}

.cart-empty-btn:hover {
    background: var(--color-white);
    border-color: var(--color-white);
}

.cart-empty-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.25);
}

.cart-empty-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--color-white);
}

@media (min-width: 640px) {
    .cart-empty-ctas {
        flex-direction: row;
        max-width: none;
        justify-content: center;
    }
    .cart-empty-btn {
        min-width: 180px;
    }
}


/* ═══════════════════════════════════════════
   STEP 2: BILLING & DELIVERY
   ═══════════════════════════════════════════ */

/* ── Back button bar ──────────────────────── */
.cart-back-bar {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-white);
    border-bottom: none;
    padding: 16px 20px;
}

.cart-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--color-white);
    border-radius: 50%;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-back-btn:hover {
    background: var(--color-white);
    color: var(--color-black);
}

/* ── Checkout grid ─────────────────────────── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--color-white);
}

/* Left column: billing form */
.checkout-form-col {
    padding: 32px 54px;
    border-right: 1px solid var(--color-white);
}

/* Right column: order summary */
.checkout-summary-col {
    padding: 32px 54px;
}

.checkout-title {
    font-family: var(--font-display), 'Cormorant', serif;
    font-size: 45px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-white);
    margin: 0 0 40px;
}

/* ── Form fields ───────────────────────────── */
.checkout-field {
    margin-bottom: 20px;
}

.checkout-field label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    text-transform: none;
}

.checkout-field input[type="text"],
.checkout-field input[type="tel"],
.checkout-field input[type="email"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    font-size: 15px;
    padding: 8px 0;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: 'Manrope', sans-serif;
}

.checkout-field input:focus {
    border-bottom-color: var(--color-white);
}

.checkout-field--textarea textarea {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    font-size: 15px;
    padding: 12px;
    outline: none;
    resize: vertical;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.3s ease;
}

.checkout-field--textarea textarea:focus {
    border-color: var(--color-white);
}

/* ── Order summary ─────────────────────────── */
.checkout-summary {
    font-size: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.summary-row--header {
    font-size: 25px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 16px;
    opacity: 1;
}

.summary-row--item {
    font-size: 18px;
    font-weight: 300;
    padding: 12px 0;
    align-items: center;
}

.summary-row--item span:first-child {
    max-width: 360px;
}

/* Product cell with thumbnail */
.summary-item-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.summary-item-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.summary-item-thumb img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.summary-item-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.summary-item-price {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .summary-item-thumb { flex-basis: 44px; width: 44px; height: 44px; }
    .summary-row--item { font-size: 15px; }
}

.summary-row--delivery {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 700;
}

.summary-row--total {
    font-size: 35px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    margin-top: 12px;
    padding-top: 16px;
    padding-bottom: 28px;
}

/* ── Payment methods ───────────────────────── */
.checkout-payment {
    display: flex;
    gap: 32px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.payment-option input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: 1px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.payment-option input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: white;
    border-radius: 50%;
}

.payment-logos {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.payment-logos img {
    height: 20px;
    width: auto;
}

/* ── VISA info ─────────────────────────────── */
.checkout-visa-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.5;
}

.checkout-visa-info .payment-logos {
    flex-shrink: 0;
}

.checkout-visa-info p {
    margin: 0;
}

/* ── Privacy text ──────────────────────────── */
.checkout-privacy-text {
    padding: 12px 0;
    font-size: 12px;
    opacity: 0.6;
    line-height: 1.5;
}

.checkout-privacy-text p {
    margin: 0;
}

.checkout-privacy-text a {
    color: var(--color-white);
    text-decoration: underline;
}

/* ── Agreement checkboxes ──────────────────── */
.checkout-agreements {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
}

.checkout-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.8;
}

.checkout-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.checkout-checkbox input[type="checkbox"]:checked {
    background-color: white;
    border-color: white;
}

.checkout-checkbox input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 7px;
    width: 5px;
    height: 10px;
    border: solid var(--color-black);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ── reCAPTCHA text ────────────────────────── */
.checkout-recaptcha-text {
    padding: 12px 0;
    font-size: 11px;
    opacity: 0.5;
    line-height: 1.5;
}

.checkout-recaptcha-text p {
    margin: 0;
}

.checkout-recaptcha-text a {
    color: var(--color-white);
    text-decoration: underline;
}

/* ── Place order button ────────────────────── */
.checkout-submit-wrap {
    padding: 24px 0;
}

.checkout-submit-btn {
    display: block;
    width: 100%;
    padding: 12px 40px;
    background: var(--color-white);
    color: var(--color-black);
    border: 1px solid var(--color-white);
    border-radius: 44.82px;
    font-family: 'Manrope', sans-serif;
    font-size: 1.875rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-submit-btn:hover {
    background: transparent;
    color: var(--color-white);
}

.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Checkout notices ──────────────────────── */
.checkout-notices {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 80, 80, 0.5);
    border-radius: 4px;
    color: #ff5050;
    font-size: 14px;
    line-height: 1.5;
}

.checkout-notices ul {
    margin: 0;
    padding: 0 0 0 16px;
}

.checkout-notices li {
    margin-bottom: 4px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1023px) {
    .checkout-form-col,
    .checkout-summary-col {
        padding: 24px 30px;
    }

    .checkout-title {
        font-size: 32px;
    }

    .cart-product__img {
        width: 100px;
        height: 180px;
        margin-left: 20px;
    }

    .cart-row--header {
        font-size: 22px;
    }

    .cart-total-label,
    .cart-total-value {
        font-size: 24px;
    }

    .cart-finalize-btn {
        font-size: 28px;
        padding: 20px 60px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Step 1: Stack cart items vertically */
    .cart-row--header {
        display: none;
    }

    .cart-row--item {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }

    .cart-col {
        border-right: none;
        padding: 4px 0;
        justify-content: flex-start;
    }

    .cart-col--remove {
        position: absolute;
        right: 16px;
        top: 16px;
    }

    .cart-row--item .cart-col--remove {
        border-right: none;
    }

    .cart-row--item {
        position: relative;
    }

    .cart-col--product {
        padding-right: 40px;
    }

    .cart-col__label {
        display: inline-block;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
        opacity: 0.5;
        margin-right: 12px;
        min-width: 80px;
    }

    .cart-col--price,
    .cart-col--qty,
    .cart-col--subtotal {
        justify-content: flex-start;
    }

    .cart-product__img {
        width: 60px;
        height: 90px;
        margin-left: 0;
    }

    .cart-row--total {
        grid-template-columns: 1fr 1fr;
    }

    .cart-total-label,
    .cart-total-value {
        font-size: 20px;
    }

    .cart-finalize-btn {
        width: 100%;
        font-size: 1.125rem;
        padding: 18px 20px;
    }

    /* Step 2: Stack billing + summary */
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-form-col {
        border-right: none;
        border-bottom: 1px solid var(--color-white);
    }

    .checkout-form-col,
    .checkout-summary-col {
        padding: 24px 20px;
    }

    .checkout-title {
        font-size: 28px;
    }

    .summary-row--total {
        font-size: 24px;
    }

    .checkout-payment {
        flex-direction: column;
        gap: 16px;
    }
}
