/* BC How to Style It — v1.9.0-hts3
   Cards visibles, grandes, modal para variaciones. */

.bc-hts-look { width: 100%; }
.bc-hts-look__title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: #1a1a1a;
}

/* ── Grid ── */
.bc-hts-grid {
    display: grid;
    grid-template-columns: repeat(var(--bc-hts-cols, 3), 1fr);
    gap: var(--bc-hts-gap, 16px);
    width: 100%;
}

/* ── Card ── */
.bc-hts-card {
    background: var(--bc-hts-card-bg, #fff);
    border: var(--bc-hts-card-border, 1px solid #eee);
    border-radius: var(--bc-hts-radius, 0);
    padding: var(--bc-hts-card-padding, 12px);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.bc-hts-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.bc-hts-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: var(--bc-hts-img-ratio, 3/4);
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 10px;
}
.bc-hts-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.bc-hts-card:hover .bc-hts-card__media img { transform: scale(1.04); }
.bc-hts-card__oos {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(0,0,0,.85);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 8px;
    z-index: 2;
}
.bc-hts-card__link { display: block; width: 100%; height: 100%; }
/* Wishlist wrapper — positioned over media. Uses native [bc_wishlist_btn] (.bcw-btn) styles from BC Wishlist plugin */
.bc-hts-card__wishlist-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s, transform .2s;
}
.bc-hts-card:hover .bc-hts-card__wishlist-wrap,
.bc-hts-card:focus-within .bc-hts-card__wishlist-wrap,
.bc-hts-card__wishlist-wrap:has(.bcw-btn.active) {
    opacity: 1;
    transform: translateY(0);
}
/* Always show if active (already in wishlist) */
.bc-hts-card__wishlist-wrap .bcw-btn.active {
    opacity: 1;
}
/* Fallback button (when BC Wishlist plugin is not active) */
.bc-hts-card__wishlist-fallback {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.95);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #1a1a1a; padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: color .2s;
}
.bc-hts-card__wishlist-fallback:hover { color: #C75E3D; }
.bc-hts-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bc-hts-card__name {
    font-size: var(--bc-hts-name-size, 13px);
    font-weight: var(--bc-hts-name-weight, 500);
    color: var(--bc-hts-name-color, #1a1a1a);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bc-hts-card__price {
    font-size: var(--bc-hts-price-size, 13px);
    color: var(--bc-hts-price-color, #888);
    font-weight: 500;
}
.bc-hts-card__price del { opacity: .55; margin-right: 6px; }
.bc-hts-card__price ins { text-decoration: none; color: #1a1a1a; }

/* Select-options button: oculto por defecto, aparece en hover.
   Si la card tiene .has-selection, queda visible (badge). */
.bc-hts-card__select-btn {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,.95);
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .2s, transform .2s, background .2s, color .2s;
    font-family: inherit;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
}
.bc-hts-card { position: relative; }
.bc-hts-card:hover .bc-hts-card__select-btn,
.bc-hts-card:focus-within .bc-hts-card__select-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.bc-hts-card__select-btn:hover { background: #1a1a1a; color: #fff; }

/* Badge "selected": siempre visible (no se oculta) */
.bc-hts-card.has-selection .bc-hts-card__select-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    background: var(--bc-hts-added-bg, #1a1a1a);
    border-color: var(--bc-hts-added-border, #1a1a1a);
    color: var(--bc-hts-added-text, #fff);
}

.bc-hts-card.needs-selection {
    outline: 2px solid var(--bc-hts-msg-error, #e53e3e);
    outline-offset: -2px;
    animation: bc-hts-pulse .4s ease;
}
@keyframes bc-hts-pulse { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-3px);} 75%{transform:translateX(3px);} }

.bc-hts-card__selected {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* ── Shop Together CTA wrap ── */
.bc-hts-cta-wrap { width: 100%; margin-top: 16px; }
.bc-hts-look .bcte-look-shop-the-look,
.bc-hts-cta-wrap .bcte-look-shop-the-look {
    width: 100%;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
}
.bcte-look-shop-the-look:hover {
    background: transparent;
    color: #C75E3D;
    border-color: #C75E3D;
}
.bcte-look-shop-the-look.bcte-btn-loading { opacity: .6; cursor: wait; }
.bcte-look-shop-the-look.bcte-btn-added {
    background: var(--bc-hts-added-bg, #1a1a1a);
    border-color: var(--bc-hts-added-border, #1a1a1a);
    color: var(--bc-hts-added-text, #fff);
}
.bcte-look-shop-msg {
    display: block;
    font-size: 12px;
    margin-top: 8px;
    min-height: 18px;
}
.bcte-look-shop-msg.success { color: var(--bc-hts-msg-success, #1a1a1a); }
.bcte-look-shop-msg.error   { color: var(--bc-hts-msg-error, #e53e3e); }

/* ── Total ── */
.bc-hts-total {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 14px;
    margin: 16px 0;
}
.bc-hts-total__label { color: #666; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.bc-hts-total__amount { font-size: 18px; font-weight: 600; color: #1a1a1a; }

/* ── Gallery — cloned from BC The Edit (.bcte-look-gallery) ── */
.bc-hts-gallery.bcte-look-gallery {
    position: relative;
    overflow: hidden;
    height: var(--bcte-ga-height, 520px);
    background-color: var(--bcte-ga-bg, #f5f0eb);
    background-image: var(--bcte-ga-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
}
.bcte-look-gallery-track {
    width: 100%;
    height: 100%;
    position: relative;
}
.bcte-look-gallery-slide {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: bc-hts-fade .35s ease;
}
.bcte-look-gallery-slide.visible { display: block; }
.bcte-look-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: var(--bcte-ga-fit, cover);
    object-position: var(--bcte-ga-pos, center top);
    display: block;
}

/* Arrows: hidden by default, revealed on hover */
.bcte-look-gallery-prev,
.bcte-look-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--bcte-ga-btn-size, 44px);
    height: var(--bcte-ga-btn-size, 44px);
    background: var(--bcte-ga-bg-btn, rgba(255,255,255,.9));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s, background .2s, transform .2s, color .2s;
    z-index: 5;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    color: #1a1a1a;
    padding: 0;
}
.bcte-look-gallery:hover .bcte-look-gallery-prev,
.bcte-look-gallery:hover .bcte-look-gallery-next,
.bcte-look-gallery:focus-within .bcte-look-gallery-prev,
.bcte-look-gallery:focus-within .bcte-look-gallery-next {
    opacity: 1;
}
.bcte-look-gallery-prev:hover,
.bcte-look-gallery-next:hover {
    transform: translateY(-50%) scale(1.08);
    color: #C75E3D;
}
.bcte-look-gallery-prev { left: 12px; }
.bcte-look-gallery-next { right: 12px; }
.bcte-look-gallery-prev svg,
.bcte-look-gallery-next svg { display: block; flex-shrink: 0; }

/* Counter (minimalist, BC style) */
.bcte-look-gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}
.bcte-look-gallery:hover .bcte-look-gallery-counter { opacity: 1; }

/* ────────── MODAL ────────── */
.bc-hts-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bc-hts-modal[hidden] { display: none !important; }
.bc-hts-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    animation: bc-hts-fade .25s ease;
}
@keyframes bc-hts-fade { from{opacity:0;} to{opacity:1;} }
.bc-hts-modal__panel {
    position: relative;
    background: #fff;
    width: min(440px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: bc-hts-slide .3s ease;
}
@keyframes bc-hts-slide { from{transform:translateY(20px);opacity:0;} to{transform:none;opacity:1;} }
.bc-hts-modal__close {
    position: absolute;
    top: 8px; right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color .2s;
}
.bc-hts-modal__close:hover { color: #C75E3D; }
.bc-hts-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}
.bc-hts-modal__thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    flex-shrink: 0;
}
.bc-hts-modal__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: .02em;
}
.bc-hts-modal__body { display: flex; flex-direction: column; gap: 16px; }

.bc-hts-var-group__label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .12em;
    display: block;
    margin-bottom: 8px;
}
.bc-hts-var-group__options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bc-hts-var-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
    color: #1a1a1a;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
}
.bc-hts-var-btn:hover { border-color: #1a1a1a; }
.bc-hts-var-btn.selected {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.bc-hts-var-btn.out-of-stock {
    opacity: .4;
    cursor: not-allowed;
    text-decoration: line-through;
}
.bc-hts-var-stock {
    font-size: 9px;
    color: #999;
}
.bc-hts-var-btn.selected .bc-hts-var-stock { color: rgba(255,255,255,.7); }

.bc-hts-modal__footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.bc-hts-modal__confirm {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.bc-hts-modal__confirm:disabled { opacity: .4; cursor: not-allowed; }
.bc-hts-modal__confirm:not(:disabled):hover {
    background: transparent;
    color: #C75E3D;
    border-color: #C75E3D;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .bc-hts-grid { grid-template-columns: repeat(2, 1fr); }
    .bc-hts-modal__panel { padding: 18px; }
}
@media (max-width: 480px) {
    .bc-hts-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
