/* SmartDeal — Cart page (override de WC default).
   Aplica a /carrito/ — fallback del flujo (mini cart drawer es el principal).

   Tokens: usa las mismas vars que el resto del sitio (--sd-lime, --sd-black, etc.)
   declaradas en layout.css. Si esta página carga sin layout.css por algún motivo,
   los valores fallback hardcoded mantienen el diseño legible.
*/

/* ─── PAGE WRAPPER ─────────────────────────────────────────────── */
.sd-cart-page {
    max-width: 1200px;
    margin: 32px auto 64px;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #0a0a0a;
}

.sd-cart-page__header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.sd-cart-page__title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #0a0a0a;
}

.sd-cart-page__subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

/* ─── GRID ─────────────────────────────────────────────────────── */
.sd-cart-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .sd-cart-page__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ─── ITEMS ────────────────────────────────────────────────────── */
.sd-cart-page__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-cart-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    transition: border-color 150ms ease;
}

.sd-cart-row:hover {
    border-color: #D1D5DB;
}

.sd-cart-row--addon {
    background: #FAFBF7;
    border-color: #E8EDD9;
    border-left: 3px solid #C8F046;
}

.sd-cart-row__media img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #F9FAFB;
    border-radius: 8px;
    display: block;
}

.sd-cart-row__body {
    min-width: 0;
}

.sd-cart-row__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #0a0a0a;
}

.sd-cart-row__name a {
    color: inherit;
    text-decoration: none;
}

.sd-cart-row__name a:hover {
    color: #1f2937;
}

.sd-cart-row__body .variation,
.sd-cart-row__body dl {
    font-size: 12.5px;
    color: #6B7280;
    margin: 0 0 8px;
}

.sd-cart-row__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* qty stepper (estilo consistente con mini cart drawer) */
.sd-cart-row__qty .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.sd-cart-row__qty .quantity input.qty {
    width: 44px;
    height: 32px;
    border: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    -moz-appearance: textfield;
}

.sd-cart-row__qty .quantity input.qty::-webkit-outer-spin-button,
.sd-cart-row__qty .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sd-cart-row__qty-static {
    font-size: 13px;
    color: #6B7280;
    font-weight: 600;
}

.sd-cart-row__remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6B7280;
    font-size: 12.5px;
    text-decoration: none;
    transition: color 150ms ease;
}

.sd-cart-row__remove:hover {
    color: #DC2626;
}

.sd-cart-row__price {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
    text-align: right;
    white-space: nowrap;
}

.sd-cart-row__price del {
    display: block;
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
    margin-bottom: 2px;
}

@media (max-width: 600px) {
    .sd-cart-row {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 12px;
    }
    .sd-cart-row__media img {
        width: 72px;
        height: 72px;
    }
    .sd-cart-row__price {
        grid-column: 1 / -1;
        text-align: left;
        padding-top: 8px;
        border-top: 1px solid #F3F4F6;
    }
}

/* ─── COUPON & UPDATE ─────────────────────────────────────────── */
.sd-cart-page__coupon {
    margin-top: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 10px;
}

.sd-cart-page__coupon label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.sd-cart-page__coupon-row {
    display: flex;
    gap: 8px;
}

.sd-cart-page__coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.sd-cart-page__coupon-btn {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #0a0a0a;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    color: #0a0a0a;
    transition: all 150ms ease;
}

.sd-cart-page__coupon-btn:hover {
    background: #0a0a0a;
    color: #fff;
}

.sd-cart-page__update {
    display: none; /* WC obliga el botón existir, lo escondemos — qty actualiza con AJAX o reload */
}

/* ─── SUMMARY SIDEBAR ─────────────────────────────────────────── */
.sd-cart-page__summary {
    position: sticky;
    top: 100px;
}

@media (max-width: 900px) {
    .sd-cart-page__summary {
        position: static;
    }
}

.sd-cart-summary {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sd-cart-summary__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 18px;
    color: #0a0a0a;
}

.sd-cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #4B5563;
    border-bottom: 1px solid #F3F4F6;
}

.sd-cart-summary__row strong {
    color: #0a0a0a;
    font-weight: 600;
}

.sd-cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 0 14px;
    border-top: 2px solid #0a0a0a;
    margin-top: 6px;
}

.sd-cart-summary__total-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0a0a0a;
}

.sd-cart-summary__installments {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

.sd-cart-summary__installments strong {
    color: #0a0a0a;
    font-weight: 700;
}

.sd-cart-summary__total-amount {
    font-size: 22px;
    font-weight: 800;
    color: #0a0a0a;
    letter-spacing: -0.01em;
}

.sd-cart-summary__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    background: #C8F046;
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 14px;
    transition: transform 150ms ease, box-shadow 150ms ease;
    border: 0;
    cursor: pointer;
}

.sd-cart-summary__checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 240, 70, 0.45);
    color: #0a0a0a;
}

.sd-cart-summary__continue {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #6B7280;
    font-size: 13.5px;
    text-decoration: none;
    padding: 8px;
}

.sd-cart-summary__continue:hover {
    color: #0a0a0a;
}

/* trust strip */
.sd-cart-summary__trust {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.sd-cart-summary__trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4B5563;
}

/* MP badge mini (consistente con drawer) */
.sd-cart-summary .sd-mp-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #00C9FF 0%, #0099CB 100%);
    color: #fff;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: -0.2px;
    margin-left: 2px;
}

/* ─── EMPTY STATE ─────────────────────────────────────────────── */
.sd-cart-empty {
    max-width: 720px;
    margin: 60px auto 80px;
    padding: 0 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #0a0a0a;
}

.sd-cart-empty__illustration {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.sd-cart-empty__title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.sd-cart-empty__lead {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto 28px;
}

.sd-cart-empty__actions {
    margin-bottom: 32px;
}

.sd-cart-empty__cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #C8F046;
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    border-radius: 10px;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.sd-cart-empty__cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 240, 70, 0.45);
    color: #0a0a0a;
}

.sd-cart-empty__quick-links {
    margin-bottom: 36px;
}

.sd-cart-empty__quick-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.sd-cart-empty__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.sd-cart-empty__chip {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 150ms ease;
}

.sd-cart-empty__chip:hover {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.sd-cart-empty__trust {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #E5E7EB;
    text-align: left;
}

@media (min-width: 700px) {
    .sd-cart-empty__trust {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sd-cart-empty__trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-cart-empty__trust-item strong {
    display: block;
    font-size: 13.5px;
    color: #0a0a0a;
    font-weight: 700;
}

.sd-cart-empty__trust-item span {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 1px;
}

/* ─── HIDE WC NATIVES that we don't use ──────────────────────── */
.woocommerce-cart .cart_totals, /* default WC totals — reemplazadas por sd-cart-summary */
.woocommerce-cart .cross-sells {
    display: none;
}

/* WC notices — alinear con el wrapper */
.woocommerce-cart .woocommerce-notices-wrapper:not(:empty) {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 20px;
}
