/* Listado de productos (Products): fondo transparente (cream del sitio),
   filtros cuidados, tarjetas con carrusel de fotos + paginador y add-to-cart. */

.pd-collection {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    background: transparent;
    color: #141414;
}

.pd-collection__header {
    text-align: center;
    margin-bottom: 24px;
}

.pd-collection__title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
}

.pd-collection__error {
    border: 1px solid rgba(255, 27, 130, 0.4);
    background: rgba(255, 27, 130, 0.08);
    padding: 12px 16px;
    border-radius: 10px;
}

/* ---------- Filtros ---------- */
.pd-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-bottom: 18px;
}

.pd-filters__group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-filters__group--sort {
    margin-left: auto;
}

.pd-filters__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.65;
}

/* Chips de disponibilidad (checkbox estilizado) */
.pd-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

/* Checkbox oculto: el estado seleccionado se muestra solo con borde + fondo. */
.pd-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.pd-chip:hover {
    border-color: #ff1b82;
}

.pd-chip:has(input:checked) {
    background: rgba(255, 27, 130, 0.12);
    border-color: #ff1b82;
    color: #ff1b82;
    font-weight: 600;
}

.pd-filters__price {
    width: 76px;
    padding: 9px 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.pd-filters__price:focus {
    outline: none;
    border-color: #ff1b82;
    box-shadow: 0 0 0 3px rgba(255, 27, 130, 0.15);
}

.pd-filters__dash {
    opacity: 0.5;
}

.pd-filters__sort {
    padding: 9px 14px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    font: inherit;
    cursor: pointer;
    background: #fff;
}

.pd-filters__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pd-filters__apply {
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    background: #ff1b82;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.pd-filters__apply:hover {
    background: #e00f6f;
}

.pd-filters__clear {
    color: inherit;
    opacity: 0.6;
    text-decoration: underline;
    font-size: 0.9rem;
}

.pd-filters__clear:hover {
    opacity: 1;
}

.pd-collection__count {
    opacity: 0.65;
    font-size: 0.9rem;
    margin: 0 0 18px;
}

/* ---------- Grid ---------- */
.pd-collection__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 36px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Galería con carrusel + paginador dentro de la imagen */
.pd-card__gallery {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #f3efe8;
}

.pd-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pd-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.pd-card__img.is-active {
    opacity: 1;
}

.pd-card__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 2;
}

.pd-card__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.pd-card__dot.is-active {
    background: #ff1b82;
    transform: scale(1.25);
}

/* Contenido + add to cart */
.pd-card__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-card__title {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
}

.pd-card__title:hover {
    text-decoration: underline;
}

.pd-card .price {
    color: #141414;
    opacity: 0.85;
}

.pd-card__add {
    margin-top: 6px;
    border: 1px solid #ff1b82;
    background: #ff1b82;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pd-card__add:hover {
    background: #fff;
    color: #ff1b82;
}

.pd-card__add[disabled] {
    border-color: rgba(0, 0, 0, 0.2);
    background: transparent;
    color: rgba(0, 0, 0, 0.45);
    cursor: not-allowed;
}

.pd-card__add.is-loading {
    opacity: 0.7;
    cursor: progress;
}

.pd-collection__empty {
    grid-column: 1 / -1;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .pd-filters__group--sort { margin-left: 0; }
    .pd-filters { gap: 12px 16px; }
}

/* Grid responsive: tarjetas de tamaño acotado y centradas (bien con 2 o con muchas). */
.pd-collection__grid {
    grid-template-columns: 1fr;
    justify-content: center;
}
@media (min-width: 600px) {
    .pd-collection__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .pd-collection__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Fila precio + icono de carrito, y flechas de foto en hover */
.pd-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}
.pd-card__add {
    flex: none;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #ff1b82;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.pd-card__add:hover { transform: scale(1.06); }
.pd-card__add[disabled] { background: rgba(0, 0, 0, 0.18); cursor: not-allowed; transform: none; }
.pd-card__add svg { width: 20px; height: 20px; }

.pd-card__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #141414;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}
.pd-card__nav--prev { left: 8px; }
.pd-card__nav--next { right: 8px; }
.pd-card__gallery:hover .pd-card__nav { opacity: 1; }
.pd-card__nav:hover { background: #fff; }
.pd-card__nav svg { width: 18px; height: 18px; }

/* Badge: unidades de ESE producto en el carrito. */
.pd-card__add { position: relative; }
.pd-card__add-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #fff;
    color: #ff1b82;
    border: 1px solid #ff1b82;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* El icono de carrito cambia a "+" al hacer hover. */
.pd-card__icon--plus { display: none; }
.pd-card__add:hover .pd-card__icon--cart { display: none; }
.pd-card__add:hover .pd-card__icon--plus { display: block; }
