/* ======================================================================
   Inline checkout — Cohort 2 (Ghorer Organic)
   "Express grocery checkout" — single-column wizard, friendly compact UI.
   Distinct from T1's two-column boutique layout.

   Locked hooks preserved (rule 0.23bb): .add-to-products-data, #checkout_form,
   .products-current-price, .btn-add-shopping-cart, .shipping_method,
   .payment-method-radio, etc.
   ====================================================================== */

/* ---------- Outer container — flat, no card-wrap ---------- */
.ic {
    margin: 24px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    scroll-margin-top: 80px;
}

/* ---------- Head ---------- */
.ic-head {
    text-align: center;
    padding: 0 16px 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--bs-border-color);
}

.ic-head-eyebrow {
    display: inline-block;
    background: var(--bs-light-primary, var(--bs-tertiary-bg));
    color: var(--bs-primary);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ic-head-title {
    font-family: var(--bs-heading-font-family);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.ic-head-sub {
    font-size: 0.88rem;
    color: var(--bs-secondary-color);
    margin: 0;
    font-weight: 400;
}

/* ---------- Trust strip — three quick reassurance pills below head ---------- */
.ic-trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.ic-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

.ic-trust-pill svg {
    color: var(--bs-success);
}

/* ---------- Alert ---------- */
.ic-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(var(--bs-danger-rgb), 0.08);
    border-left: 3px solid var(--bs-danger);
    border-radius: 6px;
    color: var(--bs-danger);
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.ic-alert svg { flex-shrink: 0; margin-top: 2px; }

/* ---------- Card — flat section, NOT bordered box. Left green accent strip
              replaces T1's numbered badge to mark each step ---------- */
.ic-card {
    padding: 18px 18px 18px 22px;
    background: transparent;
    border: 0;
    border-left: 3px solid var(--bs-border-color);
    border-radius: 0;
    position: relative;
    margin-bottom: 8px;
    transition: border-left-color 0.2s ease;
}

.ic-card:hover,
.ic-card:focus-within {
    border-left-color: var(--bs-primary);
}

.ic-card + .ic-card { margin-top: 4px; }

.ic-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: 0;
}

/* Replaces T1's numbered badge — a small green dot that pulses subtly on hover */
.ic-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bs-primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ic-card:hover .ic-card-dot,
.ic-card:focus-within .ic-card-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15);
}

.ic-card-title {
    font-family: var(--bs-heading-font-family);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin: 0;
    letter-spacing: -0.005em;
}

/* ---------- Product summary — horizontal row, no thumb-on-left ---------- */
.ic-variation-row,
.ic-summary-row {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--bs-secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ic-variation-row.active,
.ic-summary-row.active {
    border-color: var(--bs-primary);
    background: var(--bs-body-bg);
    box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.08);
}

.ic-variation-row:hover { border-color: var(--bs-primary); }
.ic-variation-row.is-disabled { opacity: 0.45; cursor: not-allowed; }

.ic-variation-thumb {
    width: 88px;
    height: 88px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ic-variation-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ic-variation-info {
    min-width: 0;
}

.ic-variation-name,
.products-title {
    font-family: var(--bs-heading-font-family);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin: 0 0 4px;
    line-height: 1.3;
}

.ic-variation-combo-title {
    font-size: 0.78rem;
    margin-top: 2px;
}

.ic-variation-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.products-current-price,
.ic-price-new {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.products-old-price,
.ic-price-old {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
    text-decoration: line-through;
}

.products-discount-amount,
.ic-price-discount {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--bs-success);
    background: var(--bs-light-success);
    padding: 2px 6px;
    border-radius: 4px;
}

.products-save-amount,
.ic-price-save {
    font-size: 0.74rem;
    color: var(--bs-success);
    font-weight: 500;
}

.ic-variation-highlight {
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 2;
    background: var(--bs-danger, #c0392b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 16px 4px 10px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
    pointer-events: none;
}

.ic-variation-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bs-border-color);
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.ic-variation-row.active .ic-variation-check {
    background: var(--bs-primary);
    color: var(--bs-body);
}

/* ---------- Quantity stepper — chip style ---------- */
.products-quantity-table,
.ic-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    padding: 2px;
    margin-top: 4px;
}

.ic-qty-btn,
.procuts-less,
.procuts-up {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: var(--bs-primary);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ic-qty-btn:hover,
.procuts-less:hover,
.procuts-up:hover {
    background: var(--bs-light-primary);
}

.ic-qty-input,
.quantities {
    width: 32px;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 600;
    color: var(--bs-body-color);
    -moz-appearance: textfield;
}

.ic-qty-input::-webkit-inner-spin-button,
.ic-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---------- Variation picker (single-axis rows) ---------- */
.ic-single-axis-rows {
    margin-top: 6px;
}

.ic-single-row {
    position: relative;
}

.ic-single-row-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Fields — single-column stack (one field per row) ---------- */
.ic-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ic-field { display: flex; flex-direction: column; }

.ic-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ic-required { color: var(--bs-danger); font-weight: 700; }
.ic-optional { color: var(--bs-secondary-color); font-weight: 400; text-transform: none; letter-spacing: 0; }

.ic-input,
.ic-textarea {
    border: 1.5px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    color: var(--bs-body-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.ic-input:focus,
.ic-textarea:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.12);
    outline: none;
}

.ic-input::placeholder { color: var(--bs-secondary-color); opacity: 0.55; }

.ic-input.is-invalid {
    border-color: var(--bs-danger);
}

.ic-error {
    font-size: 0.78rem;
    color: var(--bs-danger);
    margin-top: 4px;
}

/* ---------- Shipping options — chip-style radios horizontal scroll ---------- */
.ic-shipping {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ic-shipping-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bs-secondary-bg);
    border: 1.5px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-size: 0.88rem;
    flex: 1 1 auto;
    min-width: 180px;
}

.ic-shipping-option:has(input:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-body-bg);
}

.ic-shipping-option input { position: absolute; opacity: 0; pointer-events: none; }

.ic-shipping-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s ease;
}

.ic-shipping-option:has(input:checked) .ic-shipping-radio {
    border-color: var(--bs-primary);
}

.ic-shipping-option:has(input:checked) .ic-shipping-radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--bs-primary);
    border-radius: 50%;
}

.ic-shipping-title {
    flex: 1;
    font-weight: 600;
    color: var(--bs-body-color);
}

.ic-shipping-charge {
    color: var(--bs-secondary-color);
    font-weight: 500;
    font-size: 0.85rem;
}

/* ---------- Payment options — single-column stack (one row per method) ---------- */
.ic-payment {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ic-payment-option {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bs-secondary-bg);
    border: 1.5px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ic-payment-option:has(input:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-body-bg);
}

.ic-payment-option input { position: absolute; opacity: 0; pointer-events: none; }

.ic-payment-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color);
    position: relative;
    transition: border-color 0.15s ease;
}

.ic-payment-option:has(input:checked) .ic-payment-radio {
    border-color: var(--bs-primary);
}

.ic-payment-option:has(input:checked) .ic-payment-radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--bs-primary);
    border-radius: 50%;
}

.ic-payment-title {
    font-weight: 600;
    color: var(--bs-body-color);
    font-size: 0.92rem;
}

.ic-payment-sub {
    grid-column: 2 / 3;
    font-size: 0.78rem;
    color: var(--bs-secondary-color);
}

.ic-payment-logo {
    max-height: 24px;
    width: auto;
    object-fit: contain;
}

.ic-payment-details {
    margin-top: 8px;
    padding: 12px 14px;
    background: var(--bs-tertiary-bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

.ic-wallet-meta > div { margin-bottom: 4px; }

.ic-input-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Coupon — collapsible-feel inline ---------- */
.ic-coupon-field {
    display: flex;
    gap: 8px;
}

.ic-coupon-field .ic-input { flex: 1; }

.ic-coupon-apply {
    background: var(--bs-primary);
    color: var(--bs-body);
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.ic-coupon-apply:hover { background: var(--bs-btn-hover-bg); }

.ic-coupon-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ic-coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bs-light-success);
    color: var(--bs-success);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.ic-coupon-remove {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.ic-coupon-message {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

/* ---------- Order summary — receipt-style box ---------- */
.ic-summary {
    background: var(--bs-tertiary-bg);
    border-left: 3px solid var(--bs-warning);
    border-radius: 0 12px 12px 0;
    padding: 18px 18px 22px;
    margin-top: 16px;
}

.ic-summary .ic-card-dot { background: var(--bs-warning); }
.ic-summary:hover .ic-card-dot,
.ic-summary:focus-within .ic-card-dot {
    box-shadow: 0 0 0 4px rgba(var(--bs-warning-rgb), 0.18);
}

.ic-totals {
    border-top: 1px dashed var(--bs-border-color);
    padding-top: 12px;
    margin-bottom: 16px;
}

.ic-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 0.92rem;
}

.ic-total-label {
    color: var(--bs-secondary-color);
}

.ic-total-value {
    font-weight: 600;
    color: var(--bs-body-color);
}

.ic-total-grand {
    border-top: 2px solid var(--bs-primary);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.05rem;
}

.ic-total-grand .ic-total-label {
    color: var(--bs-body-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}

.ic-total-grand .ic-total-value {
    font-size: 1.4rem;
    color: var(--bs-primary);
    font-weight: 800;
}

/* Discount row */
.ic-total-discount .ic-total-value { color: var(--bs-success); }

/* ---------- Place order — big, full-width, with delivery promise ---------- */
.checkout-btn,
.ic-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--bs-primary);
    color: var(--bs-body);
    border: 0;
    border-radius: 10px;
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.18);
}

.checkout-btn:hover,
.ic-submit:hover {
    background: var(--bs-btn-hover-bg);
    box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), 0.25);
}

.checkout-btn:active,
.ic-submit:active { transform: translateY(1px); }

.checkout-btn svg { stroke: currentColor; }

/* ---------- Trust strip below place order ---------- */
.ic-trust {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--bs-secondary-color);
    flex-wrap: wrap;
}

.ic-trust span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ic-trust svg { color: var(--bs-success); }

/* ---------- Mobile sticky place order — improves grocery-app feel ---------- */
@media (max-width: 767.98px) {
    .ic-head { padding: 0 12px 14px; margin-bottom: 14px; }
    .ic-head-title { font-size: 1.25rem; }
    .ic-trust-strip { margin-bottom: 16px; padding: 0 12px; }
    .ic-card { padding: 14px 14px 14px 18px; }
    .ic-summary { padding: 16px; }
    .ic-total-grand .ic-total-value { font-size: 1.2rem; }
}
