/* =============================================
   Shop Detail Page — Valento
   ============================================= */

/* ── Breadcrumb ──────────────────────────── */
.sd-breadcrumb {
    padding: 14px 0 10px;
    border-bottom: 2px solid #8C6B2E;
    margin-bottom: 30px;
}
.sd-breadcrumb a,
.sd-breadcrumb span {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #8C6B2E;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.sd-breadcrumb span { color: #888; }
.sd-breadcrumb .sep { margin: 0 6px; color: #8C6B2E; }

/* ── Layout principal ────────────────────── */
.sd-main {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 50px;
}

/* ── Galería ─────────────────────────────── */
.sd-gallery {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    width: 520px;
}
.sd-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 68px;
    flex-shrink: 0;
}
.sd-thumb {
    width: 68px;
    height: 76px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
    background: #f5f5f5;
}
.sd-thumb.active,
.sd-thumb:hover { border-color: #8C6B2E; }
.sd-thumb--color {
    width: 68px;
    height: 68px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}
.sd-thumb--color.active,
.sd-thumb--color:hover { border-color: #8C6B2E; }

/* Miniaturas (pisan los estilos heredados de web_shopDetail.scss) */
.sd-gallery .modern-thumb-link {
    flex: 0 0 auto;
    width: 68px;
    height: 84px;
    padding: 3px;
    border: 1px solid #e6e0d4;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.sd-gallery .modern-thumb-link:hover { border-color: #c9ad76; transform: translateY(-1px); }
.sd-gallery .modern-thumb-link.active-thumb {
    border-color: #8C6B2E !important;
    box-shadow: 0 4px 12px rgba(140, 107, 46, .18);
}
.sd-gallery .modern-thumb-link .sd-thumb {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 4px;
    object-fit: cover;
    background: #f6f4ef;
}

/* Imagen principal: encuadre fijo 4:5, la foto se ve completa (contain) */
.sd-main-img-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 640px;
    border: 1px solid #ece7dc;
    border-radius: 6px;
    overflow: hidden;
    background: #f6f4ef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}
.sd-main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Botón "Ver ampliado" */
.sd-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .94);
    color: #172144;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(23, 33, 68, .16);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.sd-zoom-btn:hover,
.sd-zoom-btn:focus-visible { background: #8C6B2E; color: #fff; transform: scale(1.06); text-decoration: none; }

/* Lupa que sigue al cursor + aviso "Clic para ampliar" */
.sd-zoom-lens,
.sd-zoom-hint {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}
.sd-zoom-lens {
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    border: 2px solid #E7B669;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 8px 24px rgba(23, 33, 68, .25);
}
/* Cruz central de la lupa */
.sd-zoom-lens::before,
.sd-zoom-lens::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(231, 182, 105, .9);
    transform: translate(-50%, -50%);
}
.sd-zoom-lens::before { width: 14px; height: 1px; }
.sd-zoom-lens::after  { width: 1px; height: 14px; }
.sd-zoom-hint {
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 8px 14px;
    background: rgba(23, 33, 68, .9);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
}
.sd-main-img-wrap.lupa-on .sd-zoom-lens,
.sd-main-img-wrap.lupa-on .sd-zoom-hint { opacity: 1; }
.sd-main-img-wrap.lupa-on { cursor: crosshair; }
/* En pantallas táctiles no hay lupa: el aviso invita a tocar */
@media (hover: none) {
    .sd-zoom-lens { display: none; }
    .sd-zoom-hint { opacity: .92; bottom: 12px; font-size: 10px; }
}
.sd-img-note {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    font-style: italic;
}

/* ── Info derecha ────────────────────────── */
.sd-info {
    flex: 1;
    min-width: 0;
}

/* Cabecera: nombre + código */
.sd-info__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}
.sd-info__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.3;
}
.sd-info__code {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
}
.sd-info__code strong {
    color: #8C6B2E;
    font-weight: 700;
}

/* Precios */
.sd-info__price-wrap { margin-bottom: 6px; }
.sd-price-old {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}
.sd-price-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #999;
    margin-right: 4px;
}
.sd-price-new {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #8C6B2E;
}
.sd-discount-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.sd-promo-badge {
    display: inline-block;
    background: #8C6B2E;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Separador */
.sd-divider {
    border: none;
    border-top: 1px solid #efefef;
    margin: 16px 0;
}

/* Colores */
.sd-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    letter-spacing: 1px;
    font-style: italic;
    margin-bottom: 10px;
    display: block;
}
.sd-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.sd-color-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    transition: border-color .2s, transform .15s;
    flex-shrink: 0;
}
.sd-color-dot:hover,
.sd-color-dot.active {
    border-color: #8C6B2E;
    transform: scale(1.1);
}

/* Botones talla */
.sd-size-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.sd-size-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid #ccc;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    border-radius: 3px;
    transition: background .15s, border-color .15s, color .15s;
}
.sd-size-btn:hover { border-color: #8C6B2E; color: #8C6B2E; }
.sd-size-btn.active,
.sd-size-btn.selected {
    background: #8C6B2E;
    border-color: #8C6B2E;
    color: #fff;
}
.sd-size-btn:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e0e0e0;
    text-decoration: line-through;
}

/* Botones asesores */
.sd-advisor-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.sd-btn-filled {
    padding: 10px 20px;
    background: #172144;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background .25s ease, box-shadow .25s ease;
}
.sd-btn-filled:hover { background: #8C6B2E; box-shadow: 0 4px 12px rgba(140, 107, 46, 0.35); }
.sd-btn-outline {
    padding: 10px 20px;
    background: #fff;
    color: #172144;
    border: 2px solid #172144;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.sd-btn-outline:hover { background: #8C6B2E; color: #fff; border-color: #8C6B2E; }

/* Cantidad */
.sd-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.sd-qty-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #333;
    min-width: 80px;
}
.sd-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}
.sd-qty-ctrl button {
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    color: #444;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-qty-ctrl button:hover { background: #e8e8e8; }
.sd-qty-ctrl span {
    width: 44px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    line-height: 36px;
}
/* En Laravel la cantidad es un <input>: mismo aspecto que el <span> de la plantilla */
.sd-qty-ctrl input[type="number"] {
    width: 44px;
    height: 36px;
    padding: 0;
    margin: 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    background: #fff;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
}
.sd-qty-ctrl input[type="number"]::-webkit-outer-spin-button,
.sd-qty-ctrl input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Botón Actualizar / Agregar */
.sd-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: #172144;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: background .25s ease, box-shadow .25s ease;
    margin-bottom: 20px;
}
.sd-add-btn:hover { background: #8C6B2E; box-shadow: 0 4px 14px rgba(140, 107, 46, 0.35); }
.sd-add-btn i { font-size: 16px; }

/* ── WhatsApp Advisor Card ───────────────── */
.sd-wa-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.sd-wa-card__header {
    background: #1a5c3a;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sd-wa-card__avatar {
    width: 44px;
    height: 44px;
    background: #e8b97a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.sd-wa-card__info { flex: 1; }
.sd-wa-card__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.sd-wa-card__role {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,.75);
}
.sd-wa-card__status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}
.sd-wa-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
}
.sd-wa-card__status span {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,.8);
}
.sd-wa-icon {
    width: 40px;
    height: 40px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}
.sd-wa-card__body {
    padding: 16px 18px 0;
}
.sd-wa-card__body h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.sd-wa-card__body p {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #666;
    margin: 0 0 14px;
    line-height: 1.5;
}
.sd-wa-btn-green {
    display: block;
    width: 100%;
    padding: 13px;
    background: #25d366;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}
.sd-wa-btn-green:hover { background: #1da851; color: #fff; text-decoration: none; }
.sd-wa-response {
    background: #e8f5e9;
    text-align: center;
    padding: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #2e7d32;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ── Tabs de descripción ─────────────────── */
.sd-tabs {
    margin-bottom: 50px;
}
.sd-tabs__nav {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    gap: 0;
}
.sd-tabs__btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.sd-tabs__btn.active,
.sd-tabs__btn:hover {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}
.sd-tab-panel { display: none; }
.sd-tab-panel.active { display: block; }

/* Tabla de detalles */
.sd-details-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}
.sd-details-table tr {
    border-bottom: 1px solid #f0f0f0;
}
.sd-details-table td {
    padding: 12px 16px;
    color: #444;
}
.sd-details-table td:first-child {
    font-weight: 600;
    color: #1a1a1a;
    width: 200px;
    background: #fafafa;
}

/* Descripción texto */
.sd-desc-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}
.sd-desc-text ul {
    padding-left: 20px;
    margin-top: 10px;
}
.sd-desc-text ul li { margin-bottom: 6px; }

/* Cambios y Devoluciones */
.sd-returns-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}
.sd-returns-text h5 {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 16px 0 8px;
}

/* ── Carrusel "Quizá también te guste" ───── */
.sd-related {
    margin: 10px 0 60px;
}
.sd-related__title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #8C6B2E;
    margin-bottom: 32px;
}

/* Card del carrusel */
.sd-rel-card {
    text-align: center;
    padding: 0 10px;
    cursor: pointer;
}
.sd-rel-card__img-wrap {
    background: #f5f5f5;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-rel-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.sd-rel-card:hover .sd-rel-card__img-wrap img {
    transform: scale(1.05);
}
.sd-rel-card__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 2px;
}
.sd-rel-card__brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 6px;
}
.sd-rel-card__prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.sd-rel-card__price-new {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #8C6B2E;
}
.sd-rel-card__price-old {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
}
.sd-rel-card__badge {
    display: inline-block;
    background: #8C6B2E;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Flechas de navegación */
.sd-related .owl-nav {
    position: absolute;
    top: 38%;
    width: 100%;
    left: 0;
    pointer-events: none;
}
.sd-related .owl-carousel { position: relative; }
.sd-related .owl-prev,
.sd-related .owl-next {
    position: absolute;
    top: 0;
    pointer-events: auto;
    width: 38px;
    height: 38px;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    color: #444 !important;
    transition: background .2s, color .2s;
}
.sd-related .owl-prev { left: -18px; }
.sd-related .owl-next { right: -18px; }
.sd-related .owl-prev:hover,
.sd-related .owl-next:hover {
    background: #8C6B2E !important;
    color: #fff !important;
    border-color: #8C6B2E !important;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 991px) {
    .sd-main { flex-direction: column; }
    .sd-gallery { width: 100%; }
    .sd-main-img-wrap { max-height: 72vh; }
    .sd-tabs__btn { padding: 12px 16px; }
}
@media (max-width: 575px) {
    .sd-gallery { flex-direction: column-reverse; }
    .sd-thumbs { flex-direction: row; width: 100%; }
    .sd-thumb { width: 56px; height: 64px; }
    .sd-gallery .modern-thumb-link { width: 60px; height: 74px; }
    .sd-info__header { flex-direction: column; gap: 4px; }
    .sd-advisor-btns { flex-direction: column; }

    /* Pestañas: se reparten el ancho y el texto baja de línea; si son muchas,
       se desplazan dentro de la barra en vez de ensanchar la página. */
    .sd-tabs__nav {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        /* El overflow recortaría la línea activa que baja sobre el borde: borde por dentro */
        border-bottom: 0;
        box-shadow: inset 0 -2px 0 #e0e0e0;
    }
    .sd-tabs__nav::-webkit-scrollbar { display: none; }
    .sd-tabs__btn {
        flex: 1 1 0;
        min-width: 88px;
        margin-bottom: 0;
        padding: 12px 6px;
        font-size: 10.5px;
        letter-spacing: 0.8px;
        line-height: 1.35;
        white-space: normal;
        text-align: center;
    }
}
