/* Trofeos Economicos — product-list "Ver" button styled like the original site:
   orange outline + cart icon + "Ver detalles". Targets only the View link
   (an <a>, not the add-to-cart <button>), so simple products keep their button. */
.product-add-cart a.btn-product-list {
    color: #ff7d23 !important;
    border: 1px solid #e3e3e3 !important; /* subtle border; orange text/icon + orange on hover */
    font-size: 0; /* hide the default "Ver" text node; real text comes from ::after */
}
.product-add-cart a.btn-product-list:hover,
.product-add-cart a.btn-product-list:focus {
    background-color: #ff7d23 !important;
    color: #fff !important;
    border-color: #ff7d23 !important;
}
.product-add-cart a.btn-product-list::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f07a"; /* fa-shopping-cart */
    font-size: .95rem;
    margin-right: .45rem;
}
.product-add-cart a.btn-product-list::after {
    content: "Ver detalles";
    font-size: .95rem;
}

/* "Filtrar por deporte" dropdown (injected by deporte.js on listing pages). */
.ecodeporte-filter { margin: 0 0 1rem; }
.ecodeporte-filter select {
    width: 100%;
    max-width: 320px;
    border: 1px solid #ff7d23;
    border-radius: 4px;
    padding: .4rem .6rem;
    color: #585451;
    background-color: #fff;
    cursor: pointer;
}

/* Widen the product sort-order dropdown so the full label is visible (was truncated). */
.products-sort-order { width: auto !important; }
.products-sort-order .select-title { width: auto !important; min-width: 240px; white-space: nowrap; }
.products-sort-order .select-title-name { overflow: visible !important; text-overflow: clip !important; max-width: none !important; }

/* an_productfields price label sits in a flex label, so the HTML space collapses; add a gap. */
.label-price { margin-left: .3em; }

/* Listing/carousel: when a product's DEFAULT combination is out of stock but other
   combinations have stock, PrestaShop shows a "Fuera de stock" availability badge on the
   card (grid adds 'product-combination-only-unavailable'; list only 'product-unavailable').
   The product IS buyable in other sizes, so hide that badge in listings. Scoped to
   .product-miniature so the product page's own availability badge is untouched. Fully-out-of
   -stock products are already hidden from listings by this module (visibility=none), so this
   only ever suppresses the "some sizes available" case. */
.product-combination-only-unavailable,
.product-miniature .product-unavailable { display: none !important; }

/* "Volver al listado" button on the product page (injected by backtolist.js).
   The arrow is a Unicode char in the link text; color forced with !important
   because the Warehouse theme overrides link color with higher-specificity rules. */
.eco-back-to-list-wrap { margin-top: 1.5rem; }
.eco-back-to-list {
    display: inline-flex;
    align-items: center;
    margin: 0 0 .3rem;
    padding: .55rem 1.1rem;
    border: 1px solid #ff7d23;
    border-radius: 4px;
    color: #fff !important;
    background: #ff7d23 !important;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(255, 125, 35, .35);
    transition: background-color .15s ease, box-shadow .15s ease;
}
.eco-back-to-list:hover,
.eco-back-to-list:focus {
    background: #e86d16 !important;
    box-shadow: 0 3px 10px rgba(255, 125, 35, .5);
    color: #fff !important;
}

/* Product-card options line + "Desde" price (listings) */
.eco-card-opts { font-size: .82rem; line-height: 1.3; margin: .15rem 0 .1rem; }
.eco-card-opts-n { font-weight: 600; }
.eco-desde { font-size: .7em; font-weight: 400; margin-right: .15em; }

/* Cart page (desktop): keep the summary card — totals + checkout button — visible while the
   product list scrolls. The .cart-grid row is flex and stretches .cart-grid-right to the full
   row height, so the card has room to travel. max-height + auto scroll keeps very tall summaries
   (many engraving lines) fully reachable instead of overflowing off-screen. */
/* Note: the theme makes <body> the scroll container (height:100% plus the overflow-y:auto implied
   by its overflow-x:hidden). position:sticky works inside a scrolling ancestor, so we deliberately
   do NOT override the body overflow — that would move the page's scrollport and could upset the
   theme's scroll JS (header, back-to-top, lazy load). */
@media (min-width: 992px) {
    /* --eco-cart-sticky-top is published by carttotals3.js = height of the theme's fixed header
       (.sticky-desktop-wrapper) + 16px, so the card never slides under it. The fallback matches
       the current desktop-header-style-8 height (170px + 16). */
    .cart-grid-right .cart-summary {
        position: sticky;
        top: var(--eco-cart-sticky-top, 186px);
        max-height: calc(100vh - var(--eco-cart-sticky-top, 186px) - 1rem);
        overflow-y: auto;
    }
}
