/* ==========================================================================
   Carrito y checkout (carrito.php)
   Pagina enfocada: comparte el sistema visual del acceso de clientes.
   ========================================================================== */

:root {
    --ck-ink: #101828;
    --ck-text: #344054;
    --ck-muted: #667085;
    --ck-faint: #667085; /* antes #98a2b3: no se leia sobre blanco (2.6:1) */
    --ck-border: #d0d5dd;
    --ck-border-soft: #eaecf0;
    --ck-bg: #f9fafb;
    --ck-surface: #ffffff;
    --ck-primary: #0b1220;
    --ck-primary-hover: #1d2939;
    --ck-brand: #0e7490;
    --ck-brand-soft: rgba(14, 116, 144, .14);
    --ck-success: #067647;
    --ck-success-bg: #ecfdf3;
    --ck-error: #d92d20;
    --ck-warning: #b54708;
    --ck-warning-bg: #fffaeb;
    --ck-radius: 12px;
    --ck-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
}

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

/* Texto solo para lectores de pantalla */
.ck-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ck-body {
    margin: 0;
    background: var(--ck-bg);
    color: var(--ck-ink);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.ck-body h1,
.ck-body h2,
.ck-body h3,
.ck-body p {
    margin: 0;
}

.ck-body a {
    color: var(--ck-brand);
    font-weight: 600;
    text-decoration: none;
}

.ck-body a:hover {
    text-decoration: underline;
}

.ck-body :focus-visible {
    outline: 2px solid var(--ck-brand);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

/* ---------- Barra superior con pasos ---------- */
.ck-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--ck-border-soft);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.ck-topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    width: min(1180px, 100% - 40px);
    height: 68px;
    margin: 0 auto;
}

.ck-body .ck-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ck-ink);
    font-size: 1rem;
    font-weight: 700;
}

.ck-body .ck-logo:hover {
    text-decoration: none;
}

/* Logo redondo (MetStrim): se ve solo el circulo */
.ck-logo img {
    border-radius: 50%;
    object-fit: contain;
}

.ck-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ck-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ck-faint);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}

.ck-steps li + li::before {
    content: "";
    width: 40px;
    height: 1px;
    margin-right: 4px;
    background: var(--ck-border);
}

.ck-steps li > span {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--ck-border);
    border-radius: 50%;
    background: #ffffff;
    font-size: .8rem;
    font-weight: 600;
}

.ck-steps li.is-current {
    color: var(--ck-ink);
}

.ck-steps li.is-current > span {
    border-color: var(--ck-primary);
    background: var(--ck-primary);
    color: #ffffff;
}

.ck-steps li.is-done {
    color: var(--ck-text);
}

.ck-steps li.is-done > span {
    border-color: var(--ck-success);
    background: var(--ck-success-bg);
    color: var(--ck-success);
    font-size: .7rem;
}

.ck-steps li.is-done + li::before {
    background: var(--ck-success);
}

.ck-body .ck-link-muted {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ck-muted);
    font-size: .875rem;
    font-weight: 500;
}

.ck-body .ck-link-muted:hover {
    color: var(--ck-ink);
    text-decoration: none;
}

/* ---------- Estructura ---------- */
.ck-page {
    width: min(1180px, 100% - 40px);
    margin: 0 auto;
    padding: 36px 0 56px;
}

.ck-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

.ck-main,
.ck-checkout {
    display: grid;
    gap: 20px;
}

.ck-card {
    padding: 24px;
    border: 1px solid var(--ck-border-soft);
    border-radius: var(--ck-radius);
    background: var(--ck-surface);
    box-shadow: var(--ck-shadow-xs);
}

.ck-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 20px;
}

.ck-card-head h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.ck-card-head h2,
.ck-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.ck-card-title {
    margin-bottom: 18px !important;
}

.ck-count,
.ck-muted-text {
    color: var(--ck-muted);
    font-size: .875rem;
}

.ck-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 999px;
    background: var(--ck-bg);
    color: var(--ck-text);
    font-size: .8rem;
    font-weight: 500;
}

/* ---------- Avisos ---------- */
.ck-notice,
.ck-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ck-text);
    font-size: .9rem;
}

.ck-notice span,
.ck-alert span {
    flex: 1;
}

.ck-notice.is-warning {
    border-color: #fedf89;
    background: var(--ck-warning-bg);
    color: var(--ck-warning);
}

.ck-notice button {
    padding: 6px 12px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ck-ink);
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}

.ck-alert {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
    font-weight: 500;
}

/* ---------- Productos ---------- */
.ck-items {
    display: grid;
}

.ck-item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) auto 110px auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--ck-border-soft);
}

.ck-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.ck-item:last-child {
    padding-bottom: 0;
}

.ck-item-media {
    display: grid;
    overflow: hidden;
    width: 80px;
    height: 80px;
    place-items: center;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
    background: var(--ck-bg);
    color: var(--ck-muted);
    font-size: 1.4rem;
    font-weight: 600;
}

.ck-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-item-info h3 {
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-item-info p {
    margin-top: 2px;
    color: var(--ck-muted);
    font-size: .875rem;
}

.ck-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-stock-ok {
    color: var(--ck-success);
    font-weight: 500;
}

.ck-stock-low {
    color: var(--ck-warning);
    font-weight: 600;
}

.ck-qty {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ck-shadow-xs);
}

.ck-qty button {
    display: grid;
    width: 34px;
    height: 36px;
    place-items: center;
    border: 0;
    background: none;
    color: var(--ck-text);
    font-size: .75rem;
    cursor: pointer;
}

.ck-qty button:hover:not(:disabled) {
    background: var(--ck-bg);
}

.ck-qty button:disabled {
    color: var(--ck-border);
    cursor: not-allowed;
}

.ck-qty output {
    min-width: 32px;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
}

.ck-item-price {
    display: grid;
    justify-items: end;
}

.ck-item-price strong {
    font-size: 1rem;
    font-weight: 600;
}

.ck-item-price del {
    color: var(--ck-faint);
    font-size: .8rem;
}

.ck-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ck-muted);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}

.ck-remove:hover {
    background: #fef3f2;
    color: var(--ck-error);
}

.ck-remove span {
    display: none;
}

/* ---------- Compra directa (comprar.php) ---------- */
.ck-product {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.ck-product-media {
    position: relative;
    display: grid;
    overflow: hidden;
    width: 120px;
    height: 120px;
    place-items: center;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: var(--ck-bg);
    color: var(--ck-muted);
    font-size: 2rem;
    font-weight: 600;
}

/* La imagen cubre la inicial; si no carga, se ve la inicial del producto. */
.ck-product-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    object-fit: cover;
}

.ck-product-info small {
    color: var(--ck-muted);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ck-product-info h1 {
    margin-top: 4px !important;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.ck-product-info p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px !important;
    color: var(--ck-muted);
    font-size: .9rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ck-product-qty {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.ck-product-qty > span {
    color: var(--ck-text);
    font-size: .8rem;
    font-weight: 500;
}

.ck-product-qty small {
    color: var(--ck-faint);
    font-size: .75rem;
}

.ck-stock-out {
    color: var(--ck-error);
    font-weight: 600;
}

.ck-unavailable {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
}

.ck-unavailable h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.ck-unavailable p {
    max-width: 440px;
    margin-bottom: 8px !important;
    color: var(--ck-muted);
}

.ck-unavailable .ck-btn {
    max-width: 320px;
}

.ck-unavailable-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.ck-unavailable-actions .ck-btn {
    width: auto;
    padding: 0 20px;
}

/* Alternativas disponibles */
.ck-similar {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin: 6px 0 4px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ck-similar a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: #ffffff;
    color: var(--ck-ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ck-similar a:hover {
    border-color: var(--ck-brand);
    box-shadow: 0 8px 20px -12px rgba(14, 116, 144, .45);
    transform: translateY(-1px);
}

.ck-similar a > i {
    color: var(--ck-faint);
    font-size: .8rem;
    transition: transform .15s ease, color .15s ease;
}

.ck-similar a:hover > i {
    color: var(--ck-brand);
    transform: translateX(3px);
}

.ck-similar-media {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--ck-bg);
    color: var(--ck-muted);
    font-weight: 700;
}

.ck-similar-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-similar-copy,
.ck-similar-price {
    display: grid;
    min-width: 0;
}

.ck-similar-copy strong {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-similar-copy small,
.ck-similar-price small {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-similar-price {
    text-align: right;
}

.ck-similar-price small {
    color: var(--ck-brand);
    font-weight: 600;
}

@media (max-width: 560px) {
    .ck-product {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
    }

    .ck-product-media {
        width: 88px;
        height: 88px;
    }

    .ck-product-info h1 {
        font-size: 1.15rem;
    }

    .ck-product-qty {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        gap: 10px;
        padding-top: 14px;
        border-top: 1px solid var(--ck-border-soft);
    }

    .ck-product-qty .ck-qty {
        order: 3;
        margin-left: auto;
    }
}

/* Carga inicial */
.ck-item.is-skeleton {
    grid-template-columns: 80px 1fr;
}

.ck-item.is-skeleton > span,
.ck-item.is-skeleton i {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #f2f4f7, #e4e7ec, #f2f4f7);
    background-size: 200% 100%;
    animation: ck-skeleton 1.2s ease-in-out infinite;
}

.ck-item.is-skeleton > span {
    height: 80px;
}

.ck-item.is-skeleton i {
    height: 14px;
    margin: 8px 0;
}

.ck-item.is-skeleton i:first-child {
    width: 55%;
}

.ck-item.is-skeleton i:last-child {
    width: 35%;
}

@keyframes ck-skeleton {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* Carrito vacio */
.ck-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
}

.ck-empty-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    place-items: center;
    border-radius: 50%;
    background: var(--ck-bg);
    box-shadow: 0 0 0 8px #f2f4f7;
    color: var(--ck-muted);
    font-size: 1.4rem;
}

.ck-empty h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.ck-empty p {
    max-width: 320px;
    margin-bottom: 12px;
    color: var(--ck-muted);
}

/* ---------- Checkout ---------- */
.ck-back {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ck-muted);
    font: inherit;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
}

.ck-back:hover {
    color: var(--ck-ink);
}

.ck-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.ck-span-2 {
    grid-column: 1 / -1;
}

.ck-field {
    display: grid;
    align-content: start;
    gap: 6px;
}

.ck-field label {
    color: var(--ck-text);
    font-size: .875rem;
    font-weight: 500;
}

.ck-optional {
    margin-left: 4px;
    color: var(--ck-faint);
    font-size: .8rem;
    font-weight: 400;
}

.ck-field input,
.ck-field textarea {
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ck-shadow-xs);
    color: var(--ck-ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ck-field input {
    height: 44px;
}

.ck-field textarea {
    min-height: 88px;
    resize: vertical;
}

.ck-field input::placeholder,
.ck-field textarea::placeholder {
    color: var(--ck-faint);
}

.ck-field input:focus,
.ck-field textarea:focus {
    border-color: var(--ck-brand);
    outline: none;
    box-shadow: var(--ck-shadow-xs), 0 0 0 4px var(--ck-brand-soft);
}

.ck-hint {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-hint:empty {
    display: none;
}

.ck-field.is-invalid input {
    border-color: #fda29b;
}

.ck-field.is-invalid input:focus {
    box-shadow: var(--ck-shadow-xs), 0 0 0 4px rgba(240, 68, 56, .14);
}

.ck-field.is-invalid .ck-hint {
    color: var(--ck-error);
}

.ck-field.is-loading .ck-hint {
    color: var(--ck-brand);
}

/* Titular del DNI validado con RENIEC */
.ck-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #abefc6;
    border-radius: 8px;
    background: var(--ck-success-bg);
    color: var(--ck-success);
    font-size: .875rem;
}

.ck-identity strong {
    font-weight: 600;
}

/* Metodos de pago */
.ck-methods {
    display: grid;
    gap: 10px;
}

.ck-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--ck-border);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ck-method:hover {
    border-color: #98a2b3;
}

.ck-method.is-selected {
    border-color: var(--ck-primary);
    background: #f8fafc;
    box-shadow: 0 0 0 1px var(--ck-primary);
}

.ck-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ck-method-radio {
    flex: 0 0 18px;
    height: 18px;
    border: 1px solid var(--ck-border);
    border-radius: 50%;
    background: #ffffff;
}

.ck-method.is-selected .ck-method-radio {
    border: 5px solid var(--ck-primary);
}

.ck-method:has(input:focus-visible) {
    outline: 2px solid var(--ck-brand);
    outline-offset: 2px;
}

.ck-method-copy {
    display: grid;
    flex: 1;
    min-width: 0;
}

.ck-method-copy strong {
    font-size: .95rem;
    font-weight: 600;
}

.ck-method-copy small {
    color: var(--ck-muted);
    font-size: .825rem;
}

.ck-method-logos {
    display: flex;
    gap: 6px;
    color: var(--ck-muted);
    font-size: 1.15rem;
}

.ck-method-logos img {
    width: 52px;
    height: 30px;
    padding: 4px 6px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 6px;
    background: #ffffff;
    object-fit: contain;
}

/* Moneda de pago */
.ck-currencies {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ck-currency {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 14px 8px 12px;
    border: 1px solid var(--ck-border);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ck-currency:hover {
    border-color: #98a2b3;
}

.ck-currency.is-selected {
    border-color: var(--ck-primary);
    background: #f8fafc;
    box-shadow: 0 0 0 1px var(--ck-primary);
}

.ck-currency:has(input:focus-visible) {
    outline: 2px solid var(--ck-brand);
    outline-offset: 2px;
}

.ck-currency input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ck-currency-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ck-bg);
    color: var(--ck-text);
    font-size: .9rem;
    font-weight: 700;
}

.ck-currency.is-selected .ck-currency-icon {
    background: var(--ck-primary);
    color: #ffffff;
}

.ck-currency strong {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
}

.ck-card .ck-currency-note {
    margin: 12px 0 0;
    color: var(--ck-muted);
    font-size: .825rem;
}

.ck-card-subhead {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ck-border-soft);
}

.ck-totals .ck-equiv {
    margin-top: -6px;
    font-size: .8rem;
}

.ck-totals .ck-equiv dd {
    color: var(--ck-muted);
    font-weight: 400;
}

@media (max-width: 560px) {
    .ck-currencies {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Resumen ---------- */
.ck-summary {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
}

.ck-summary-items {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ck-border-soft);
    list-style: none;
}

.ck-summary-items:empty,
[data-step="1"] .ck-summary-items {
    display: none;
}

.ck-summary-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ck-text);
    font-size: .875rem;
}

.ck-summary-items em {
    color: var(--ck-muted);
    font-style: normal;
}

.ck-summary-items b {
    font-weight: 500;
    white-space: nowrap;
}

.ck-totals {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.ck-totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .9rem;
}

.ck-totals dt {
    color: var(--ck-muted);
}

.ck-totals dt span {
    color: var(--ck-faint);
}

.ck-totals dd {
    margin: 0;
    color: var(--ck-ink);
    font-weight: 500;
    text-align: right;
}

.ck-savings dd,
.ck-free {
    color: var(--ck-success) !important;
}

.ck-totals .is-total {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--ck-border-soft);
    font-size: 1.05rem;
}

.ck-totals .is-total dt {
    color: var(--ck-ink);
    font-weight: 600;
}

.ck-totals .is-total dd {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ck-fineprint {
    margin-top: 12px !important;
    color: var(--ck-muted);
    font-size: .8rem;
    text-align: center;
}

.ck-trust {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 4px 8px;
    list-style: none;
}

.ck-trust li {
    display: flex;
    gap: 12px;
    color: var(--ck-muted);
    font-size: .825rem;
}

.ck-trust i {
    display: grid;
    flex: 0 0 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--ck-border-soft);
    color: var(--ck-text);
    font-size: .85rem;
}

.ck-trust span {
    display: grid;
}

.ck-trust strong {
    color: var(--ck-ink);
    font-weight: 600;
}

.ck-pay-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
}

.ck-pay-logos img {
    width: 54px;
    height: 32px;
    padding: 5px 7px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 6px;
    background: #ffffff;
    object-fit: contain;
}

/* ---------- Botones ---------- */
.ck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.ck-body a.ck-btn:hover {
    text-decoration: none;
}

.ck-body .ck-btn-primary {
    border-color: var(--ck-primary);
    background: var(--ck-primary);
    box-shadow: var(--ck-shadow-xs);
    color: #ffffff;
}

.ck-body .ck-btn-primary:hover:not(:disabled) {
    background: var(--ck-primary-hover);
}

.ck-btn-primary:disabled {
    border-color: var(--ck-border-soft);
    background: #f2f4f7;
    color: var(--ck-faint);
    cursor: not-allowed;
}

.ck-btn.is-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ck-spin .7s linear infinite;
}

.ck-btn.is-loading:disabled {
    border-color: var(--ck-primary);
    background: var(--ck-primary-hover);
    color: #ffffff;
    cursor: wait;
}

@keyframes ck-spin {
    to { transform: rotate(360deg); }
}

.ck-body .ck-btn-secondary {
    border-color: var(--ck-border);
    background: #ffffff;
    box-shadow: var(--ck-shadow-xs);
    color: var(--ck-text);
}

.ck-body .ck-btn-secondary:hover {
    background: var(--ck-bg);
}

.ck-body .ck-btn-whatsapp {
    border-color: #16a34a;
    background: #16a34a;
    color: #ffffff;
}

.ck-body .ck-btn-whatsapp:hover {
    background: #15803d;
}

/* ---------- Confirmacion ---------- */
.ck-success {
    max-width: 980px;
}

.ck-success-head {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-bottom: 32px;
    text-align: center;
}

.ck-success-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    place-items: center;
    border-radius: 50%;
    background: var(--ck-success-bg);
    box-shadow: 0 0 0 10px #f6fef9;
    color: var(--ck-success);
    font-size: 1.6rem;
}

.ck-success-head h1 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.ck-success-head p {
    max-width: 560px;
    color: var(--ck-muted);
}

.ck-success-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 24px;
    align-items: start;
}

.ck-success-grid .ck-card {
    display: grid;
}

.ck-success-grid .ck-btn + .ck-btn {
    margin-top: 10px;
}

.ck-order-list {
    display: grid;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.ck-order-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--ck-border-soft);
}

.ck-order-list li:first-child {
    padding-top: 0;
    border-top: 0;
}

.ck-order-list div {
    display: grid;
}

.ck-order-list strong {
    font-weight: 600;
}

.ck-order-list strong span {
    color: var(--ck-muted);
    font-weight: 400;
}

.ck-order-list small {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-timeline {
    display: grid;
    gap: 18px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.ck-timeline li {
    position: relative;
    display: flex;
    gap: 14px;
}

.ck-timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 30px;
    bottom: -16px;
    left: 13px;
    width: 2px;
    background: var(--ck-border-soft);
}

.ck-timeline li > span {
    display: grid;
    flex: 0 0 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--ck-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ck-muted);
    font-size: .8rem;
    font-weight: 600;
}

.ck-timeline li.is-done > span {
    border-color: var(--ck-success);
    background: var(--ck-success-bg);
    color: var(--ck-success);
}

.ck-timeline li.is-current > span {
    border-color: var(--ck-primary);
    background: var(--ck-primary);
    color: #ffffff;
}

.ck-timeline div {
    display: grid;
}

.ck-timeline strong {
    font-size: .95rem;
    font-weight: 600;
}

.ck-timeline small {
    color: var(--ck-muted);
    font-size: .85rem;
}

/* ---------- Pie ---------- */
.ck-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 24px;
    padding: 24px 20px 32px;
    border-top: 1px solid var(--ck-border-soft);
    color: var(--ck-faint);
    font-size: .8rem;
}

.ck-body .ck-footer a {
    color: var(--ck-muted);
    font-weight: 500;
}

/* Barra inferior fija en movil */
.ck-mobilebar {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .ck-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
    }

    .ck-item {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        grid-template-areas:
            "media info remove"
            "media qty price";
        gap: 10px 16px;
    }

    .ck-item-media { grid-area: media; width: 72px; height: 72px; align-self: start; }
    .ck-item-info { grid-area: info; }
    .ck-qty { grid-area: qty; justify-self: start; }
    .ck-item-price { grid-area: price; }
    .ck-remove { grid-area: remove; justify-self: end; align-self: start; }
}

@media (max-width: 860px) {
    .ck-topbar-inner {
        grid-template-columns: 1fr auto;
        height: auto;
        padding: 14px 0;
        row-gap: 12px;
    }

    .ck-steps {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }

    .ck-steps li + li::before {
        width: 20px;
    }

    .ck-layout,
    .ck-success-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-summary {
        position: static;
    }

    .ck-page {
        padding-bottom: 110px;
    }

    .ck-success {
        padding-bottom: 56px;
    }

    .ck-mobilebar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--ck-border-soft);
        background: #ffffff;
        box-shadow: 0 -8px 24px rgba(16, 24, 40, .08);
    }

    .ck-mobilebar > div {
        display: grid;
        flex: 0 0 auto;
    }

    .ck-mobilebar small {
        color: var(--ck-muted);
        font-size: .75rem;
    }

    .ck-mobilebar strong {
        font-size: 1.15rem;
        font-weight: 700;
    }

    .ck-mobilebar .ck-btn {
        flex: 1;
    }

    .ck-summary .ck-btn,
    .ck-summary .ck-fineprint {
        display: none;
    }
}

@media (max-width: 560px) {
    .ck-topbar-inner,
    .ck-page {
        width: calc(100% - 32px);
    }

    /* Solo queda la flecha a la vista; el texto sigue disponible para lectores de pantalla. */
    .ck-link-muted span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .ck-body .ck-link-muted {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    .ck-steps li {
        font-size: 0;
        gap: 0;
    }

    .ck-steps li.is-current {
        gap: 8px;
        font-size: .8rem;
    }

    .ck-page {
        padding-top: 20px;
    }

    .ck-card {
        padding: 18px 16px;
    }

    .ck-card-head h1 {
        font-size: 1.3rem;
    }

    .ck-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-method {
        flex-wrap: wrap;
    }

    .ck-method-logos {
        margin-left: 32px;
    }

    .ck-success-head h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Pagar pedido y subir comprobante (pagar.php)
   ========================================================================== */
.ck-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0;
}

.ck-pay-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.ck-pay-num {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ck-primary);
    color: #ffffff;
    font-size: .8rem;
    font-weight: 700;
}

.ck-pay-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

.ck-pay-amount div {
    display: grid;
}

.ck-pay-amount small {
    color: var(--ck-muted);
    font-size: .8rem;
    font-weight: 500;
}

.ck-pay-amount strong {
    color: var(--ck-ink);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ck-pay-amount span {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-copy {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ck-text);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.ck-copy:hover {
    border-color: var(--ck-brand);
    color: var(--ck-brand);
}

.ck-copy.is-copied {
    border-color: var(--ck-success);
    background: var(--ck-success-bg);
    color: var(--ck-success);
}

.ck-pay-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.ck-pay-tabs button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ck-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ck-text);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ck-pay-tabs button img {
    width: 34px;
    height: 20px;
    object-fit: contain;
}

.ck-pay-tabs button.is-active {
    border-color: var(--ck-primary);
    box-shadow: 0 0 0 1px var(--ck-primary);
}

.ck-pay-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.ck-pay-data {
    display: grid;
    gap: 8px;
}

.ck-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
    background: var(--ck-bg);
}

.ck-pay-row div {
    display: grid;
    min-width: 0;
}

.ck-pay-row small {
    color: var(--ck-muted);
    font-size: .76rem;
}

.ck-pay-row strong {
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ck-pay-row strong.is-long {
    font-size: .82rem;
}

.ck-pay-qr {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 256px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ck-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--ck-shadow-xs);
}

.ck-pay-qr-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
    cursor: zoom-in;
}

.ck-pay-qr-open img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    transition: transform .2s ease;
}

.ck-pay-qr-open:hover img {
    transform: scale(1.03);
}

.ck-pay-qr-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .8);
    color: #ffffff;
    font-size: .74rem;
    font-weight: 600;
    opacity: .9;
}

.ck-pay-qr figcaption {
    color: var(--ck-text);
    font-size: .8rem;
    font-weight: 500;
    text-align: center;
}

.ck-pay-qr-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ck-brand);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.ck-pay-qr-download:hover {
    text-decoration: underline;
}

/* QR a pantalla completa */
.ck-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(2, 6, 23, .72);
    opacity: 0;
    transition: opacity .18s ease;
}

.ck-qr-modal.is-open {
    opacity: 1;
}

.ck-qr-modal-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(440px, 100%);
    padding: 28px 24px 22px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .45);
    text-align: center;
    transform: scale(.96);
    transition: transform .18s ease;
}

.ck-qr-modal.is-open .ck-qr-modal-card {
    transform: none;
}

.ck-qr-modal-card strong {
    font-size: 1.1rem;
}

.ck-qr-modal-card img {
    width: min(380px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
}

.ck-qr-modal-card p {
    color: var(--ck-muted);
}

.ck-qr-modal-card p b {
    color: var(--ck-ink);
}

.ck-qr-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--ck-bg);
    color: var(--ck-text);
    font-size: 1.1rem;
    cursor: pointer;
}

.ck-pay-tip {
    grid-column: 1 / -1;
    margin: 0 !important;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ck-warning-bg);
    color: var(--ck-warning);
    font-size: .84rem;
}

.ck-pay-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 20px;
    border: 1px dashed var(--ck-border);
    border-radius: 12px;
    text-align: center;
}

.ck-pay-empty > i {
    color: #25d366;
    font-size: 1.8rem;
}

.ck-pay-empty p {
    max-width: 420px;
    color: var(--ck-muted);
}

.ck-pay-empty .ck-btn {
    width: auto;
    padding: 0 20px;
}

.ck-pay-form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.ck-pay-form .ck-card-head {
    margin-bottom: 0;
}

.ck-label {
    color: var(--ck-text);
    font-size: .875rem;
    font-weight: 500;
}

.ck-field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ck-ink);
    font: inherit;
}

/* Zona para soltar el comprobante */
.ck-drop {
    position: relative;
    display: block;
    border: 2px dashed var(--ck-border);
    border-radius: 12px;
    background: var(--ck-bg);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.ck-drop:hover,
.ck-drop.is-dragging {
    border-color: var(--ck-brand);
    background: #ecfeff;
}

.ck-drop.is-invalid {
    border-color: #fda29b;
    background: #fef3f2;
}

.ck-drop.has-file {
    border-style: solid;
    border-color: var(--ck-success);
    background: var(--ck-success-bg);
}

.ck-field .ck-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.ck-drop-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 24px 16px;
    color: var(--ck-muted);
    text-align: center;
    pointer-events: none;
}

.ck-drop-empty i {
    margin-bottom: 4px;
    color: var(--ck-brand);
    font-size: 1.6rem;
}

.ck-drop-empty strong {
    color: var(--ck-ink);
    font-size: .9rem;
    font-weight: 600;
}

.ck-drop-empty u {
    color: var(--ck-brand);
}

.ck-drop-empty small {
    font-size: .78rem;
}

.ck-drop-file {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    pointer-events: none;
}

.ck-drop-file > span:nth-child(2) {
    display: grid;
    flex: 1;
    min-width: 0;
}

.ck-drop-file strong {
    overflow: hidden;
    font-size: .88rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-drop-file small {
    color: var(--ck-muted);
    font-size: .78rem;
}

.ck-drop-thumb {
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    color: #d92d20;
    font-size: 1.4rem;
}

.ck-drop-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-drop-remove {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ck-muted);
    cursor: pointer;
    pointer-events: auto;
}

.ck-drop-remove:hover {
    color: #d92d20;
}

.ck-hint.is-error {
    color: #d92d20;
}

.ck-pay-submit {
    width: 100%;
}

.ck-pay-form .ck-fineprint {
    margin: 0 !important;
    text-align: center;
}

/* Estados: en revision, aprobado, cancelado, rechazado */
.ck-pay-status {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ck-pay-status h1 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
}

.ck-pay-status p {
    color: var(--ck-text);
}

.ck-pay-status-icon {
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.4rem;
}

.ck-pay-status.is-review .ck-pay-status-icon { background: var(--ck-warning-bg); color: var(--ck-warning); }
.ck-pay-status.is-review .ck-pay-status-icon i { animation: ck-flip 2.4s ease-in-out infinite; }
.ck-pay-status.is-ok .ck-pay-status-icon { background: var(--ck-success-bg); color: var(--ck-success); }
.ck-pay-status.is-muted .ck-pay-status-icon { background: var(--ck-bg); color: var(--ck-muted); }

/* Accesos entregados */
.ck-access {
    margin-top: 16px;
    scroll-margin-top: 90px;
}

.ck-access .ck-pay-title i {
    color: var(--ck-brand);
}

.ck-access-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
}

.ck-access-alert.is-ok { background: var(--ck-success-bg); color: var(--ck-success); }
.ck-access-alert.is-warn { background: var(--ck-warning-bg); color: var(--ck-warning); }

.ck-access-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ck-access-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: var(--ck-bg);
}

.ck-access-item.is-delivered {
    border-color: #abefc6;
    background: #f6fef9;
}

.ck-access-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ck-access-head > div {
    display: grid;
}

.ck-access-head strong span {
    color: var(--ck-muted);
    font-weight: 500;
}

.ck-access-head small {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-access-state {
    display: grid;
    flex: 0 0 32px;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ck-warning-bg);
    color: var(--ck-warning);
    font-size: .8rem;
}

.ck-access-item.is-delivered .ck-access-state {
    background: var(--ck-success);
    color: #ffffff;
}

.ck-access-secret {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ck-border);
    border-radius: 10px;
    background: #ffffff;
}

.ck-access-secret pre {
    min-height: 64px;
    margin: 0;
    padding: 14px 16px;
    color: var(--ck-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    transition: filter .2s ease;
}

.ck-access-secret.is-hidden pre {
    filter: blur(7px);
    user-select: none;
}

.ck-access-cover {
    position: absolute;
    inset: 0 0 46px;
    display: none;
    place-items: center;
    color: var(--ck-muted);
    font-size: .84rem;
    font-weight: 600;
    pointer-events: none;
}

.ck-access-secret.is-hidden .ck-access-cover {
    display: grid;
}

.ck-access-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 8px;
    border-top: 1px solid var(--ck-border-soft);
    background: var(--ck-bg);
}

.ck-access-note {
    margin: 0 !important;
    color: var(--ck-text);
    font-size: .86rem;
}

.ck-access-note i {
    color: #25d366;
}

.ck-access-confirm {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #b2ddff;
    border-radius: 12px;
    background: #f5faff;
}

.ck-access-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ck-access-buttons form {
    margin: 0;
}

.ck-access-buttons .ck-btn {
    width: auto;
    padding: 0 18px;
}

.ck-btn-success {
    border: 0;
    background: var(--ck-success);
    color: #ffffff;
}

.ck-btn-success:hover {
    background: #05603a;
}

.ck-access-report {
    display: grid;
    gap: 8px;
}

.ck-access-report textarea,
.ck-access-report select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    font: inherit;
}

.ck-access-report .ck-btn {
    width: auto;
    justify-self: start;
    padding: 0 18px;
}

.ck-access-confirmed {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px !important;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--ck-success-bg);
    color: var(--ck-success);
    font-weight: 600;
}

/* Pedido completado: tarjeta verde */
.ck-pay-status.is-complete {
    border-color: #abefc6;
    background: linear-gradient(135deg, #ecfdf3, #ffffff 70%);
    box-shadow: inset 4px 0 0 var(--ck-success);
}

.ck-pay-status.is-complete .ck-pay-status-icon {
    background: var(--ck-success);
    color: #ffffff;
}

.ck-pay-status.is-complete h1 {
    color: var(--ck-success);
}

@keyframes ck-flip {
    0%, 40% { transform: rotate(0); }
    50%, 90% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.ck-pay-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.ck-pay-facts div {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ck-bg);
}

.ck-pay-facts dt {
    color: var(--ck-muted);
    font-size: .74rem;
}

.ck-pay-facts dd {
    margin: 0;
    font-size: .88rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Verificacion automatica de USDT */
.ck-pay-tip.is-chain {
    display: flex;
    gap: 8px;
    background: #ecfdf3;
    color: #05603a;
}

.ck-pay-tip.is-chain i {
    margin-top: 3px;
}

/* Pago con tarjeta (Culqi) */
.ck-culqi {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.ck-culqi > p,
.ck-culqi .ck-alert {
    margin: 0 !important;
}

.ck-culqi-brands {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ck-muted);
    font-size: .84rem;
}

.ck-culqi-brands i {
    font-size: 1.7rem;
}

.ck-culqi-brands span {
    margin-left: 4px;
}

.ck-culqi .ck-fineprint {
    text-align: center;
}

/* Campo validado mientras el cliente escribe */
.ck-field.is-valid input {
    border-color: #75e0a7;
}

/* Aviso mientras la verificacion automatica revisa la captura */
.ck-pay-wait {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0 !important;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f0fdf5;
    color: #14532d;
    font-size: .84rem;
}

/* Guia paso a paso (Lemon Cash) */
.ck-pay-steps {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    margin: 0 !important;
    padding: 12px 14px;
    border: 1px solid #b7f0cf;
    border-radius: 10px;
    background: #f0fdf5;
    color: #14532d;
    font-size: .84rem;
    list-style: none;
    counter-reset: ck-step;
}

.ck-pay-steps li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    counter-increment: ck-step;
}

.ck-pay-steps li span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ck-pay-steps li::before {
    content: counter(ck-step);
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00b35a;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.ck-pay-status.is-chain .ck-pay-status-icon {
    background: #ecfeff;
    color: var(--ck-brand);
}

.ck-pay-status.is-chain .ck-pay-status-icon i {
    animation: ck-pulse-icon 1.6s ease-in-out infinite;
}

@keyframes ck-pulse-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.9); }
}

.ck-chain-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px !important;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ck-bg);
    color: var(--ck-text) !important;
    font-size: .88rem;
    font-weight: 500;
}

.ck-chain-dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ck-brand);
    animation: ck-chain-ping 1.4s ease-out infinite;
}

@keyframes ck-chain-ping {
    0% { box-shadow: 0 0 0 0 rgba(14, 116, 144, .55); }
    100% { box-shadow: 0 0 0 10px rgba(14, 116, 144, 0); }
}

.ck-chain-refresh {
    margin-top: 8px !important;
    color: var(--ck-faint) !important;
    font-size: .78rem;
}

.ck-chain-verified {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 12px !important;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ck-success-bg);
    color: var(--ck-success) !important;
    font-size: .86rem;
    font-weight: 500;
}

.ck-pay-rejected {
    margin-bottom: 16px;
    align-items: flex-start;
}

.ck-summary .ck-btn-secondary {
    margin-top: 4px;
}

.ck-order-list b {
    white-space: nowrap;
}

.ck-text-link {
    display: block;
    margin-top: 12px;
    color: var(--ck-muted);
    font-size: .875rem;
    font-weight: 500;
    text-align: center;
}

.ck-text-link:hover {
    color: var(--ck-ink);
}

.ck-success .ck-btn + .ck-btn {
    margin-top: 10px;
}

.ck-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 100;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--ck-primary);
    color: #ffffff;
    font-size: .875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity .2s ease, transform .2s ease;
}

.ck-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 640px) {
    .ck-pay-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-pay-qr {
        justify-self: center;
        width: min(300px, 100%);
    }

    .ck-pay-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-pay-status {
        flex-direction: column;
    }

    .ck-pay-amount strong {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Stock en vivo ---------- */
.ck-live-notice {
    margin-bottom: 16px;
    animation: ck-live-in .35s ease both;
}

.ck-live-notice[hidden] {
    display: none;
}

.ck-live-notice.is-success {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.ck-live-notice.is-danger {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.ck-live-notice.is-success button {
    border-color: #067647;
    background: #067647;
    color: #ffffff;
}

.ck-live-notice button {
    flex: none;
    white-space: nowrap;
}

.is-live-updated {
    animation: ck-live-blink 1.2s ease-out 2;
}

@keyframes ck-live-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@keyframes ck-live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

@media (max-width: 560px) {
    .ck-live-notice { flex-wrap: wrap; }
    .ck-live-notice button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .ck-live-notice, .is-live-updated { animation: none; }
}

/* Cuenta rapida del checkout: correo → contrasena o cuenta nueva (render_quick_account) */
.ck-quick-form {
    display: grid;
    gap: 16px;
}

.ck-quick-email,
.ck-quick-password {
    position: relative;
    display: flex;
    align-items: center;
}

.ck-quick-email input,
.ck-quick-password input {
    flex: 1;
}

.ck-quick-email input[readonly] {
    background: var(--ck-bg);
    color: var(--ck-text);
}

.ck-quick-change {
    position: absolute;
    right: 8px;
    padding: 4px 10px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ck-brand);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.ck-quick-password input {
    padding-right: 44px;
}

.ck-quick-password button {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ck-muted);
    cursor: pointer;
}

.ck-quick-password button:hover {
    background: var(--ck-bg);
    color: var(--ck-ink);
}

.ck-quick-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.ck-quick-label a {
    font-size: .82rem;
}

.ck-quick-step {
    display: grid;
    gap: 14px;
}

.ck-quick-note {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ck-success-bg);
    color: var(--ck-success);
    font-size: .86rem;
}

.ck-quick-note.is-google {
    background: #f0f9ff;
    color: #026aa2;
}

.ck-quick-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--ck-faint);
    font-size: .8rem;
}

.ck-quick-or::before,
.ck-quick-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ck-border-soft);
}

.ck-quick .ck-btn {
    width: 100%;
}

/* ==========================================================================
   Saldo de la cuenta (pagar.php): pagar con saldo y recarga acreditada
   ========================================================================== */
.ck-balance {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.ck-balance.is-ready {
    border-color: rgba(6, 118, 71, .35);
    background: linear-gradient(135deg, #ecfdf3, #ffffff 65%);
}

.ck-balance-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--ck-brand-soft);
    color: var(--ck-brand);
    font-size: 1.2rem;
}

.ck-balance.is-ready .ck-balance-icon {
    background: #d1fadf;
    color: var(--ck-success);
}

.ck-balance-copy h2 {
    margin: 0 0 4px;
    color: var(--ck-ink);
    font-size: 1.05rem;
}

.ck-balance-copy p {
    margin: 0;
    color: var(--ck-text);
    font-size: .92rem;
    line-height: 1.55;
}

.ck-balance-copy .ck-balance-error {
    margin-top: 8px;
    color: var(--ck-error);
    font-weight: 600;
}

.ck-balance-action {
    margin: 0;
}

.ck-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    color: var(--ck-muted);
    font-size: .85rem;
}

.ck-or::before,
.ck-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ck-border);
}

.ck-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 640px) {
    .ck-balance {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ck-balance-action {
        grid-column: 1 / -1;
    }

    .ck-balance-action .ck-btn,
    a.ck-balance-action {
        width: 100%;
        justify-content: center;
    }
}
/* Checkout: opcion "Saldo de mi cuenta" */
.ck-method.is-balance {
    border-color: rgba(6, 118, 71, .35);
    background: linear-gradient(135deg, #ecfdf3, #ffffff 70%);
}

.ck-method.is-balance .ck-method-logos i {
    color: var(--ck-success);
    font-size: 1.2rem;
}

.ck-method.is-balance.is-empty {
    border-color: var(--ck-border);
    background: var(--ck-bg);
    opacity: .75;
    cursor: not-allowed;
}

.ck-method.is-balance.is-empty .ck-method-logos i {
    color: var(--ck-muted);
}

/* ==========================================================================
   Personaliza tu cuenta: perfil y PIN o correo para activar
   (carrito.php, comprar.php y pagar.php; campos de render_customer_data_item y customer-data.js)
   ========================================================================== */
.ck-personal .ck-card-head {
    margin-bottom: 8px;
}

.ck-personal .ck-pay-title i {
    color: var(--ck-brand);
}

.ck-card .ck-personal-intro {
    margin: 0 0 14px;
    color: var(--ck-muted);
    font-size: .9rem;
}

.ck-personal-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.ck-personal-choice label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--ck-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ck-text);
    font-size: .9rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ck-personal-choice label:hover {
    border-color: #98a2b3;
}

.ck-personal-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ck-personal-choice label:has(input:checked) {
    border-color: var(--ck-primary);
    background: #f8fafc;
    box-shadow: 0 0 0 1px var(--ck-primary);
    color: var(--ck-ink);
}

.ck-personal-choice label:has(input:focus-visible) {
    outline: 2px solid var(--ck-brand);
    outline-offset: 2px;
}

.ck-personal-fields {
    display: grid;
    gap: 14px;
}

.ck-personal-fields[hidden] {
    display: none;
}

.ck-personal-item {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
    background: var(--ck-bg);
}

.ck-personal-item legend {
    float: left;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ck-ink);
    font-size: .95rem;
    font-weight: 600;
}

.ck-personal-item legend small {
    margin-left: 6px;
    color: var(--ck-muted);
    font-size: .8rem;
    font-weight: 500;
}

.ck-personal-unit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    clear: both;
}

.ck-personal-unit[hidden] {
    display: none;
}

.ck-personal-num {
    grid-column: 1 / -1;
    color: var(--ck-text);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ck-personal-num[hidden] {
    display: none;
}

.ck-personal-unit + .ck-personal-unit {
    padding-top: 12px;
    border-top: 1px dashed var(--ck-border);
}

.ck-card .ck-personal-later {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f0f9ff;
    color: #075985;
    font-size: .875rem;
}

.ck-personal-later[hidden] {
    display: none;
}

.ck-field .ck-personal-error {
    color: var(--ck-error);
}

.ck-personal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

.ck-personal-badge.is-warn {
    background: var(--ck-warning-bg);
    color: var(--ck-warning);
}

.ck-personal-badge.is-ok {
    background: var(--ck-success-bg);
    color: var(--ck-success);
}

.ck-personal.is-order .ck-access-alert,
.ck-personal.is-order .ck-alert {
    margin-bottom: 14px;
}

.ck-personal-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
}

.ck-personal-foot small {
    color: var(--ck-muted);
    font-size: .825rem;
}

/* Entrega sin claves: agregado al grupo familiar o invitacion a su correo */
.ck-activation {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #abefc6;
    border-radius: 10px;
    background: var(--ck-success-bg);
}

.ck-card .ck-activation-title {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0;
    color: var(--ck-success);
}

.ck-activation-title strong {
    color: var(--ck-ink);
    font-weight: 600;
}

.ck-activation-steps {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: var(--ck-text);
    font-size: .9rem;
}

.ck-activation-steps li.is-email {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-left: -20px;
    padding: 8px 10px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 8px;
    background: #ffffff;
}

.ck-activation-steps li.is-email strong {
    overflow-wrap: anywhere;
    color: var(--ck-ink);
}

@media (max-width: 560px) {
    .ck-personal-unit {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-personal-foot .ck-btn {
        width: 100%;
        justify-content: center;
    }
}
/* "Comprar": aviso de los datos que se pediran para activar el producto */
.ck-card .ck-needs {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f0f9ff;
    color: #075985;
    font-size: .875rem;
}

.ck-needs strong {
    color: #0c4a6e;
    font-weight: 600;
}

/* ==========================================================================
   Renovar (renovar.php y la renovacion en pagar.php): mismo acceso, nuevo vencimiento
   ========================================================================== */
.ck-renew-due {
    font-weight: 600;
    color: var(--ck-text);
}

.ck-renew-due.is-soon {
    color: var(--ck-warning);
}

.ck-renew-due.is-late {
    color: var(--ck-error);
}

.ck-renew-timeline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: var(--ck-bg);
}

.ck-renew-timeline small {
    display: block;
    color: var(--ck-muted);
    font-size: .78rem;
    font-weight: 500;
}

.ck-renew-timeline strong {
    display: block;
    margin-top: 2px;
    color: var(--ck-ink);
    font-size: 1.05rem;
    font-weight: 600;
}

.ck-renew-timeline .is-new {
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--ck-success-bg);
}

.ck-renew-timeline .is-new small,
.ck-renew-timeline .is-new strong {
    color: var(--ck-success);
}

.ck-renew-arrow {
    color: var(--ck-faint);
    font-size: 1.1rem;
}

.ck-renew-points {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.ck-renew-points li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--ck-text);
    font-size: .9rem;
    line-height: 1.5;
}

.ck-renew-points i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--ck-brand-soft);
    color: var(--ck-brand);
    font-size: .8rem;
}

.ck-renew-points strong {
    color: var(--ck-ink);
    font-weight: 600;
}

.ck-renew-open {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #175cd3;
}

.ck-renew-open a {
    color: inherit;
    font-weight: 600;
}

/* pagar.php: tarjeta de la renovacion (sin pagar o en revision) */
.ck-renew {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.ck-renew-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--ck-brand-soft);
    color: var(--ck-brand);
    font-size: 1.2rem;
}

.ck-renew-copy h2 {
    margin: 0 0 4px;
    color: var(--ck-ink);
    font-size: 1.05rem;
}

.ck-renew-copy p {
    margin: 0;
    color: var(--ck-text);
    font-size: .92rem;
    line-height: 1.55;
}

.ck-renew-copy p a {
    font-weight: 600;
}

.ck-renew-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
}

.ck-renew-dates div {
    padding: 8px 12px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
    background: var(--ck-bg);
}

.ck-renew-dates dt {
    color: var(--ck-muted);
    font-size: .75rem;
    font-weight: 500;
}

.ck-renew-dates dd {
    margin: 2px 0 0;
    color: var(--ck-ink);
    font-weight: 600;
}

.ck-renew-dates .is-new {
    border-color: rgba(6, 118, 71, .3);
    background: var(--ck-success-bg);
}

.ck-renew-dates .is-new dt,
.ck-renew-dates .is-new dd {
    color: var(--ck-success);
}

@media (max-width: 560px) {
    .ck-renew-timeline {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .ck-renew-arrow {
        transform: rotate(90deg);
        justify-self: start;
        margin-left: 12px;
    }

    .ck-renew {
        grid-template-columns: minmax(0, 1fr);
    }

    .ck-renew-icon {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Marketing y promociones: cupón de descuento (carrito, comprar y combo) y compra de combos (combo.php)
   ========================================================================== */
.ck-coupon {
    margin: 0 0 16px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--ck-border-soft);
}

.ck-body .ck-coupon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ck-brand);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}

.ck-body .ck-coupon-toggle:hover {
    text-decoration: underline;
}

.ck-coupon-toggle[hidden],
.ck-coupon-body[hidden],
.ck-coupon-applied[hidden],
.ck-coupon-msg[hidden] {
    display: none;
}

.ck-coupon-body {
    margin-top: 10px;
}

.ck-coupon-row {
    display: flex;
    gap: 8px;
}

.ck-coupon-row input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--ck-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ck-shadow-xs);
    color: var(--ck-ink);
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ck-coupon-row input::placeholder {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.ck-coupon-row input:focus {
    border-color: var(--ck-brand);
    outline: 0;
    box-shadow: 0 0 0 4px var(--ck-brand-soft);
}

.ck-body .ck-coupon-row .ck-btn {
    flex: none;
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 16px;
    font-size: .9rem;
}

.ck-coupon-msg {
    margin-top: 8px !important;
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-coupon-msg.is-error {
    color: var(--ck-error);
    font-weight: 500;
}

.ck-coupon-applied {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed #75e0a7;
    border-radius: 10px;
    background: var(--ck-success-bg);
    color: var(--ck-success);
}

.ck-coupon-applied > span {
    display: grid;
    flex: 1;
    min-width: 0;
}

.ck-coupon-applied b {
    color: var(--ck-success);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.ck-coupon-applied small {
    color: var(--ck-text);
    font-size: .78rem;
}

.ck-body .ck-coupon-applied button {
    flex: none;
    padding: 4px 6px;
    border: 0;
    background: none;
    color: var(--ck-muted);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.ck-body .ck-coupon-applied button:hover {
    color: var(--ck-error);
}

/* Descuento u oferta con fecha de fin (comprar.php) */
.ck-promo-until {
    color: var(--ck-warning);
    font-weight: 600;
}

/* ---------- Combo ---------- */
.ck-combo-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.ck-combo-logos {
    display: grid;
    grid-template-columns: repeat(2, 56px);
    gap: 8px;
}

.ck-combo-logos span,
.ck-combo-items .ck-similar-media {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: var(--ck-bg);
    color: var(--ck-muted);
    font-weight: 700;
}

.ck-combo-items .ck-similar-media {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.ck-combo-logos img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    object-fit: cover;
}

.ck-body .ck-combo-save {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px !important;
    color: var(--ck-success);
    font-size: .875rem;
    font-weight: 600;
}

.ck-body .ck-combo-subtitle {
    margin: 22px 0 10px;
    color: var(--ck-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ck-combo-items {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.ck-combo-items li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 12px;
    background: #ffffff;
}

.ck-combo-item-price {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.ck-combo-item-price del {
    color: var(--ck-muted);
    font-size: .8rem;
}

.ck-combo-item-price i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ck-success-bg);
    color: var(--ck-success);
    font-size: .7rem;
}

.ck-combo-hero > .ck-fineprint {
    margin: 0;
    text-align: left;
}

@media (max-width: 560px) {
    .ck-combo-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .ck-combo-logos {
        grid-template-columns: repeat(4, 44px);
    }

    .ck-combo-logos span {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .ck-combo-head .ck-product-qty {
        justify-items: start;
    }

    .ck-combo-items li {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .ck-combo-items .ck-similar-media {
        width: 40px;
        height: 40px;
    }

    .ck-combo-item-price del {
        display: none;
    }
}

/* Impuesto incluido (Configuración general → Impuestos): aviso bajo el total del resumen */
.ck-tax-note {
    margin: -6px 0 14px;
    color: var(--ck-muted);
    font-size: .78rem;
    text-align: right;
}

/* ==========================================================================
   comprar.php: informacion del producto y condiciones de uso (Productos → Datos de venta)
   ========================================================================== */
.ck-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ck-details.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.ck-details-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--ck-ink);
    font-size: 1rem;
    font-weight: 600;
}

.ck-details-block h2 i {
    color: var(--ck-brand);
}

.ck-details-block.is-terms h2 i {
    color: var(--ck-warning);
}

.ck-details-block ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ck-details-block li {
    position: relative;
    padding-left: 20px;
    color: var(--ck-text);
    font-size: .9rem;
    line-height: 1.5;
}

.ck-details-block li::before {
    content: "";
    position: absolute;
    top: .55em;
    left: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ck-brand);
}

.ck-details-block.is-terms li::before {
    background: var(--ck-warning);
}

/* Con las dos columnas, una linea fina las separa */
.ck-details:not(.is-single) .ck-details-block + .ck-details-block {
    padding-left: 24px;
    border-left: 1px solid var(--ck-border-soft);
}

@media (max-width: 720px) {
    .ck-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .ck-details:not(.is-single) .ck-details-block + .ck-details-block {
        padding: 20px 0 0;
        border-top: 1px solid var(--ck-border-soft);
        border-left: 0;
    }
}

/* Pedido entregado: "Como activarlo" (Productos → Datos de venta), sobre todo para licencias.
   Usa las variables del tema: se ve bien en claro y en oscuro (compra-oscura.css). */
.ck-howto {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid var(--ck-border-soft);
    border-radius: 10px;
}

.ck-howto h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--ck-ink);
    font-size: .9rem;
    font-weight: 800;
}

.ck-howto h4 i {
    color: var(--ck-brand);
}

.ck-howto ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ck-step;
}

.ck-howto li {
    position: relative;
    padding-left: 32px;
    color: var(--ck-text);
    font-size: .86rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    counter-increment: ck-step;
}

.ck-howto li::before {
    content: counter(ck-step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--ck-brand-soft);
    color: var(--ck-brand);
    font-size: .74rem;
    font-weight: 800;
}

.ck-howto a {
    color: var(--ck-brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Comprobante de pago (boleta o factura) que sube la tienda: boleta.php */
.ck-receipt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    padding: 18px 20px;
}

.ck-receipt-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--ck-bg);
    color: var(--ck-ink);
    font-size: 1.15rem;
}

.ck-receipt-text {
    flex: 1 1 220px;
    min-width: 0;
}

.ck-receipt-text h2 {
    margin: 0 0 2px;
    color: var(--ck-ink);
    font-size: 1rem;
    font-weight: 700;
}

.ck-receipt-text p {
    margin: 0;
    color: var(--ck-muted);
    font-size: .88rem;
}

.ck-receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 520px) {
    .ck-receipt-actions,
    .ck-receipt-actions .ck-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}