/* ============================================================
   IsoPep Cart Page — [my_custom_modern_cart]
   Self-contained. Matches the cart drawer (Inter, navy #0F1E3A).
   All classes are namespaced `.psc-cp-` to avoid theme/drawer clashes.
   ============================================================ */

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

.psc-cp,
.psc-cp *,
.psc-cp *::before,
.psc-cp *::after { box-sizing: border-box; }

.psc-cp {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0F1E3A;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    -webkit-font-smoothing: antialiased;
}

.psc-cp-inner { width: 100%; }

/* Header */
.psc-cp-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.psc-cp-title {
    font-size: 28px;
    font-weight: 800;
    color: #0F1E3A;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.psc-cp-count {
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
}

/* Layout grid */
.psc-cp-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}
.psc-cp-main { min-width: 0; }

/* Items container */
.psc-cp-items {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 4px 20px;
}

/* Single item — grid: image | info | qty | price */
.psc-cp-item {
    display: grid;
    grid-template-columns: 88px 1fr auto auto;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
    animation: pscCpFade 0.3s ease forwards;
}
.psc-cp-item:last-child { border-bottom: none; }

@keyframes pscCpFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.psc-cp-item-img {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.psc-cp-item-img a { display: block; width: 100%; height: 100%; }
.psc-cp-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.psc-cp-item-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.psc-cp-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #0F1E3A;
    text-decoration: none !important;
    line-height: 1.35;
}
.psc-cp-item-name:hover { color: #4E6FAE; }

.psc-cp-attrs { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.psc-cp-attr {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 5px;
}
.psc-cp-attr-label { font-weight: 600; color: #475569; }

.psc-cp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.psc-cp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 5px;
}
.psc-cp-badge-bundle { color: #1e40af; background: #eff6ff; }
.psc-cp-badge-save   { color: #16a34a; background: #f0fdf4; }

.psc-cp-unit { font-size: 12px; color: #94a3b8; }

.psc-cp-remove {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    padding: 0;
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}
.psc-cp-remove:hover { color: #ef4444; }

/* Quantity */
.psc-cp-item-qty { display: flex; justify-content: center; }
.psc-cp-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.psc-cp-qty-btn {
    width: 36px;
    height: 38px;
    border: none;
    background: #ffffff;
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    padding: 0;
    font-family: inherit;
}
.psc-cp-qty-btn:hover { background: #f1f5f9; }
.psc-cp-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.psc-cp-qty-val {
    width: 38px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0F1E3A;
}

.psc-cp-item-price {
    font-size: 16px;
    font-weight: 800;
    color: #0F1E3A;
    text-align: right;
    min-width: 72px;
    white-space: nowrap;
}

/* Loading state on items list */
.psc-cp-items.psc-cp-loading { opacity: 0.5; pointer-events: none; }

/* Continue shopping link */
.psc-cp-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.psc-cp-continue-link:hover { color: #0F1E3A; }

/* ── Summary card ── */
.psc-cp-aside { position: sticky; top: 24px; }
.psc-cp-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 30, 58, 0.05);
}
.psc-cp-summary-title {
    font-size: 18px;
    font-weight: 800;
    color: #0F1E3A;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}
.psc-cp-rows { display: flex; flex-direction: column; gap: 12px; }
.psc-cp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: #475569;
}
.psc-cp-row .psc-cp-amount { font-weight: 700; color: #0F1E3A; }
.psc-cp-row-muted { color: #94a3b8; font-size: 13px; }
.psc-cp-discount { color: #16a34a; font-weight: 700; white-space: nowrap; }

.psc-cp-coupon-remove {
    border: none;
    background: none;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.psc-cp-coupon-remove:hover { color: #ef4444; }

.psc-cp-row-total {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 700;
    color: #0F1E3A;
}
.psc-cp-row-total .psc-cp-grand-total { font-size: 20px; font-weight: 800; }
.psc-cp-row-total .psc-cp-grand-total .woocommerce-Price-amount { font-weight: 800; }

/* Coupon input */
.psc-cp-coupon { display: flex; gap: 8px; margin-top: 18px; }
.psc-cp-coupon-input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: #0F1E3A;
    background: #fff;
    transition: border-color 0.2s ease;
}
.psc-cp-coupon-input:focus { outline: none; border-color: #4E6FAE; }
.psc-cp-coupon-btn {
    flex-shrink: 0;
    padding: 11px 18px;
    border: 1.5px solid #0F1E3A;
    border-radius: 10px;
    background: #fff;
    color: #0F1E3A;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.psc-cp-coupon-btn:hover { background: #0F1E3A; color: #fff; }
.psc-cp-coupon-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.psc-cp-coupon-msg {
    font-size: 12.5px;
    margin-top: 8px;
    min-height: 0;
}
.psc-cp-coupon-msg.psc-cp-err { color: #ef4444; }
.psc-cp-coupon-msg.psc-cp-ok  { color: #16a34a; }

/* Consent (21+ / research) — mirrors drawer style */
.psc-cp-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 10px;
    cursor: pointer;
    margin: 18px 0 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}
.psc-cp-consent-row:hover { background: #e0f2fe; border-color: #7dd3fc; }
.psc-cp-consent-check { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.psc-cp-consent-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #0EA5E9;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    margin-top: 1px;
}
.psc-cp-consent-check:checked + .psc-cp-consent-box {
    background: #0EA5E9;
    color: #fff;
    transform: scale(1.05);
}
.psc-cp-consent-text { font-size: 12.5px; line-height: 1.45; color: #0c4a6e; font-weight: 500; }
.psc-cp-consent-text strong { color: #0EA5E9; font-weight: 700; }

.psc-cp-consent-row.psc-cp-shake {
    animation: pscCpShake 0.45s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444;
    background: #fef2f2;
}
.psc-cp-consent-row.psc-cp-shake .psc-cp-consent-box { border-color: #ef4444; }
@keyframes pscCpShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* Checkout button */
.psc-cp-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: #0F1E3A;
    color: #fff !important;
    text-decoration: none !important;
    text-align: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.15s ease;
}
.psc-cp-checkout:hover { background: #1a2d4f; transform: translateY(-1px); }
.psc-cp-checkout svg { flex-shrink: 0; }
.psc-cp-checkout.psc-cp-checkout-disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    pointer-events: auto;
    transform: none;
}
.psc-cp-checkout.psc-cp-checkout-disabled:hover { background: #cbd5e1; transform: none; }

.psc-cp-checkout-hint {
    font-size: 11.5px;
    color: #94a3b8;
    text-align: center;
    margin: 8px 0 0;
    transition: opacity 0.2s ease;
}
.psc-cp-checkout-hint.psc-cp-hidden { opacity: 0; height: 0; margin: 0; overflow: hidden; }

/* Trust row */
.psc-cp-trust {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.psc-cp-trust-cell {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
}
.psc-cp-trust-cell svg { color: #16a34a; flex-shrink: 0; }

/* ── Empty state ── */
.psc-cp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 64px 24px;
}
.psc-cp-empty-title { font-size: 20px; font-weight: 700; color: #0F1E3A; margin: 4px 0 0; }
.psc-cp-empty-text { font-size: 14px; color: #64748b; margin: 0; }
.psc-cp-empty-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 13px 30px;
    background: #0F1E3A;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}
.psc-cp-empty-btn:hover { background: #1a2d4f; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .psc-cp-grid { grid-template-columns: 1fr; }
    .psc-cp-aside { position: static; }
}

@media (max-width: 560px) {
    .psc-cp { padding: 16px 12px 40px; }
    .psc-cp-title { font-size: 23px; }
    .psc-cp-items { padding: 2px 14px; }
    .psc-cp-item {
        grid-template-columns: 64px 1fr;
        grid-template-areas:
            "img info"
            "img qty"
            "price price";
        gap: 8px 14px;
        padding: 16px 0;
    }
    .psc-cp-item-img { grid-area: img; width: 64px; height: 64px; }
    .psc-cp-item-info { grid-area: info; }
    .psc-cp-item-qty { grid-area: qty; justify-content: flex-start; margin-top: 2px; }
    .psc-cp-item-price { grid-area: price; text-align: left; font-size: 15px; }
    .psc-cp-summary { padding: 20px; }
}