/* =============================================
   carrito.css — Estilos específicos del carrito
   Complementa tienda_web.css sin reemplazarlo.
   ============================================= */

/* ── Selector de Tipo de Entrega ── */
.c1-dtype-selector {
    display: flex;
    gap: 5px;
    margin-top: 0;
    margin-bottom: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.c1-dtype-selector::-webkit-scrollbar { display: none; }

/* ── Formulario del cliente ── */
.c1-form {
    margin-bottom: 4px;
}

.c1-fields-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.c1-field-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border: 2px solid #333;
    border-radius: 8px;
    background: white;
    padding: 5px 8px;
    gap: 5px;
}

.c1-field-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #666;
}

.c1-field-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
    background: transparent;
    color: #1a1a2e;
}

.c1-field-input::placeholder {
    color: #aaa;
}

/* ── Campos adicionales según tipo de entrega ── */
.c1-delivery-extra {
    margin-bottom: 4px;
}

/* ── Lista de Productos (scroll interno) ── */
.c1-product-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 2px;
    padding-bottom: 4px;
}
.c1-product-list::-webkit-scrollbar {
    width: 3px;
}
.c1-product-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

/* ── Cards de producto ── */
.c1-product-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.c1-prod-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.c1-prod-info {
    flex: 1;
    min-width: 0;
}

.c1-prod-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c1-prod-price {
    font-size: 0.88rem;
    font-weight: 900;
    color: var(--primary, #F85F35);
}

.c1-prod-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.c1-prod-qty-label {
    font-size: 0.7rem;
    color: #999;
}

/* ── Footer del carrito: métodos de pago ── */
.c1-payment-box {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
}

.c1-payment-title {
    font-size: 0.75rem;
    font-weight: 900;
    color: #333;
    margin-bottom: 6px;
}

.c1-payment-methods {
    display: flex;
    gap: 6px;
}

.c1-pay-btn {
    flex: 1;
    padding: 5px 4px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: border 0.2s, background 0.2s;
    font-family: 'Outfit', sans-serif;
}

.c1-pay-btn.active {
    border: 2px solid var(--primary, #F85F35);
    background: #ffebee;
}

.c1-pay-btn-icon { font-size: 1.1rem; }

.c1-pay-btn-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #555;
}
.c1-pay-btn.active .c1-pay-btn-label {
    color: var(--primary, #F85F35);
}

/* ── Banner Ahorro ── */
.c1-savings-banner {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #e8f5e9;
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2e7d32;
}

/* ── Totales en footer ── */
.c1-totals {
    line-height: 1.3;
    min-width: 0;
}

.c1-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #888;
}

.c1-grand-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 900;
    color: #1a1a2e;
    border-top: 1px dashed #ddd;
    padding-top: 2px;
    margin-top: 2px;
}

.c1-grand-total-amount {
    color: var(--primary, #F85F35);
}

/* ── Botón Continuar con mensaje ── */
.c1-continue-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.c1-continue-btn {
    background: var(--primary, #F85F35);
    color: white;
    border: none;
    border-radius: 22px;
    padding: 11px 22px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.c1-continue-btn:active { transform: scale(0.97); }

.c1-missing-msg {
    font-size: 0.67rem;
    color: var(--primary, #F85F35);
    font-weight: 700;
    margin-top: 4px;
    text-align: center;
}

/* ══════════════════════════════════════════════
   Paso 2 — Confirmar Pedido
   ══════════════════════════════════════════════ */

.c2-block {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.c2-block-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    color: var(--primary, #F85F35);
    width: 28px;
    text-align: center;
}

.c2-block-body {
    flex: 1;
    min-width: 0;
}

.c2-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.c2-block-title {
    font-size: 0.85rem;
    font-weight: 900;
    color: #1a1a2e;
}

.c2-edit-btn {
    border: none;
    background: none;
    color: var(--primary, #F85F35);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

.c2-block-info {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.5;
}

.c2-product-list {
    margin-bottom: 8px;
}

.c2-product-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.c2-totals {
    border-top: 1px solid #f0f0f0;
    padding-top: 6px;
}

.c2-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 3px;
}

.c2-grand-total {
    font-size: 1rem;
    font-weight: 900;
    color: #1a1a2e;
    border-top: 1px dashed #eee;
    padding-top: 4px;
    margin-top: 2px;
}

.c2-total-amount {
    color: var(--primary, #F85F35);
}

.c2-notes-block {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 10px;
    background: white;
    margin-bottom: 8px;
}

.c2-notes-icon {
    font-size: 1rem;
    color: #ccc;
    flex-shrink: 0;
    margin-top: 2px;
}

.c2-notes-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    resize: none;
    min-height: 38px;
    color: #333;
    background: transparent;
}

/* ══════════════════════════════════════════════
   Modales de Pago
   ══════════════════════════════════════════════ */

/* Mercado Pago */
.mp-modal {
    text-align: center;
    padding: 10px 5px;
    font-family: 'Outfit', sans-serif;
}

.mp-icon-wrap {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #009ee3, #00b1ea);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-icon { font-size: 2rem; color: white; }

.mp-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.mp-subtitle {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
    margin: 0 0 22px;
}

.mp-pay-btn {
    display: block;
    background: linear-gradient(135deg, #009ee3, #00b1ea);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(0,158,227,0.35);
    transition: transform 0.2s;
    margin-bottom: 16px;
}

.mp-pay-btn:hover { transform: scale(1.02); }

.mp-later { margin-bottom: 14px; }

.mp-later-link {
    font-size: 0.78rem;
    color: #aaa;
    text-decoration: none;
}

.mp-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.mp-footer-text { font-size: 0.65rem; color: #bbb; }
.mp-footer-brand { font-size: 0.72rem; color: #009ee3; font-weight: 800; }

/* Transferencia */
.tf-modal {
    font-family: 'Outfit', sans-serif;
    text-align: center;
    padding: 5px;
}

.tf-icon-wrap {
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    border: 2px solid #2980b9;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-icon { font-size: 1.8rem; }

.tf-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #1a5276;
    margin: 0 0 6px;
}

.tf-amount {
    font-size: 1.1rem;
    font-weight: 900;
    color: #2980b9;
    margin-bottom: 12px;
}

.tf-banco-datos {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.83rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.tf-alert {
    background: #fff3cd;
    color: #856404;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    font-size: 0.77rem;
    text-align: left;
    margin-bottom: 12px;
}

.tf-form { text-align: left; }

.tf-label {
    font-size: 0.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
    color: #333;
}

.tf-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.tf-input-file {
    width: 100%;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.tf-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 3px 12px rgba(39,174,96,0.3);
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.tf-submit-btn:active { transform: scale(0.98); }

.tf-error {
    color: #e74c3c;
    font-size: 0.8rem;
    text-align: center;
    margin: 0 0 8px;
}

.tf-later { text-align: center; margin-top: 10px; }

.tf-later-link {
    color: #aaa;
    font-size: 0.8rem;
    text-decoration: none;
}

/* ══════════════════════════════════════════════
   Popup Seguimiento (Orders popup)
   ══════════════════════════════════════════════ */

.op-container {
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

.op-header {
    padding: 12px 16px;
    background: var(--dark, #1a1a2e);
    color: white;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.op-list {
    max-height: 280px;
    overflow-y: auto;
}

.op-order-item {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--dark, #1a1a2e);
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
    transition: background 0.15s;
}

.op-order-item:hover { background: #fafafa; }

.op-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.op-order-id { font-weight: 900; }

.op-order-track {
    color: var(--primary, #F85F35);
    font-weight: 700;
    font-size: 0.8rem;
}

.op-footer {
    padding: 4px;
    border-top: 1px solid #f0f0f0;
}

.op-clear-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: white;
    color: #e53935;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.15s;
}

.op-clear-btn:hover { background: #fff5f5; }
