/**
 * shop.css — Tienda / WooCommerce archive styles
 * Heptalume Child Theme
 */

/* ── Local aliases ── */
:root {
    --shop-card-bg:    var(--bg-1);
    --shop-card-bdr:   var(--border);
    --shop-hero-h:     260px;
    --shop-cols:       3;
    --shop-gap:        24px;
}

/* ============================================================
   SHOP HERO
   ============================================================ */
.shop-hero {
    position:     relative;
    min-height:   var(--shop-hero-h);
    display:      flex;
    flex-direction: column;
    justify-content: flex-end;
    padding:      80px 0 48px;
    background:   radial-gradient(ellipse 70% 60% at 50% 100%, rgba(200,151,106,.06) 0%, transparent 70%);
    border-bottom: 1px solid var(--border);
}

.shop-hero__inner {
    max-width:  1200px;
    margin:     0 auto;
    padding:    0 24px;
    width:      100%;
}

.shop-hero__breadcrumb {
    font:    400 11px/1 var(--ff-mono);
    color:   var(--text-2);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.shop-hero__breadcrumb a          { color: var(--text-2); text-decoration: none; }
.shop-hero__breadcrumb a:hover    { color: var(--gold); }
.shop-hero__breadcrumb .sep       { margin: 0 8px; opacity: .4; }

.shop-hero__title {
    font:          600 clamp(2rem,4vw,3rem)/1.1 var(--ff-heading);
    color:         var(--text);
    margin-bottom: 12px;
}

.shop-hero__title em {
    font-style: italic;
    color:       var(--gold);
}

.shop-hero__desc {
    font:    400 .95rem/1.6 var(--ff-body);
    color:   var(--text-2);
    max-width: 480px;
    margin-bottom: 28px;
}

/* Search bar */
.shop-search {
    display:   flex;
    gap:       0;
    max-width: 400px;
}

.shop-search__input {
    flex:             1;
    background:       var(--bg-1);
    border:           1px solid var(--border);
    border-right:     none;
    border-radius:    6px 0 0 6px;
    color:            var(--text);
    font:             400 .9rem var(--ff-body);
    padding:          10px 16px;
    outline:          none;
    transition:       border-color .2s;
}

.shop-search__input::placeholder     { color: var(--text-2); opacity: .6; }
.shop-search__input:focus            { border-color: var(--gold); }

.shop-search__btn {
    background:    var(--gold);
    border:        1px solid var(--gold);
    border-radius: 0 6px 6px 0;
    color:         var(--bg);
    cursor:        pointer;
    font:          500 .85rem var(--ff-body);
    padding:       10px 18px;
    transition:    background .2s;
    white-space:   nowrap;
}

.shop-search__btn:hover { background: var(--gold-l); }

/* ============================================================
   SHOP BODY
   ============================================================ */
.shop-body {
    max-width:  1200px;
    margin:     0 auto;
    padding:    48px 24px 80px;
}

/* ============================================================
   CATEGORY FILTER TABS
   ============================================================ */
.shop-filters {
    display:         flex;
    gap:             8px;
    flex-wrap:       wrap;
    margin-bottom:   36px;
    padding-bottom:  24px;
    border-bottom:   1px solid var(--border);
}

.shop-filter-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             6px;
    background:      transparent;
    border:          1px solid var(--border);
    border-radius:   100px;
    color:           var(--text-2);
    cursor:          pointer;
    font:            400 .82rem/1 var(--ff-mono);
    letter-spacing:  .04em;
    padding:         7px 16px;
    text-decoration: none;
    transition:      border-color .18s, color .18s, background .18s;
    white-space:     nowrap;
}

.shop-filter-btn:hover {
    border-color: rgba(200,151,106,.4);
    color:        var(--text);
}

.shop-filter-btn.active,
.shop-filter-btn[aria-current="true"] {
    background:   rgba(200,151,106,.12);
    border-color: var(--gold);
    color:        var(--gold);
}

.shop-filter-dot {
    width:        7px;
    height:       7px;
    border-radius: 50%;
    flex-shrink:  0;
}

/* ============================================================
   SHOP TOOLBAR — count + orderby
   ============================================================ */
.shop-toolbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             16px;
    margin-bottom:   28px;
    flex-wrap:       wrap;
}

.shop-result-count {
    font:        400 .82rem/1 var(--ff-mono);
    color:       var(--text-2);
    letter-spacing: .04em;
}

.woocommerce-ordering select,
.shop-orderby {
    appearance:    none;
    background:    var(--bg-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center no-repeat;
    border:        1px solid var(--border);
    border-radius: 6px;
    color:         var(--text);
    cursor:        pointer;
    font:          400 .82rem var(--ff-mono);
    padding:       8px 36px 8px 14px;
    outline:       none;
    transition:    border-color .18s;
}

.woocommerce-ordering select:focus,
.shop-orderby:focus { border-color: var(--gold); }

/* ============================================================
   WOOCOMMERCE NOTICES
   ============================================================ */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
    background:   var(--bg-1);
    border:       1px solid var(--border);
    border-left:  3px solid var(--gold);
    border-radius: 6px;
    color:        var(--text);
    font:         400 .9rem var(--ff-body);
    list-style:   none;
    margin:       0 0 24px;
    padding:      14px 18px;
}

.woocommerce-notices-wrapper .woocommerce-error {
    border-left-color: var(--c1);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.shop-grid,
ul.products.columns-3,
ul.products.columns-4 {
    display:               grid;
    grid-template-columns: repeat(var(--shop-cols), 1fr);
    gap:                   var(--shop-gap);
    list-style:            none;
    margin:                0;
    padding:               0;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
li.product,
.shop-product-card {
    background:    var(--shop-card-bg);
    border:        1px solid var(--shop-card-bdr);
    border-radius: 12px;
    overflow:      hidden;
    position:      relative;
    transition:    border-color .22s, transform .22s, box-shadow .22s;
}

li.product:hover,
.shop-product-card:hover {
    border-color:  rgba(200,151,106,.35);
    box-shadow:    0 8px 32px rgba(0,0,0,.35);
    transform:     translateY(-3px);
}

/* Thumbnail wrapper */
li.product .woocommerce-loop-product__link,
.shop-product-card__link {
    display:        block;
    text-decoration: none;
    color:          inherit;
}

li.product .attachment-woocommerce_thumbnail,
li.product img {
    aspect-ratio:  1 / 1;
    object-fit:    cover;
    width:         100%;
    display:       block;
    transition:    opacity .2s;
}

li.product:hover .attachment-woocommerce_thumbnail,
li.product:hover img {
    opacity: .9;
}

/* Placeholder image */
li.product .woocommerce-placeholder {
    aspect-ratio: 1 / 1;
    background:   var(--bg-2);
    display:      flex;
    align-items:  center;
    justify-content: center;
    font-size:    2.5rem;
}

/* Card body */
li.product .woocommerce-loop-product__link + *,
.product-card-body {
    padding: 16px 18px 18px;
}

/* Category label above title */
li.product .posted_in,
li.product .cat-links,
.product-card__cat {
    font:           400 .7rem/1 var(--ff-mono);
    color:          var(--gold);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom:  6px;
    display:        block;
}

li.product .woocommerce-loop-product__title,
.product-card__name {
    font:          500 1rem/1.3 var(--ff-body);
    color:         var(--text);
    margin:        0 0 10px;
    padding:       16px 18px 0;
}

/* Price */
li.product .price,
.product-card__price {
    font:        600 1.05rem/1 var(--ff-body);
    color:       var(--gold);
    padding:     0 18px;
    display:     block;
    margin-bottom: 16px;
}

li.product .price del,
li.product .price .woocommerce-Price-amount.amount:first-child:not(:last-child) {
    color:       var(--text-2);
    font-weight: 400;
    font-size:   .85em;
    margin-right: 6px;
}

li.product .price ins {
    text-decoration: none;
}

/* Add to cart button */
li.product .button,
li.product a.button,
li.product .add_to_cart_button {
    display:         block;
    margin:          0 18px 18px;
    padding:         10px 0;
    background:      transparent;
    border:          1px solid var(--border);
    border-radius:   6px;
    color:           var(--text-2);
    cursor:          pointer;
    font:            500 .82rem/1 var(--ff-mono);
    letter-spacing:  .06em;
    text-align:      center;
    text-decoration: none;
    text-transform:  uppercase;
    transition:      border-color .18s, color .18s, background .18s;
}

li.product .button:hover,
li.product a.button:hover,
li.product .add_to_cart_button:hover {
    background:   rgba(200,151,106,.1);
    border-color: var(--gold);
    color:        var(--gold);
}

li.product .added_to_cart {
    display:         block;
    margin:          4px 18px 18px;
    font:            400 .75rem var(--ff-mono);
    color:           var(--c4);
    text-align:      center;
    text-decoration: none;
    letter-spacing:  .04em;
}

/* Loading spinner on add-to-cart */
li.product .button.loading::after {
    border-color: var(--gold) transparent transparent;
}

/* ============================================================
   SALE BADGE
   ============================================================ */
li.product .onsale,
span.onsale {
    background:   var(--c1);
    border-radius: 4px;
    color:        var(--white);
    font:         600 .7rem/1 var(--ff-mono);
    letter-spacing: .06em;
    padding:      4px 8px;
    position:     absolute;
    top:          12px;
    left:         12px;
    text-transform: uppercase;
    z-index:      2;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.woocommerce-info.woocommerce-no-products-found,
.shop-empty {
    background:   var(--bg-1);
    border:       1px solid var(--border);
    border-radius: 12px;
    padding:      60px 40px;
    text-align:   center;
    color:        var(--text-2);
    grid-column:  1 / -1;
}

.shop-empty__icon {
    font-size:     3rem;
    margin-bottom: 16px;
    display:       block;
}

.shop-empty__title {
    font:          500 1.2rem/1.3 var(--ff-heading);
    color:         var(--text);
    margin-bottom: 8px;
}

.shop-empty__cta {
    display:         inline-flex;
    align-items:     center;
    gap:             6px;
    margin-top:      24px;
    padding:         10px 24px;
    background:      var(--gold);
    border-radius:   6px;
    color:           var(--bg);
    font:            500 .88rem var(--ff-mono);
    letter-spacing:  .04em;
    text-decoration: none;
    transition:      background .18s;
}

.shop-empty__cta:hover { background: var(--gold-l); }

/* ============================================================
   PAGINATION
   ============================================================ */
.woocommerce-pagination,
.shop-pagination {
    margin:      48px 0 0;
    display:     flex;
    justify-content: center;
    gap:         6px;
    flex-wrap:   wrap;
}

.woocommerce-pagination ul,
.shop-pagination ul {
    display:    flex;
    gap:        6px;
    list-style: none;
    margin:     0;
    padding:    0;
    flex-wrap:  wrap;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span,
.shop-pagination a,
.shop-pagination span {
    display:         flex;
    align-items:     center;
    justify-content: center;
    min-width:       36px;
    height:          36px;
    padding:         0 10px;
    background:      var(--bg-1);
    border:          1px solid var(--border);
    border-radius:   6px;
    color:           var(--text-2);
    font:            400 .82rem/1 var(--ff-mono);
    text-decoration: none;
    transition:      border-color .18s, color .18s;
}

.woocommerce-pagination ul li a:hover,
.shop-pagination a:hover {
    border-color: var(--gold);
    color:        var(--gold);
}

.woocommerce-pagination ul li span.current,
.shop-pagination .current {
    background:   rgba(200,151,106,.12);
    border-color: var(--gold);
    color:        var(--gold);
}

/* ============================================================
   PRODUCT CATEGORY ARCHIVE — hero adjustment
   ============================================================ */
.term-description {
    font:        400 .9rem/1.6 var(--ff-body);
    color:       var(--text-2);
    margin:      0 0 28px;
    max-width:   540px;
}

/* ============================================================
   SUBCATEGORY THUMBNAILS (shown on main shop page)
   ============================================================ */
ul.product-categories li.cat-item {
    background:    var(--bg-1);
    border:        1px solid var(--border);
    border-radius: 10px;
    overflow:      hidden;
    transition:    border-color .22s, transform .22s;
}

ul.product-categories li.cat-item:hover {
    border-color: rgba(200,151,106,.35);
    transform:    translateY(-2px);
}

ul.product-categories li.cat-item a {
    color:          var(--text);
    text-decoration: none;
    font:           500 .95rem var(--ff-body);
}

ul.product-categories .count {
    color:       var(--text-2);
    font:        400 .8rem var(--ff-mono);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    :root { --shop-cols: 3; --shop-gap: 18px; }
}

@media (max-width: 860px) {
    :root { --shop-cols: 2; }

    .shop-hero { padding: 60px 0 36px; }
    .shop-body { padding: 32px 16px 60px; }
}

@media (max-width: 600px) {
    :root { --shop-cols: 1; --shop-gap: 14px; }

    .shop-filters { gap: 6px; }
    .shop-filter-btn { font-size: .75rem; padding: 6px 12px; }

    .shop-hero__title { font-size: 1.8rem; }
    .shop-toolbar { flex-direction: column; align-items: flex-start; }

    .shop-search { max-width: 100%; }

    li.product .woocommerce-loop-product__title,
    .product-card__name { font-size: .95rem; }
}

/* ============================================================
   CONTENT-PRODUCT OVERRIDE — .hep-product-card
   Tarjeta premium para woocommerce/content-product.php
   Hover dorado: solo CSS box-shadow + gradient, sin JS
   ============================================================ */
@keyframes hepGoldPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(200,151,106,0.22),
            0 0 16px rgba(200,151,106,0.10),
            0 6px 28px rgba(0,0,0,0.4);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(200,151,106,0.48),
            0 0 32px rgba(200,151,106,0.24),
            0 10px 40px rgba(0,0,0,0.48);
    }
}

li.hep-product-card {
    background:    var(--bg-1);
    border:        1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow:      hidden;
    position:      relative;
    transition:    border-color 0.3s ease, transform 0.3s ease;
    list-style:    none;
}

/* Línea superior dorada — solo CSS */
li.hep-product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,151,106,0.55), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

li.hep-product-card:hover {
    border-color: rgba(200,151,106,0.4);
    transform: translateY(-4px);
    animation: hepGoldPulse 2.4s ease-in-out infinite;
}

li.hep-product-card:hover::before { opacity: 1; }

/* Link wrapper */
.hep-card-link {
    display:         flex;
    flex-direction:  column;
    height:          100%;
    text-decoration: none;
    color:           inherit;
}

/* Badges */
.hep-card-badges {
    position: absolute;
    top: 12px; left: 12px;
    display: flex; gap: 6px;
    z-index: 3;
    pointer-events: none;
}

.hep-badge {
    font-family:    var(--font-mono);
    font-size:      8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding:        4px 9px;
    border-radius:  var(--radius-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hep-badge--sale {
    background: rgba(255,60,60,0.85);
    color: #fff;
}

.hep-badge--new {
    background: rgba(200,151,106,0.9);
    color: var(--bg);
}

/* Thumbnail */
.hep-card-thumb {
    aspect-ratio:  1 / 1;
    overflow:      hidden;
    background:    var(--bg-2);
    position:      relative;
}

.hep-card-thumb .hep-card-img,
.hep-card-thumb img {
    width:         100%;
    height:        100%;
    object-fit:    cover;
    display:       block;
    transition:    transform 0.6s ease;
}

li.hep-product-card:hover .hep-card-img,
li.hep-product-card:hover .hep-card-thumb img {
    transform: scale(1.06);
}

/* Glow overlay en hover — sin JS, pseudo-elemento */
.hep-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(200,151,106,0.1), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
li.hep-product-card:hover .hep-card-glow { opacity: 1; }

/* Card body */
.hep-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.hep-card-cat {
    font-family:    var(--font-mono);
    font-size:      8px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color:          var(--gold);
    display:        block;
}

.hep-card-name {
    font-family: var(--font-heading);
    font-size:   1.05rem;
    font-weight: 400;
    color:       var(--white);
    line-height: 1.22;
    margin:      0;
    flex:        1;
    letter-spacing: -0.01em;
}

.hep-card-price {
    font-family: var(--font-heading);
    font-style:  italic;
    font-size:   1.2rem;
    font-weight: 300;
    color:       var(--gold);
    margin-top:  4px;
}
.hep-card-price .price    { color: var(--gold); font-style: italic; }
.hep-card-price del       { color: var(--text-2); font-size: 0.82em; margin-right: 6px; }
.hep-card-price ins       { text-decoration: none; }

/* Star rating */
.hep-card-rating .star-rating {
    font-size:  0.7rem;
    color:      var(--gold);
}

/* Footer */
.hep-card-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Add to cart / View button */
.hep-card-btn,
li.hep-product-card .button,
li.hep-product-card a.button {
    display:         block;
    width:           100%;
    padding:         10px;
    background:      transparent;
    border:          1px solid var(--border);
    border-radius:   var(--radius-sm);
    color:           var(--text-2);
    cursor:          pointer;
    font-family:     var(--font-mono);
    font-size:       9px;
    letter-spacing:  0.14em;
    text-align:      center;
    text-decoration: none;
    text-transform:  uppercase;
    transition:      border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.hep-card-btn:hover,
li.hep-product-card .button:hover,
li.hep-product-card a.button:hover {
    border-color: var(--gold);
    color:        var(--gold);
    background:   rgba(200,151,106,0.06);
}

.hep-card-btn--view {
    border-color: rgba(255,255,255,0.1);
}
