/* =========================================================================
   TIENDA, CARRITO, FICHA DE PRODUCTO Y PAGO
   Usa la misma paleta de styles.css (marfil, azul marino y dorado)
   ========================================================================= */

[hidden] { display: none !important; }
.no-scroll { overflow: hidden; }
.visually-hidden,
.size-pill input,
.segmented input,
.option-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Encabezado: botón de menú y carrito ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 6px;
}
.header-icons {
    align-items: center;
}
.header-icons a,
.header-icons button {
    color: inherit;
    transition: color 0.3s ease;
}
.header-icons a:hover,
.header-icons button:hover {
    color: var(--gold-light);
}
.cart-icon {
    background: none;
    border: 0;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}
.cart-count {
    transition: transform 0.35s var(--ease-out);
}
.cart-count.is-empty {
    transform: scale(0);
}
.menu-toggle:focus-visible,
.header-icons a:focus-visible,
.header-icons button:focus-visible,
.header-nav a:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
    border-radius: 4px;
}
.top-bar a:hover { color: var(--primary-color); }

/* ---------- Botones y utilidades ---------- */
.btn-block {
    display: flex;
    width: 100%;
}
.btn-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 6px;
    background: none;
    border: 0;
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.btn-link:hover { color: var(--navy); }
.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.4s var(--ease-out);
}
.icon-btn:hover {
    background: var(--sand);
    transform: rotate(90deg);
}
.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.btn-outline-light:hover {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
}
.btn-outline-light,
.btn-wa { word-spacing: 0.06em; }
:is(.btn-link, .icon-btn, .btn-outline-light, .chip, .qty button, .ci-remove, .copy-btn, .btn-wa):focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}
.qty button {
    width: 40px;
    height: 46px;
    border: 0;
    background: none;
    color: var(--navy);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 999px;
}
.qty button:hover { background: var(--sand); }
.qty span {
    min-width: 26px;
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.qty-sm button {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* ---------- Tarjeta de producto (complementa styles.css) ---------- */
.product-card-modern .product-image {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
}
.product-card-modern .product-image img {
    transition: transform 0.9s var(--ease-out);
}
.badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
.badge {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}
.badge-sale {
    background: var(--gold);
    color: #fff;
}
.badge-line {
    background: rgba(15, 45, 76, 0.82);
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.product-cat {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-ink);
}
.product-title button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
    line-height: 1.45;
}
.product-title button:hover {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 4px;
}
.product-info .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 4px 10px;
    min-height: 1.8em;
}
.price-old {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--ink-soft);
}
.price-quote {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
}
.lbl-short { display: none; }
/* Si la tarjeta es angosta, el botón usa el texto corto */
.product-card-modern { container-type: inline-size; }
@container (max-width: 270px) {
    .lbl-long { display: none; }
    .lbl-short { display: inline; }
}

/* Inicio: grilla de 4 ofertas */
.products-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* ---------- Capas: fondo oscuro compartido ---------- */
.layer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 31, 54, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.is-open > .layer-backdrop { opacity: 1; }

/* ---------- Panel del carrito ---------- */
.cart-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
}
.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(430px, 100%);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -30px 0 60px -30px rgba(10, 31, 54, 0.5);
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out);
}
.cart-layer.is-open .cart-drawer { transform: none; }
.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.cart-head h2 {
    font-size: 1.4rem;
    color: var(--navy);
    margin: 0;
}
.cart-head-count {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
}
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 24px;
}
.ci {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.ci img {
    width: 72px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--sand);
}
.ci-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink);
}
.ci-meta {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.ci-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.ci-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}
.ci-remove {
    align-self: start;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}
.ci-remove:hover {
    color: #b42318;
    background: #fdf1ef;
}
.cart-empty {
    padding: 70px 10px;
    text-align: center;
    color: var(--ink-soft);
}
.cart-empty-icon {
    display: inline-grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    font-size: 1.6rem;
}
.cart-empty-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.cart-foot {
    padding: 20px 24px 22px;
    border-top: 1px solid var(--line);
    background: var(--ivory);
}
.cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 500;
}
.cart-total strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--navy);
}
.cart-note {
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.cart-note i { color: var(--gold); }
.cart-foot .btn-lux { margin-top: 12px; }

/* ---------- Aviso flotante ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1300;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100% - 32px);
    width: max-content;
    padding: 10px 10px 10px 10px;
    border-radius: 16px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 24px 48px -20px rgba(10, 31, 54, 0.7);
    transform: translate(-50%, 160%);
    transition: transform 0.55s var(--ease-out);
}
.toast.is-open { transform: translate(-50%, 0); }
.toast:empty { display: none; }
.toast img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
}
.toast span {
    min-width: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
    padding-right: 4px;
}
.toast strong {
    display: block;
    font-size: 0.86rem;
    color: #fff;
}
.toast button {
    flex: none;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
}

/* ---------- Ficha de producto ---------- */
.pmodal {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: grid;
    place-items: center;
    padding: 24px;
}
.pmodal-panel {
    position: relative;
    width: min(1000px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgba(10, 31, 54, 0.6);
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.4s ease, transform 0.55s var(--ease-out);
}
.pmodal.is-open .pmodal-panel {
    opacity: 1;
    transform: none;
}
.pmodal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
}
.pmodal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.pmodal-gallery {
    padding: 20px;
    background: var(--ivory);
}
.pmodal-main {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: var(--sand);
}
.pmodal-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pmodal-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.pmodal-thumb {
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--sand);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}
.pmodal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pmodal-thumb:hover,
.pmodal-thumb[aria-pressed="true"] { opacity: 1; }
.pmodal-thumb[aria-pressed="true"] { border-color: var(--gold); }
.pmodal-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 44px 36px 30px 32px;
}
.pmodal-cat {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-ink);
}
.pmodal-info h2 {
    margin: 0;
    padding-right: 30px;
    font-size: clamp(1.6rem, 2.6vw, 2.15rem);
    line-height: 1.15;
    color: var(--navy);
}
.pmodal-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}
.pmodal-price .price-now {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--navy);
}
.pmodal-price .price-old { font-size: 0.95rem; }
.pmodal-price .price-quote { font-size: 0.82rem; }
.save {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold-ink);
    font-size: 0.75rem;
    font-weight: 600;
}
.pmodal-desc {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.75;
}
.pmodal-details {
    display: grid;
    gap: 7px;
}
.pmodal-details li {
    position: relative;
    padding-left: 24px;
    font-size: 0.88rem;
    color: var(--ink);
}
.pmodal-details li::before {
    content: "\f00c";
    position: absolute;
    left: 0;
    top: 1px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--gold);
}
.size-field {
    border: 0;
    padding: 0;
    margin: 0;
}
.size-field legend {
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.size-error {
    margin-left: 8px;
    font-weight: 500;
    color: #b42318;
}
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.size-pill span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.size-pill span:hover { border-color: var(--navy); }
.size-pill input:checked + span {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.size-pill input:focus-visible + span {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.size-field.has-error .size-pill span { border-color: #e4a79f; }
.pmodal-buy {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.pmodal-buy .btn-lux {
    flex: 1;
    padding-left: 18px;
    padding-right: 18px;
}
.pmodal-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 0.88rem;
    font-weight: 600;
    color: #16874a;
}
.pmodal-wa:hover { text-decoration: underline; text-underline-offset: 3px; }
.pmodal-wa i { font-size: 1.15rem; }
.pmodal-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.pmodal-trust i {
    margin-right: 5px;
    color: var(--gold);
}

/* ---------- Menú para celular ---------- */
.mnav {
    position: fixed;
    inset: 0;
    z-index: 1200;
}
.mnav-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 86%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-out);
}
.mnav.is-open .mnav-panel { transform: none; }
.mnav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--brand-blue);
}
.mnav-head img {
    height: 54px;
    mix-blend-mode: screen;
}
.mnav-head .icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.mnav-panel ul { padding: 8px 0; }
.mnav-panel li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.12rem;
    color: var(--navy);
}
.mnav-panel li a i {
    font-size: 0.72rem;
    color: var(--gold);
}
.mnav-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 24px;
    padding: 14px;
    border-radius: 999px;
    background: #16874a;
    color: #fff;
    font-weight: 600;
}

/* =========================================================================
   PÁGINA DE LA TIENDA
   ========================================================================= */
.shop-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 90px 0 84px;
    color: #fff;
}
.shop-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('imagen/edredones/edredones-pima-2.jpg') center 60% / cover;
    transform: scale(1.08);
    animation: hero-zoom 14s ease-out forwards;
}
.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(10, 31, 54, 0.92) 20%, rgba(10, 31, 54, 0.55) 70%, rgba(10, 31, 54, 0.35));
}
@keyframes hero-zoom {
    to { transform: scale(1); }
}
.shop-hero-inner > * {
    animation: rise 1s var(--ease-out) both;
}
.shop-hero-inner > :nth-child(2) { animation-delay: 0.1s; }
.shop-hero-inner > :nth-child(3) { animation-delay: 0.2s; }
@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
}
.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.shop-hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
}
.shop-hero h1 em {
    color: var(--gold-light);
}
.shop-hero p {
    max-width: 540px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.shop-benefits {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.shop-benefits-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.benefit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 18px;
}
.benefit + .benefit { border-left: 1px solid var(--line); }
.benefit i {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
}
.benefit strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--navy);
}
.benefit span {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.shop-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 0;
}
.shop-toolbar-inner {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.shop-search {
    position: relative;
}
.shop-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-soft);
    font-size: 0.85rem;
}
.shop-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.88rem;
    color: var(--ink);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.shop-search input:focus,
.shop-sort select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
}
.shop-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.shop-chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.chip-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--sand);
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}
.chip[aria-pressed="true"] .chip-count {
    background: rgba(255, 255, 255, 0.16);
    color: var(--gold-light);
}
.shop-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--ink-soft);
    white-space: nowrap;
}
.shop-sort select {
    padding: 11px 36px 11px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230f2d4c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
    font: inherit;
    font-size: 0.85rem;
    color: var(--ink);
    appearance: none;
    cursor: pointer;
}

.shop-results {
    padding: 44px 0 110px;
    background: var(--ivory);
}
.shop-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}
.shop-results-head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--navy);
}
.shop-count {
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 28px;
}
.shop-grid .card-wrap {
    animation: card-in 0.7s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(26px) scale(0.98); }
}
.shop-empty {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    color: var(--ink-soft);
}
.shop-empty > i {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 14px;
}
.shop-empty-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.shop-empty .btn-ghost { margin-top: 22px; }

.b2b-banner {
    padding: 100px 0;
    color: #fff;
    background:
        radial-gradient(700px 360px at 90% 0%, rgba(179, 134, 75, 0.25), transparent 65%),
        var(--navy-deep);
}
.b2b-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}
.b2b-text .eyebrow {
    color: var(--gold-light);
    margin-bottom: 16px;
}
.b2b-text .eyebrow::before { background: var(--gold-light); }
.b2b-text h2 {
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    font-weight: 700;
    line-height: 1.12;
    color: #fff;
    margin-bottom: 16px;
}
.b2b-text h2 em {
    color: var(--gold-light);
}
.b2b-text p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.8;
}
.b2b-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 340px;
    justify-self: end;
    width: 100%;
}

.footer-contact { margin-top: 18px; }
.footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Medios de pago del inicio */
.pay-methods {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.pay-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    transition: border-color 0.4s ease, translate 0.4s var(--ease-out);
}
.pay-chip:hover {
    border-color: var(--gold);
    translate: 0 -3px;
}
.pay-chip i { font-size: 1.7rem; color: var(--navy); }
.pay-chip .fa-building-columns { font-size: 1.1rem; }
.pay-yape { color: #742284; }
.pay-plin { color: #00838f; }

/* =========================================================================
   PÁGINA DE PAGO
   ========================================================================= */
.page-pago { background: var(--ivory); }
.checkout-header {
    background: var(--brand-blue);
    color: #fff;
}
.checkout-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.checkout-logo img {
    display: block;
    height: 62px;
    mix-blend-mode: screen;
}
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}
.checkout-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkout-steps li + li::before {
    content: '';
    width: 36px;
    height: 1px;
    margin-right: 2px;
    background: rgba(255, 255, 255, 0.3);
}
.checkout-steps span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}
.checkout-steps .is-current { color: #fff; font-weight: 600; }
.checkout-steps .is-current span {
    background: var(--gold);
    border-color: var(--gold);
}
.checkout-steps .is-done { color: var(--gold-light); }
.checkout-steps .is-done span {
    border-color: var(--gold-light);
    font-size: 0;
}
.checkout-steps .is-done span::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.65rem;
}
.checkout-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 1.15rem;
}
.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold-light);
}

.checkout { padding: 36px 0 90px; }
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    align-items: start;
    gap: 40px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.back-link:hover { color: var(--navy); }
.checkout-form h1 {
    margin-bottom: 24px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 700;
    color: var(--navy);
}
.co-section {
    margin-bottom: 20px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}
.co-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy);
}
.co-num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold-light);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}
.co-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}
.field-full { grid-column: 1 / -1; }
.field label,
.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.opt {
    font-weight: 400;
    color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd4c6;
    border-radius: 12px;
    background: #fdfcf9;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field select {
    appearance: none;
    background: #fdfcf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230f2d4c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
    padding-right: 36px;
}
.field textarea { resize: vertical; }
.field-error {
    display: none;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #b42318;
}
.field.has-error input,
.field.has-error select { border-color: #d9534f; }
.field.has-error .field-error,
.check-error.is-visible { display: block; }

.segmented {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--sand);
}
.segmented label { margin: 0; }
.segmented span {
    display: block;
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.segmented input:checked + span {
    background: #fff;
    color: var(--navy);
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(15, 45, 76, 0.25);
}
.segmented input:focus-visible + span { outline: 2px solid var(--gold); }

.option-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.option-cards-pay { grid-template-columns: 1fr; }
.option-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 44px 16px 16px;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.option-card:hover { border-color: #cdbfa9; }
.option-card::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 1.5px solid #cdbfa9;
    border-radius: 50%;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.option-card:has(input:checked) {
    border-color: var(--gold);
    background: #fffcf6;
}
.option-card:has(input:checked)::after {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: inset 0 0 0 3px #fff;
}
.option-card:has(input:focus-visible) {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}
.option-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sand);
    color: var(--navy);
    font-size: 1.05rem;
}
.icon-yape {
    background: #742284;
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.2rem;
}
.option-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
}
.option-text small {
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.option-text small i { font-size: 1.05rem; vertical-align: -2px; }
.co-hint {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.co-hint i { color: var(--gold); margin-right: 4px; }
.co-hint-center { text-align: center; margin-top: 12px; }
.co-notes { margin-bottom: 18px; }
.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    cursor: pointer;
}
.check input {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--navy);
}
.check.has-error { color: #b42318; }
.co-submit {
    margin-top: 20px;
    padding-top: 18px;
    padding-bottom: 18px;
    font-size: 0.82rem;
}

.co-summary {
    position: sticky;
    top: 24px;
}
.co-summary-inner {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}
.co-summary-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.co-summary-head h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--navy);
}
.co-summary-head .btn-link {
    width: auto;
    margin: 0;
}
.co-items li {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.co-thumb {
    position: relative;
    width: 58px;
    height: 58px;
}
.co-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: var(--sand);
}
.co-qty {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}
.co-item-text { min-width: 0; }
.co-item-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink);
}
.co-item-meta {
    display: block;
    font-size: 0.77rem;
    color: var(--ink-soft);
}
.co-item-price {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}
.co-totals { margin-top: 12px; }
.co-totals div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 0.9rem;
}
.co-totals dt { color: var(--ink-soft); }
.co-totals dd { color: var(--ink); font-weight: 500; }
.co-totals .co-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    align-items: baseline;
}
.co-total dt { color: var(--ink); font-weight: 600; }
.co-total dd {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
}
.co-trust {
    display: grid;
    gap: 9px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.co-trust i {
    width: 18px;
    color: var(--gold);
}

.co-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--ink-soft);
}
.co-empty h1 {
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
}
.co-empty .btn-lux { margin-top: 24px; }

/* Confirmación */
.co-confirm { max-width: 1000px; }
.confirm-hero {
    padding: 30px 0 40px;
    text-align: center;
}
.confirm-check {
    width: 84px;
    height: 84px;
    margin: 0 auto 22px;
}
.confirm-check svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.confirm-check circle {
    stroke: var(--gold);
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: draw 0.9s var(--ease-out) forwards;
}
.confirm-check path {
    stroke: var(--navy);
    stroke-width: 3.5;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw 0.6s var(--ease-out) 0.6s forwards;
}
@keyframes draw {
    to { stroke-dashoffset: 0; }
}
.confirm-hero .eyebrow { margin-bottom: 12px; }
.confirm-hero h1 {
    margin-bottom: 14px;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--navy);
    outline: none;
}
.confirm-num {
    display: inline-flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 16px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.confirm-num strong {
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--navy);
}
.confirm-lead {
    max-width: 520px;
    margin: 0 auto 26px;
    color: var(--ink-soft);
    line-height: 1.7;
}
.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    border-radius: 999px;
    background: #16874a;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 18px 36px -16px rgba(22, 135, 74, 0.8);
    transition: background-color 0.3s ease, translate 0.4s var(--ease-out);
    animation: wa-glow 2.4s ease-in-out 1.5s infinite;
}
.btn-wa i { font-size: 1.4rem; }
.btn-wa:hover {
    background: #11703d;
    translate: 0 -2px;
}
@keyframes wa-glow {
    50% { box-shadow: 0 18px 36px -16px rgba(22, 135, 74, 0.8), 0 0 0 10px rgba(22, 135, 74, 0.12); }
}
.confirm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}
.confirm-box {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}
.confirm-box h2 {
    margin-bottom: 18px;
    font-size: 1.3rem;
    color: var(--navy);
}
.confirm-box p { color: var(--ink-soft); line-height: 1.7; font-size: 0.92rem; }
.pay-method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.pay-method-head h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}
.pay-amount {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ivory);
}
.pay-amount strong {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--navy);
}
.pay-amount small {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.pay-note {
    margin-top: 12px;
    font-size: 0.84rem !important;
}
.pay-note i { color: var(--gold); }
.pay-qr {
    display: block;
    width: 190px;
    margin: 6px auto 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.copy-row span {
    width: 60px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.copy-row strong {
    flex: 1;
    color: var(--navy);
    letter-spacing: 0.04em;
}
.copy-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}
.copy-btn:hover { background: var(--sand); }
.bank-card {
    margin-bottom: 10px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.bank-name {
    font-weight: 600;
    color: var(--ink) !important;
}
.confirm-data {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.confirm-data div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.88rem;
}
.confirm-data dt { color: var(--ink-soft); }
.confirm-data dd { color: var(--ink); }
.confirm-foot {
    margin-top: 36px;
    text-align: center;
}
.checkout-footer {
    padding: 26px 0;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
    text-align: center;
}
.checkout-footer p + p { margin-top: 4px; }
.checkout-footer a:hover { color: var(--navy); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1100px) {
    .products-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-toolbar-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }
    .shop-chips {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .shop-benefits-inner { grid-template-columns: repeat(2, 1fr); }
    .benefit:nth-child(3) { border-left: 0; }
    .benefit:nth-child(n+3) { border-top: 1px solid var(--line); }
    .b2b-inner { grid-template-columns: 1fr; }
    .b2b-actions { justify-self: start; }
    .checkout-grid { grid-template-columns: 1fr; }
    .co-summary {
        position: static;
        order: -1;
    }
    .checkout-steps li:not(.is-current) { display: none; }
    .checkout-steps li + li::before { display: none; }
}

@media (max-width: 760px) {
    .pmodal {
        padding: 0;
        place-items: end stretch;
    }
    .pmodal-panel {
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        opacity: 1;
    }
    .pmodal-body { grid-template-columns: 1fr; }
    .pmodal-gallery { padding: 12px; }
    .pmodal-main { aspect-ratio: 4 / 3; }
    .pmodal-info { padding: 22px 20px 28px; }
    .confirm-grid,
    .co-fields,
    .option-cards { grid-template-columns: 1fr; }
    .co-section { padding: 22px 18px; }
    .secure-badge span,
    .secure-badge { font-size: 0; gap: 0; }
    .secure-badge i { font-size: 1rem; }
    .checkout-logo img { height: 50px; }
}

@media (max-width: 600px) {
    .shop-hero { padding: 60px 0 56px; }
    .benefit {
        padding: 14px 8px;
        gap: 10px;
    }
    .benefit i {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    .benefit strong { font-size: 0.84rem; line-height: 1.3; }
    .benefit span { display: none; }
    .shop-sort span { display: none; }
    .shop-sort select { width: 132px; }
    .shop-results { padding-top: 28px; }

    /* Tarjetas compactas en 2 columnas */
    .shop-grid,
    .products-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .shop-grid .product-card-modern,
    .products-grid.cols-4 .product-card-modern {
        padding: 6px;
        border-radius: 16px;
    }
    .shop-grid .product-info,
    .products-grid.cols-4 .product-info { padding: 14px 4px 6px; }
    .shop-grid .product-title,
    .products-grid.cols-4 .product-title {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }
    .shop-grid .price-now,
    .products-grid.cols-4 .price-now { font-size: 1rem; }
    .shop-grid .price-quote,
    .products-grid.cols-4 .price-quote { font-size: 0.76rem; }
    .shop-grid .btn-card,
    .products-grid.cols-4 .btn-card {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    .shop-grid .lbl-long,
    .products-grid.cols-4 .lbl-long { display: none; }
    .shop-grid .lbl-short,
    .products-grid.cols-4 .lbl-short { display: inline; }
    .badge { font-size: 0.58rem; padding: 4px 7px; }
    .badges { top: 8px; left: 8px; }
    .shop-grid .badge-line,
    .products-grid.cols-4 .badge-line { display: none; }

    /* En celular el aviso sale arriba, lejos de los botones y textos de compra */
    .toast {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        bottom: auto;
        transform: translate(-50%, -180%);
    }
    .toast.is-open { transform: translate(-50%, 0); }
    .toast span { max-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
    .shop-grid .card-wrap,
    .shop-hero-bg,
    .shop-hero-inner > *,
    .btn-wa,
    .confirm-check circle,
    .confirm-check path {
        animation: none;
    }
    .confirm-check circle,
    .confirm-check path { stroke-dashoffset: 0; }
    .cart-drawer,
    .mnav-panel,
    .pmodal-panel,
    .toast { transition-duration: 0.01s; }
}
