@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Jost:wght@400;500;600;700&display=swap');

/* ===== Checkout hero — scoped to .checkout-hero only, shares the same design language as the product page ===== */
.checkout-hero {
    --co-accent: #c2385a;
    --co-accent-dark: #8f2440;
    --co-mpesa: #1a9c50;
    --co-ink: #211d1e;
    --co-body: #443c3f;
    --co-muted: #6d6265;
    --co-meta: #8a7f83;
    --co-border: #eadfe2;
    --co-bg: #fdfbfa;

    background: var(--co-bg);
    color: var(--co-ink);
    font-family: 'Jost', sans-serif;
    padding: 32px 0 60px;
}

.checkout-hero * {
    box-sizing: border-box;
}

.checkout-hero a:not(.co-cta) {
    color: var(--co-accent);
}

.checkout-hero h1,
.checkout-hero h2,
.checkout-hero h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--co-ink);
    margin: 0;
    line-height: 1.1;
}

.co-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- Step indicator ----- */
.co-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--co-meta);
    margin-bottom: 32px;
}

.co-steps .co-step {
    color: var(--co-meta);
}

.co-steps .co-step.done {
    color: var(--co-ink);
    font-weight: 700;
}

.co-steps .co-step.current {
    color: var(--co-accent);
    font-weight: 700;
}

/* ----- Grid ----- */
.co-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .co-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Grid items default to min-width:auto, so a wide-enough child (a long
       shipping-option label, an input's placeholder, etc.) can still force
       this single column wider than the viewport itself ("grid blowout")
       even with the minmax(0, ...) track above — min-width:0 on the items
       themselves is what actually lets them shrink to the available space. */
    .co-grid > * {
        min-width: 0;
    }
}

/* ----- Form sections ----- */
.co-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.co-section h2 {
    font-size: 26px;
    font-weight: 600;
}

.co-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .co-row {
        grid-template-columns: 1fr;
    }
}

.co-field,
.checkout-hero input[type="text"],
.checkout-hero input[type="email"],
.checkout-hero input[type="tel"],
.checkout-hero input[type="password"],
.checkout-hero textarea {
    padding: 13px 16px;
    border: 1px solid #d8ccd0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Jost', sans-serif;
    background: #fff;
    color: var(--co-ink);
    width: 100%;
}

.checkout-hero input:focus,
.checkout-hero textarea:focus {
    border-color: var(--co-accent);
    outline: none;
}

.checkout-hero textarea {
    resize: vertical;
}

.co-toggle-info {
    font-size: 14px;
    color: var(--co-muted);
    margin-bottom: 8px;
}

.co-email-hint {
    font-size: 13px;
    color: var(--co-accent-dark);
    background: #fdf1f4;
    border-radius: 8px;
    padding: 8px 14px;
    margin: -4px 0 0;
}

.co-toggle-info a {
    font-weight: 700;
}

.co-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--co-body);
}

.co-checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--co-accent);
}

/* ----- Shipping method cards ----- */
.co-ship-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-ship-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--co-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-family: 'Jost', sans-serif;
    width: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.co-ship-option:hover {
    border-color: #d8ccd0;
    box-shadow: 0 6px 18px rgba(33, 29, 30, 0.06);
    transform: translateY(-1px);
}

.co-ship-option.active {
    border: 1px solid var(--co-accent);
    background: #fdf1f4;
    box-shadow: 0 8px 22px rgba(194, 56, 90, 0.14);
    transform: translateY(-1px);
}

.co-ship-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3ecee;
    color: var(--co-muted);
    font-size: 18px;
    transition: background 0.18s ease, color 0.18s ease;
}

.co-ship-option.active .co-ship-icon {
    background: var(--co-accent);
    color: #fff;
}

.co-ship-radio {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #c9bcc0;
    box-sizing: border-box;
    position: relative;
    transition: border-color 0.18s ease;
}

.co-ship-option.active .co-ship-radio {
    border-color: var(--co-accent);
}

.co-ship-option.active .co-ship-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--co-accent);
}

.co-ship-info {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.co-ship-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.co-ship-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-ship-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--co-ink);
}

.co-ship-eta {
    flex: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--co-accent-dark);
    background: #fbe3ea;
    padding: 3px 8px;
    border-radius: 999px;
}

.co-ship-desc {
    font-size: 13px;
    color: var(--co-muted);
    line-height: 1.5;
}

.co-ship-price {
    flex: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--co-ink);
    white-space: nowrap;
}

/* ----- Payment method cards ----- */
.co-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-payment-card {
    border: 1px solid #d8ccd0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.co-payment-card.active {
    border: 2px solid var(--co-accent);
}

.co-payment-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    padding: 18px 20px;
    cursor: pointer;
    text-align: left;
    font-family: 'Jost', sans-serif;
}

.co-payment-badge {
    flex: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--co-mpesa);
}

.co-payment-badge.paypal {
    background: #00457c;
    font-style: italic;
}

.co-payment-label {
    flex: 1;
}

.co-payment-label .co-payment-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--co-ink);
}

.co-payment-label .co-payment-sub {
    display: block;
    font-size: 13px;
    color: var(--co-muted);
    margin-top: 2px;
}

.co-payment-body {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-payment-note {
    font-size: 13px;
    color: var(--co-muted);
    line-height: 1.6;
}

/* ----- Order summary ----- */
.co-summary {
    position: sticky;
    top: 32px;
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 16px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.co-summary h2 {
    font-size: 24px;
    font-weight: 600;
}

.co-summary-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.co-summary-item {
    display: flex;
    gap: 14px;
    align-items: center;
}

.co-summary-item img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex: none;
    background: #f6dee6;
}

.co-summary-item .co-item-info {
    flex: 1;
    min-width: 0;
}

.co-summary-item .co-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--co-ink);
    display: block;
}

.co-summary-item .co-item-qty {
    font-size: 12px;
    color: var(--co-muted);
}

.co-summary-item .co-item-price {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.co-summary-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--co-body);
    border-top: 1px solid var(--co-border);
    padding-top: 16px;
}

.co-summary-totals .co-total-row {
    display: flex;
    justify-content: space-between;
}

.co-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid var(--co-border);
    padding-top: 16px;
}

.co-summary-total .co-total-label {
    font-weight: 700;
    font-size: 16px;
}

.co-summary-total .co-total-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 700;
}

.co-cta {
    border: none;
    border-radius: 999px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Jost', sans-serif;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.3px;
    background: var(--co-accent);
    transition: filter 0.2s ease;
    width: 100%;
}

.co-cta:hover {
    filter: brightness(0.92);
}

.co-cta.mpesa {
    background: var(--co-mpesa);
}

.co-trust-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: var(--co-meta);
}

/* ----- Empty cart ----- */
.co-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 0;
}

.co-empty img {
    max-width: 240px;
}

.co-empty-title {
    font-size: 26px;
    text-align: center;
}

.co-empty-subtitle {
    font-size: 15px;
    color: var(--co-muted);
    text-align: center;
    margin: -8px 0 4px;
}

.co-suggest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 960px;
}

@media (max-width: 700px) {
    .co-suggest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.co-suggest-item {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #f3ecee;
    text-decoration: none;
}

.co-suggest-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.co-suggest-item:hover img {
    transform: scale(1.06);
}

.co-suggest-item-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(33, 29, 30, 0.75), rgba(33, 29, 30, 0));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.co-suggest-item:hover .co-suggest-item-caption {
    opacity: 1;
}

/* ----- M-Pesa live status ----- */
.co-mpesa-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--co-body);
}

/* ----- Cart page ----- */
.co-cart-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.co-cart-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--co-border);
    border-radius: 14px;
    background: #fff;
}

.co-cart-thumb {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    object-fit: cover;
    flex: none;
    background: #f6dee6;
}

.co-cart-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.co-cart-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--co-ink);
    text-decoration: none;
}

.co-cart-title:hover {
    color: var(--co-accent);
}

.co-cart-unit {
    font-size: 13px;
    color: var(--co-muted);
}

.co-cart-qty {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.co-cart-qty label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--co-meta);
}

.co-cart-qty input {
    width: 64px;
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #d8ccd0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Jost', sans-serif;
}

.co-cart-qty input:focus {
    border-color: var(--co-accent);
    outline: none;
}

.co-cart-line-total {
    flex: none;
    width: 100px;
    text-align: right;
    font-weight: 700;
    font-size: 15px;
    color: var(--co-ink);
}

.co-cart-remove {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--co-muted);
    transition: background 0.18s ease, color 0.18s ease;
}

.co-cart-remove:hover {
    background: #fbe3ea;
    color: var(--co-accent-dark);
}

.co-cart-actions {
    display: flex;
    justify-content: flex-start;
}

.co-cart-continue {
    font-size: 14px;
    font-weight: 700;
    color: var(--co-ink);
    text-decoration: none;
}

.co-cart-continue:hover {
    color: var(--co-accent);
}

.co-cart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.co-continue-top {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid var(--co-border);
    border-radius: 999px;
    color: var(--co-ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.co-continue-top:hover {
    border-color: var(--co-accent);
    color: var(--co-accent);
}

@media (max-width: 575px) {
    .co-cart-item {
        flex-wrap: wrap;
    }

    .co-cart-line-total {
        width: auto;
        margin-left: auto;
    }

    /* Shipping option cards: at this width, .co-ship-info's title + eta badge
       + price were all competing for space in the same inline flex row,
       squeezing the title text down to only ~25px wide and forcing it to
       wrap word-by-word. Stack price below the text, and let the eta badge
       wrap onto its own line if the title doesn't leave room for it. */
    .co-ship-option {
        padding: 16px;
        gap: 12px;
    }

    .co-ship-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .co-ship-title-row {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .co-ship-price {
        font-size: 14px;
    }
}
