/* ============================================================
   QuickCheckout — CSS rediseñado
   Estilo: limpio, tarjetas con borde redondeado, azul turquesa #25b9d7
   Igual al look de Warehouse que ya usa la tienda
============================================================ */

/* ---- Contenedor principal ---- */
.qc-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0 60px;
    font-family: inherit;
    color: #333;
}

/* ============================================================
   SECCIÓN PRODUCTOS — tabla completa
============================================================ */

.qc-section--products {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.qc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* Cabecera */
.qc-th {
    background: #f7f8fa;
    padding: 13px 18px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.qc-th--price,
.qc-th--qty,
.qc-th--total { text-align: right; }

/* Filas */
.qc-tr { border-bottom: 1px solid #f2f2f2; }
.qc-tr:last-child { border-bottom: none; }
.qc-tr:hover { background: #fafbfc; }

.qc-td {
    padding: 14px 18px;
    vertical-align: middle;
    color: #333;
}

.qc-td--price,
.qc-td--qty,
.qc-td--total { text-align: right; }

.qc-td--bold { font-weight: 700; }

/* Celda de producto: imagen + nombre */
.qc-product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.qc-product-img-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qc-product-img-wrap--empty { color: #ccc; font-size: 1.5rem; }

.qc-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qc-product-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.qc-product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #222;
    text-decoration: none;
    line-height: 1.3;
}
.qc-product-name:hover { color: #25b9d7; }

.qc-product-attr {
    font-size: 0.78rem;
    color: #999;
}

/* Referencia */
.qc-ref {
    font-size: 0.78rem;
    color: #aaa;
    font-family: monospace;
}

/* Badge cantidad */
.qc-qty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #f0f0f0;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
}

/* ============================================================
   SECCIÓN INFERIOR — dirección (izq) + totales/botón (der)
============================================================ */

.qc-bottom {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.qc-bottom__left  { flex: 1 1 0; min-width: 0; }
.qc-bottom__right { flex: 0 0 320px; }

/* ---- Tarjeta genérica ---- */
.qc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.qc-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 18px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.qc-icon {
    width: 18px;
    height: 18px;
    color: #25b9d7;
    flex-shrink: 0;
}

/* ---- Tarjeta de dirección ---- */
.qc-address-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.qc-address-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}

.qc-address-card input.qc-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qc-address-card:hover { border-color: #25b9d7; background: #f7fdfe; }

.qc-address-card--active {
    border-color: #25b9d7;
    background: #f0fafd;
}

/* Tarjeta única (sin radio) */
.qc-address-card--single {
    border: 2px solid #25b9d7;
    background: #f0fafd;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: default;
}

/* Check visual */
.qc-address-card__check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: border-color .15s, background .15s;
}
.qc-address-card__check svg {
    width: 12px;
    height: 12px;
    color: #fff;
    opacity: 0;
    transition: opacity .15s;
}

.qc-address-card--active .qc-address-card__check {
    background: #25b9d7;
    border-color: #25b9d7;
}
.qc-address-card--active .qc-address-card__check svg { opacity: 1; }

/* Contenido de la dirección */
.qc-address-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qc-address-card__alias {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #25b9d7;
}

.qc-address-card__name,
.qc-address-card--single .qc-address-card__name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #222;
}

.qc-address-card__line,
.qc-address-card--single .qc-address-card__line {
    font-size: 0.84rem;
    color: #666;
    line-height: 1.4;
}

/* ---- Totales ---- */
.qc-totals { margin-bottom: 20px; }

.qc-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}
.qc-totals__row:last-child { border-bottom: none; }

.qc-totals__row--total {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 2px solid #222;
    border-bottom: none;
}

.qc-free { color: #27ae60; font-weight: 700; font-style: normal; }

/* ---- Botones ---- */
.qc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, opacity .15s;
    line-height: 1.2;
}

.qc-btn--primary {
    background: #25b9d7;
    border-color: #25b9d7;
    color: #fff !important;
}
.qc-btn--primary:hover:not(:disabled) {
    background: #1ea3be;
    border-color: #1ea3be;
}
.qc-btn--primary:disabled {
    background: #c0c0c0;
    border-color: #c0c0c0;
    cursor: not-allowed;
    opacity: .7;
}

.qc-btn--outline {
    background: transparent;
    border-color: #25b9d7;
    color: #25b9d7 !important;
}
.qc-btn--outline:hover {
    background: #f0fafd;
}

.qc-btn--full { width: 100%; }

/* Spinner */
.qc-btn--loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}
.qc-btn--loading::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    top: 50%; left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qc-spin .7s linear infinite;
}
@keyframes qc-spin { to { transform: rotate(360deg); } }

/* ---- Links ---- */
.qc-link {
    display: inline-block;
    font-size: 0.82rem;
    color: #25b9d7;
    text-decoration: none;
    margin-top: 6px;
}
.qc-link:hover { text-decoration: underline; color: #1a8fa8; }

.qc-link--back {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.84rem;
    color: #999;
}
.qc-link--back:hover { color: #555; }

.qc-link--small { font-size: 0.8rem; }

/* ---- Avisos ---- */
.qc-notice {
    display: flex;
    gap: 12px;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.qc-notice--info {
    background: #e8f6fb;
    border: 1px solid #a8dcea;
    color: #1a6a9a;
}

.qc-notice--error {
    background: #fef2f2;
    border: 1px solid #fcc;
    border-left: 4px solid #e74c3c;
    color: #333;
}

.qc-notice__icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #e74c3c;
    stroke: #e74c3c;
}

.qc-notice strong {
    display: block;
    font-weight: 700;
    color: #c0392b;
    margin-bottom: 3px;
}
.qc-notice p { margin: 0; }

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 860px) {
    .qc-bottom { flex-direction: column; }
    .qc-bottom__right { flex: 1 1 100%; width: 100%; }
}

@media (max-width: 640px) {
    /* Tabla: ocultar columnas menos importantes */
    .qc-th--ref, .qc-td--ref,
    .qc-th--price, .qc-td--price { display: none; }

    .qc-product-img-wrap { width: 48px; height: 48px; }
    .qc-td { padding: 10px 12px; }
    .qc-th { padding: 10px 12px; }
}
