/* ============================================================
   SINGLE PRODUCT PDS — Estilo Farmacity/Punto de Salud
   ============================================================ */

:root {
    --pds2-primary: #8267AB;
    --pds2-success: #00a650;
    --pds2-border: #e8e8e8;
    --pds2-text: #333333;
    --pds2-text-light: #666666;
    --pds2-bg: #ffffff;
    --pds2-radius: 8px;
}

.pds-sp2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--pds2-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- MAIN GRID ---- */
.pds-sp2-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
}

/* ---- GALLERY COLUMN ---- */
.pds-sp2-gallery-col {
    display: flex;
    gap: 12px;
    flex: 0 0 48%;
    max-width: 48%;
    position: relative;
}

/* Thumbnails */
.pds-sp2-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.pds-sp2-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid var(--pds2-border);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
    background: #fafafa;
}

.pds-sp2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pds-sp2-thumb.active,
.pds-sp2-thumb:hover {
    border-color: var(--pds2-primary);
}

/* Main image wrap */
.pds-sp2-image-wrap {
    width: 100%;
    position: relative;
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    overflow: hidden;
    background: #fff;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pds2-main-img {
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    padding: 16px;
}

/* Discount badge */
.pds-sp2-badge-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e91e8c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: 0.01em;
}

/* Share button */
.pds-sp2-share-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    box-sizing: border-box !important;
    background: rgba(255,255,255,0.95) !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 3;
    color: #8267AB !important;
    transition: background 0.15s, box-shadow 0.15s;
    padding: 0 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.pds-sp2-share-btn:hover {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

/* Zoom wrap, lens y result */
.pds-sp2-zoom-wrap {
    flex: 1;
    position: relative;
}
.pds-sp2-zoom-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(130, 103, 171, 0.7);
    background: rgba(255,255,255,0.15);
    pointer-events: none;
    z-index: 10;
    display: none;
    border-radius: 4px;
    cursor: crosshair;
}
.pds-sp2-zoom-result {
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    width: 420px;
    height: 420px;
    background-repeat: no-repeat;
    background-color: #fff;
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    z-index: 100;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
}
@media (max-width: 900px) {
    .pds-sp2-zoom-result { display: none !important; }
    .pds-sp2-zoom-lens   { display: none !important; }
}

/* ---- INFO COLUMN ---- */
.pds-sp2-info-col {
    flex: 1;
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    padding: 24px;
    background: #fff;
}

/* Category breadcrumb */
.pds-sp2-cat-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.pds-sp2-cat-breadcrumb a {
    color: #888;
    text-decoration: none;
}
.pds-sp2-cat-breadcrumb a:hover {
    color: var(--pds2-primary);
    text-decoration: underline;
}
.pds-sp2-cat-sep {
    color: #bbb;
    font-size: 13px;
    line-height: 1;
}

/* Brand */
.pds-sp2-brand {
    display: inline-block;
    color: var(--pds2-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 6px;
}
.pds-sp2-brand:hover { text-decoration: underline; }

/* Title row */
.pds-sp2-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pds-sp2-title-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.pds-sp2-title {
    font-size: 18px;
    font-weight: 400;
    color: var(--pds2-text);
    margin: 0;
    line-height: 1.3;
}

.pds-sp2-stock-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--pds2-success);
    background: rgba(0, 166, 80, 0.1);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

.pds-sp2-stock-badge.out {
    color: #e53935;
    background: rgba(229, 57, 53, 0.1);
}

/* Wishlist — círculo perfecto */
/* ---- WISHLIST WRAP: estilizar botón nativo de WoodMart ---- */
.pds-sp2 .pds-sp2-wishlist-wrap {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    position: relative;
    overflow: visible !important;
}

/* Popover login wishlist */
.pds-sp2 .pds-sp2-wl-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1.5px solid #3aaf90;
    border-radius: 10px;
    padding: 14px 16px;
    width: 220px;
    box-shadow: 0 4px 20px rgba(130,103,171,0.18);
    z-index: 9999;
    font-size: 13px;
    line-height: 1.45;
    color: #333;
}
.pds-sp2 .pds-sp2-wl-popover p {
    margin: 0 0 10px;
}
.pds-sp2 .pds-sp2-wl-popover a {
    display: block;
    box-sizing: border-box;
    background: #8267AB;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    width: 100%;
    border: none;
}
.pds-sp2 .pds-sp2-wl-popover a:hover {
    background: #6e548f;
    color: #fff;
}
.pds-sp2 .pds-sp2-wishlist-wrap > a {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid var(--pds2-border) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #bbb !important;
    transition: color 0.15s, border-color 0.15s !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    overflow: hidden !important;
}
/* Ocultar texto, solo mostrar el icono ::before de WoodMart */
.pds-sp2 .pds-sp2-wishlist-wrap > a span {
    display: none !important;
}
/* El icono ::before de WoodMart */
.pds-sp2 .pds-sp2-wishlist-wrap > a::before {
    font-size: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #bbb !important;
    transition: color 0.15s !important;
}
/* Ocultar ::after si existe */
.pds-sp2 .pds-sp2-wishlist-wrap > a::after {
    display: none !important;
}
/* Hover */
.pds-sp2 .pds-sp2-wishlist-wrap > a:hover {
    color: #e91e8c !important;
    border-color: #e91e8c !important;
}
.pds-sp2 .pds-sp2-wishlist-wrap > a:hover::before {
    color: #e91e8c !important;
}
/* Estado "added": corazón RELLENO rosa (SVG inline via CSS) */
.pds-sp2 .pds-sp2-wishlist-wrap > a.added {
    color: #e91e8c !important;
    border-color: #e91e8c !important;
    background: #fff0f6 !important;
}
.pds-sp2 .pds-sp2-wishlist-wrap > a.added::before {
    content: "" !important; /* quitar icono de fuente */
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e91e8c' stroke='%23e91e8c' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    font-size: 0 !important;
}
/* Loading spinner de WoodMart */
.pds-sp2 .pds-sp2-wishlist-wrap > a.loading {
    opacity: 0.5 !important;
    pointer-events: none !important;
}
.pds-sp2 .pds-sp2-wishlist-wrap > a.loading::after {
    display: none !important;
}

/* ---- LIGHTBOX ---- */
.pds-sp2-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: zoom-out;
}
.pds-sp2-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    cursor: default;
}
.pds-sp2-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    opacity: 0.8;
}

/* Price block */
.pds-sp2-price-block {
    margin-bottom: 18px;
}

.pds-sp2-discount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.pds-sp2-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.pds-sp2-discount-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pds2-primary);
}

.pds-sp2-price {
    font-size: 34px;
    font-weight: 300;
    color: var(--pds2-text);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.pds-sp2-installments {
    font-size: 13px;
    color: var(--pds2-success);
    font-weight: 500;
}

/* Buy row: qty + add button */
.pds-sp2-buy-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pds-sp2-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--pds2-border);
    border-radius: 6px;
    overflow: hidden;
}

.pds-sp2 .pds-sp2-qty-btn {
    width: 36px !important;
    height: 38px !important;
    background: #f5f5f5 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: var(--pds2-text) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.12s !important;
    padding: 0 !important;
    line-height: 1 !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    pointer-events: auto !important;
}
.pds-sp2 .pds-sp2-qty-btn:hover { background: #e0e0e0 !important; }

.pds-sp2-qty-val {
    min-width: 36px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    padding: 0 6px;
}

.pds-sp2-btn-add {
    flex: 1;
    background: var(--pds2-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, opacity 0.15s;
    text-transform: none !important;
    letter-spacing: 0;
}
.pds-sp2-btn-add:hover {
    background: #6f52a0;
    color: #fff;
    text-decoration: none;
}
.pds-sp2-btn-add.loading {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}
.pds-sp2-btn-add.added {
    background: var(--pds2-primary);
    color: #fff;
}

/* Botón sin stock */
.pds-sp2-btn-add.is-soldout,
.pds-sp2-sticky-btn.is-soldout {
    background: #d0d0d0 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

/* Tooltip soldout */
.pds-sp2-soldout-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    padding: 7px 13px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 99999;
    animation: pdsSlideInUp 0.15s ease;
}
.pds-sp2-soldout-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Mensaje de error flotante */
.pds-sp2-added-msg--error {
    background: #c0392b !important;
}

/* Ocultar link "Ver carrito" que agrega WooCommerce */
.pds-sp2 .added_to_cart,
.pds-sp2-sticky-bar .added_to_cart {
    display: none !important;
}

/* Short desc */
.pds-sp2-short-desc {
    font-size: 13px;
    color: var(--pds2-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pds2-border);
}

/* ---- DELIVERY SECTION ---- */
/* ---- DELIVERY: Filas compactas ---- */
.pds-sp2-delivery {
    margin-bottom: 16px;
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    overflow: hidden;
}

/* Fila individual: label izquierda + opciones derecha */
.pds-sp2-drow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pds2-border);
}
.pds-sp2-drow:last-of-type {
    border-bottom: none;
}

/* Label izquierda */
.pds-sp2-drow-label {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 150px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #555;
    text-transform: uppercase;
}
.pds-sp2-drow-label svg {
    flex-shrink: 0;
    color: var(--pds2-primary);
}

/* Opciones derecha: chips/botones */
.pds-sp2-drow-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

/* Columna precio (extremo derecho de cada fila) */
.pds-sp2-drow-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: 70px;
}

.pds-sp2-price-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--pds2-text);
    white-space: nowrap;
}
.pds-sp2-price-tag--free {
    color: var(--pds2-success);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.pds-sp2-price-tag--oca {
    color: #555;
    font-size: 12px;
}

.pds-sp2-doption-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--pds2-border);
    background: #f7f7f7;
    font-size: 12px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-transform: none !important;
    line-height: 1.3;
    white-space: nowrap;
}
.pds-sp2-doption-chip:hover {
    border-color: var(--pds2-primary);
    color: var(--pds2-primary);
    background: #f3eeff;
}
.pds-sp2-doption-chip.active {
    border-color: var(--pds2-primary);
    background: var(--pds2-primary);
    color: #fff;
}
.pds-sp2-doption-chip.active svg { stroke: #fff; }

/* Panel de detalle expandible (debajo de las filas) */
.pds-sp2-dpanel-detail {
    display: none;
    border-top: 1px solid var(--pds2-border);
    background: #fafafa;
}
.pds-sp2-dpanel-detail.active {
    display: block;
}
.pds-sp2-dpanel-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px;
    font-size: 13px;
}
.pds-sp2-dpanel-inner strong {
    font-weight: 600;
    color: var(--pds2-text);
}
.pds-sp2-dpanel-inner span {
    color: var(--pds2-text-light);
    font-size: 12px;
}
.pds-sp2-dpanel-inner.is-express strong {
    color: var(--pds2-success);
}
.pds-sp2-flex-detail {
    color: var(--pds2-success) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

.pds2-inline-link {
    font-size: 12px;
    color: var(--pds2-primary);
    text-decoration: none;
    margin-top: 4px;
}
.pds2-inline-link:hover { text-decoration: underline; }

.pds-sp2-link-sm {
    font-size: 12px;
    color: var(--pds2-primary);
    text-decoration: none;
}
.pds-sp2-link-sm:hover { text-decoration: underline; }

/* Zones panel */
.pds-sp2-zones-panel {
    background: #fff;
    border: 1px solid var(--pds2-border);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 6px;
    font-size: 12px;
}
.pds-sp2-zone-item { margin-bottom: 6px; }
.pds-sp2-zone-item:last-child { margin-bottom: 0; }
.pds-sp2-zone-item strong { display: block; font-size: 12px; color: var(--pds2-text); }
.pds-sp2-zone-item p { margin: 2px 0 0; color: #888; font-size: 11px; }

/* Postal section */
.pds-sp2-postal-section {
    margin-bottom: 4px;
}
.pds-sp2-postal-row {
    display: flex;
    gap: 8px;
}
.pds-sp2-postal-input {
    flex: 1;
    border: 1px solid var(--pds2-border);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--pds2-text);
    outline: none;
    transition: border-color 0.15s;
}
.pds-sp2-postal-input:focus { border-color: var(--pds2-primary); }
.pds-sp2-postal-input::placeholder { color: #bbb; }

.pds-sp2-postal-btn {
    background: #555;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    text-transform: none !important;
}
.pds-sp2-postal-btn:hover { background: #333; }

.pds-sp2-postal-result {
    font-size: 13px;
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
}
.pds-sp2-postal-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}
.pds-sp2-postal-result-row:last-child { border-bottom: none; }
.pds-sp2-postal-result-row.flex-ok { background: #edf7ef; color: #2e7d32; }
.pds-sp2-postal-result-row.oca-ok  { background: #e8f0fe; color: #1a56db; }
.pds-sp2-postal-result-row.no-cov  { background: #fff3e0; color: #e65100; }
.pds-sp2-postal-result-row strong  { font-size: 13px; }

/* ---- TABS ---- */
.pds-sp2-tabs-section {
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    overflow: hidden;
    margin-bottom: 32px;
    background: #fff;
}

.pds-sp2-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--pds2-border);
    background: #fafafa;
}

.pds-sp2-tab {
    background: none;
    border: none;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pds2-text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s;
    text-transform: none !important;
}

.pds-sp2-tab.active {
    color: var(--pds2-primary);
    border-bottom-color: var(--pds2-primary);
    font-weight: 600;
}

.pds-sp2-tab-pane {
    display: none;
    padding: 24px;
}

.pds-sp2-tab-pane.active { display: block; }

.pds-sp2-tab-desc {
    font-size: 14px;
    color: var(--pds2-text-light);
    line-height: 1.7;
}

.pds-sp2-tab-empty {
    font-size: 13px;
    color: #bbb;
    margin: 0;
}

/* Referencia table */
.pds-sp2-ref-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pds-sp2-ref-row {
    display: flex;
    gap: 24px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pds2-border);
    font-size: 14px;
}

.pds-sp2-ref-row:last-child { border-bottom: none; }

.pds-sp2-ref-row span:first-child {
    font-weight: 600;
    color: var(--pds2-text);
    min-width: 140px;
    flex-shrink: 0;
}

.pds-sp2-ref-row span:last-child {
    color: var(--pds2-text-light);
}

/* ---- PLACEHOLDER ---- */
.pds-sp2-placeholder {
    padding: 40px;
    text-align: center;
    color: #aaa;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .pds-sp2-main {
        flex-direction: column;
    }
    .pds-sp2-gallery-col,
    .pds-sp2-info-col {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .pds-sp2-gallery-col {
        max-height: 340px;
    }
    .pds2-main-img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .pds-sp2-info-col { padding: 16px; }
    .pds-sp2-price { font-size: 26px; }
    .pds-sp2-title { font-size: 16px; }
    .pds-sp2-thumbs { display: none; }

    /* Delivery: filas en columna para que no se corten */
    .pds-sp2-drow {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .pds-sp2-drow-label {
        flex: 0 0 100%;
        font-size: 10px;
    }
    .pds-sp2-drow-options {
        flex: 0 0 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    .pds-sp2-doption-chip {
        font-size: 11px;
        padding: 5px 10px;
        white-space: normal;
    }
}

/* ---- PRODUCTOS RELACIONADOS ---- */
.pds-sp2-related {
    margin-bottom: 40px;
}

.pds-sp2-related-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pds2-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--pds2-primary);
    display: inline-block;
    letter-spacing: 0.01em;
}

.pds-sp2-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.pds-sp2-rcard {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--pds2-border);
    border-radius: var(--pds2-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
    position: relative;
}
.pds-sp2-rcard:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    text-decoration: none;
    color: inherit;
}

.pds-sp2-rbadge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e91e8c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    z-index: 1;
}

.pds-sp2-rimg {
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pds-sp2-rimg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.pds-sp2-rinfo {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.pds-sp2-rname {
    font-size: 12px;
    color: var(--pds2-text);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pds-sp2-rold {
    font-size: 11px;
    color: #aaa;
    margin: 0;
    text-decoration: line-through;
}
.pds-sp2-rold em {
    font-style: normal;
    color: var(--pds2-primary);
    text-decoration: none;
    font-weight: 600;
}

.pds-sp2-rprice {
    font-size: 15px;
    font-weight: 600;
    color: var(--pds2-text);
    margin: 2px 0 6px;
}

.pds-sp2-rbtn {
    display: block;
    width: 100%;
    background: var(--pds2-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-transform: none !important;
    transition: background 0.15s;
    margin-top: auto;
    text-decoration: none;
}
.pds-sp2-rbtn:hover { background: #6f52a0; color: #fff; }

@media (max-width: 600px) {
    .pds-sp2-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- MENSAJE AGREGADO AL CARRITO (flotante sobre el botón) ---- */
.pds-sp2-added-msg {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    animation: pdsSlideInUp 0.22s ease;
    white-space: nowrap;
    pointer-events: none;
}
.pds-sp2-added-msg svg {
    flex-shrink: 0;
    color: #4caf50;
    stroke: #4caf50;
}
.pds-sp2-added-msg--out {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}
@keyframes pdsSlideInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Toast dentro de cards del carrusel */
.pds-sp2-added-msg--carousel {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 8px;
    animation: pdsFadeIn 0.22s ease;
}
@keyframes pdsFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---- STICKY BAR MOBILE ---- */
.pds-sp2-sticky-bar {
    display: none; /* solo mobile, JS lo muestra */
}

@media (max-width: 900px) {
    .pds-sp2-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: #fff;
        border-top: 1px solid var(--pds2-border);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
        padding: 10px 16px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        display: none;
        align-items: center;
        gap: 10px;
        overflow: visible;
    }
    .pds-sp2-sticky-bar.is-visible {
        display: flex;
    }
    .pds-sp2-sticky-qty {
        flex: 0 0 130px;
        height: 46px;
        border: 1px solid var(--pds2-border);
        border-radius: 6px;
        padding: 0 10px;
        font-size: 14px;
        color: var(--pds2-text);
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
    }
    .pds-sp2-sticky-btn {
        flex: 1;
        height: 46px;
        background: var(--pds2-primary);
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s, opacity 0.15s;
        text-transform: none !important;
        letter-spacing: 0;
    }
    .pds-sp2-sticky-btn:hover  { background: #6f52a0; color: #fff; text-decoration: none; }
    .pds-sp2-sticky-btn.loading { opacity: 0.65; pointer-events: none; }
}

/* ---- CARRUSELES ---- */
/* ===== CARRUSELES - SCROLL NATIVO ===== */
.pds-sp2-carousel {
    margin-bottom: 40px;
}

.pds-sp2-carousel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pds2-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--pds2-primary);
    display: inline-block;
    letter-spacing: 0.01em;
}

.pds-sp2-carousel-wrapper {
    position: relative;
}

.pds-sp2-carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Ocultar scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 4px 0;
}
.pds-sp2-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Desktop: 6 visibles */
.pds-sp2-carousel-track .pds-sp2-rcard {
    flex: 0 0 calc((100% - 5 * 16px) / 6);
    scroll-snap-align: start;
    min-width: 0;
}

/* Flechas absolutas sobre el carrusel */
.pds-sp2-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50% !important;
    border: 1px solid var(--pds2-border) !important;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pds2-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
    z-index: 3;
    padding: 0 !important;
    margin: 0;
    line-height: 1;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.pds-sp2-carousel-prev { left: -18px; }
.pds-sp2-carousel-next { right: -18px; }

.pds-sp2-carousel-btn:hover {
    background: var(--pds2-primary);
    color: #fff;
    border-color: var(--pds2-primary);
    box-shadow: 0 2px 8px rgba(130,103,171,0.25);
}
.pds-sp2-carousel-btn:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

/* Tablet: 4 visibles */
@media (max-width: 900px) {
    .pds-sp2-carousel-track .pds-sp2-rcard {
        flex: 0 0 calc((100% - 3 * 16px) / 4);
    }
    .pds-sp2-carousel-prev { left: -12px; }
    .pds-sp2-carousel-next { right: -12px; }
}

/* Mobile: 2 visibles */
@media (max-width: 600px) {
    .pds-sp2-carousel-track .pds-sp2-rcard {
        flex: 0 0 calc((100% - 16px) / 2);
    }
    .pds-sp2-carousel-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px;
        min-height: 30px;
        max-width: 30px;
        max-height: 30px;
    }
    .pds-sp2-carousel-prev { left: -8px; }
    .pds-sp2-carousel-next { right: -8px; }
}
