/* Global product card — shared by the category listing (product-list.tpl, grid and list modes)
   and the weproducttabs carousel. Migrated from modules/weproducttabs/views/css/weproducttabs.css
   (that file keeps only what's specific to the carousel/tabs chrome) plus new rules for the
   badge/extra-discount pieces extracted from product-list.tpl.

   Palette (exact values from the design spec, do not approximate):
   brand blue rgb(28,146,219) · secondary accent blue rgb(30,157,224) (discount-strip border,
   hover glow) · near-black #1d1e20 · body grey #3f4247 / #6b7280 · muted grey (old price)
   #9ca3af · border grey #e4eaf1 · teal (discount badge / "Fabricado en EU") #009499 ·
   green (in stock) #1d9649 · placeholder bg #e9f2fb.

   Font: the mockup references Archivo/Roboto, neither is loaded anywhere in this theme
   (confirmed via grep; theme default is 'Helvetica Neue', Helvetica, Arial, sans-serif) —
   not loading a new webfont here. Only weight/size/color values from the spec are preserved. */

.product-card {
    position: relative;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e4eaf1;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px -16px rgba(30, 157, 224, .32);
}

.product-card .pc-top {
    padding: 12px 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-card .pc-meta {
    padding: 0 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-card .pc-badge {
    align-self: flex-start;
    background: #009499;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    line-height: 18px;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}
.product-card .pc-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.25;
    /* Reserves the full 3-line height even for short titles, so cards with different
       title lengths still end up the same height within a row. */
    min-height: calc(1.25em * 3);
    color: #1d1e20;
    text-decoration: none;
}
.product-card .pc-title:hover,
.product-card .pc-title:focus {
    color: #1d1e20;
    text-decoration: underline;
}
.product-card .pc-brand {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7280;
}
.product-card .pc-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.product-card .pc-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #3f4247;
}
.product-card .pc-stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: #1d9649;
    flex: 0 0 auto;
}
.product-card .pc-stock-dot--pending,
.product-card .pc-stock-dot--out { background: #9ca3af; }
.product-card .pc-badge-new {
    display: inline-flex;
    align-items: center;
    background: rgba(29, 150, 73, .12);
    color: #1d9649;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}

.product-card .pc-discount-row {
    height: 28px;
    display: flex;
    align-items: center;
}
.product-card .pc-discount {
    font-weight: 600;
    font-size: 18px;
    color: #009499;
}

.product-card .pc-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #fff;
}
.product-card .pc-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.product-card .pc-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e9f2fb;
    color: rgb(28, 146, 219);
}
.product-card .pc-view360 {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e4eaf1;
    color: rgb(28, 146, 219);
}
.product-card--list .pc-view360,
#view_way.list_view .product-card .pc-view360 {
    /* The product page itself already offers the 360° view — redundant on a small list thumb. */
    display: none;
}

.product-card .pc-desc {
    display: none;
}

.product-card .pc-bottom {
    margin-top: auto;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* The quantitydiscountpro "de dto adicional" pill always before the price/CTA —
   regardless of DOM order, so it's consistent across cards/hook configs. */
.product-card .pc-bottom .displayQuantityDiscountProCustom3 {
    order: 1;
}
.product-card .pc-bottom .right_block {
    order: 2;
}

/* ---- Restyle product-price-cta.tpl's own markup (shared, unmodified logic) ----
   This is the SAME .right_block/.content_price/.price/.old_price/button markup
   product-list.tpl already renders — only CSS changes here, no template duplication.
   These rules were previously scoped to `.we-product-tabs-set .wpt-card` (weproducttabs'
   own stylesheet); moved here unscoped-to-module so both consumers share them. */
.product-card .right_block {
    padding-top: 0;
    width: 100%;
}
.product-card .right_block .clearfix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.product-card .content_price { padding: 0; }
.product-card .content_price .inner { padding-top: 0; }
.product-card .content_price.more_info { border: 0; background: none; }
.product-card .price {
    color: #1d1e20;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.2;
}
.product-card .has_old_price .price { color: #1d1e20; }
.product-card .old_price {
    text-decoration: line-through;
    font-size: 13px;
    line-height: 1.2;
    color: #9ca3af;
}

/* CTA pill — restyles the real .btn-warning/.btn-default/.btn-info buttons/links
   product-price-cta.tpl already renders, without touching their functional classes
   (ajax_add_to_cart_button, rel="ajax_id_product_..."). */
.product-card .ajax_add_to_cart_button,
.product-card .right_block a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 10px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    margin: 0 0 0 auto;
}
.product-card .btn-warning {
    background: #ffb400;
    border: 1px solid #ffb400;
    color: #fff;
}
.product-card .btn-warning:hover,
.product-card .btn-warning:focus {
    background: #ffc740;
    border-color: #ffc740;
    color: #fff;
}
.product-card .btn-default,
.product-card .btn-info {
    background: #fff;
    border: 1px solid rgb(28, 146, 219);
    color: rgb(28, 146, 219);
}
.product-card .btn-default:hover,
.product-card .btn-default:focus,
.product-card .btn-info:hover,
.product-card .btn-info:focus {
    background: rgb(28, 146, 219);
    color: #fff;
}

/* ---- List mode (same markup, CSS-only rearrange). Two ways in: an explicit
   `.product-card--list` modifier class (card_mode='list'), or category's existing
   #view_way.list_view ancestor toggle (category.tpl:102) — no card_mode param needed there,
   the same JS/cookie switch that already exists just re-skins the same card.
   Badge+title full width on top, description full width underneath (hidden on mobile), then
   a final compact row — image | brand/stock/discount | price+CTA — at the bottom. Same layout
   at every width (mobile and desktop), only the image size and description visibility change
   by breakpoint. ---- */
.product-card--list,
#view_way.list_view .product-card {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    grid-template-areas:
        "top   top  top"
        "desc  desc desc"
        "image meta bottom";
    align-items: center;
    column-gap: 12px;
}
.product-card--list .pc-top,
#view_way.list_view .product-card .pc-top {
    grid-area: top;
    padding: 16px 16px 4px;
}
.product-card--list .pc-title,
#view_way.list_view .product-card .pc-title {
    /* List mode's text column is much wider than grid's, so the title almost always fits
       on one line — no need to reserve the 3-line height grid mode needs. */
    -webkit-line-clamp: 2;
    min-height: 0;
}
.product-card--list .pc-desc,
#view_way.list_view .product-card .pc-desc {
    grid-area: desc;
    display: block;
    padding: 0 16px 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}
@media (max-width: 767px) {
    .product-card--list .pc-desc,
    #view_way.list_view .product-card .pc-desc {
        display: none;
    }
}
.product-card--list .pc-image,
#view_way.list_view .product-card .pc-image {
    grid-area: image;
    height: 90px;
    margin: 12px 0 16px 16px;
    border-radius: 12px;
    overflow: hidden;
}
@media (min-width: 768px) {
    .product-card--list .pc-image,
    #view_way.list_view .product-card .pc-image {
        height: 160px;
    }
}
.product-card--list .pc-meta,
#view_way.list_view .product-card .pc-meta {
    grid-area: meta;
    padding: 12px 0 16px;
}
.product-card--list .pc-bottom,
#view_way.list_view .product-card .pc-bottom {
    grid-area: bottom;
    margin-top: 0;
    padding: 12px 16px 16px;
    /* The approved design separates price/CTA from the brand/stock info with a vertical rule. */
    border-left: 1px solid #e4eaf1;
}
