/* POLISH_V1 (Opus, 2026-10-15): one card, one button shape, one heading scale, native pages in the 2.0 system.
   Loaded last, outside checkout. Audit: docs/modules/prestashop/2_0/audit/UI_CONSISTENCY_AUDIT_20261015.md */
:root{--bjm-brand:#7828c8;--bjm-brand-ink:#5a1d99;--bjm-brand-wash:#f4eefc;--bjm-ink:#232323;--bjm-muted:#625b6b;--bjm-line:#e2dfe7;--bjm-soft:#f8f6fb}

/* ---------- A1/A2 · Product card: everything left, badges on one line, price never orphaned ---------- */
/* The same card outside home/listing/product (cart «Te puede interesar», favourites). */
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .thumbnail-container{width:100%!important;height:auto!important;margin:0!important;background:#fff;box-shadow:none}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .thumbnail-top{width:100%!important;height:auto!important;aspect-ratio:1/1;overflow:hidden;background:#fff}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-thumbnail{display:block;width:100%;height:100%}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-thumbnail img{width:100%!important;height:100%!important;object-fit:contain}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badges{position:static!important;display:flex}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-description{padding:0!important;position:static!important;width:100%!important;height:auto!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;text-align:left!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-title{margin:8px 0!important;height:44px!important;text-align:left!important;text-transform:none!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-title a{padding:0!important;margin:0!important;color:var(--bjm-ink)!important;font-size:16px!important;font-weight:600;line-height:1.35;text-align:left!important;text-transform:none!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card :is(.price,.bjm-card-from-price){color:var(--bjm-ink)!important;font-size:18px;font-weight:800}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badges{flex-wrap:nowrap!important;overflow:hidden;min-height:0!important;padding-top:8px!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badges .bjm-hdr-lot-badge{font-size:13px!important;line-height:1.2;padding:3px 8px;white-space:nowrap;flex:none}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badges .bjm-hdr-lot-badge svg{width:14px;height:14px}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-price-and-shipping{justify-content:flex-start!important;text-align:left!important;display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;column-gap:5px!important;row-gap:0!important;min-height:0!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .regular-price{flex-basis:100%;font-size:13px!important;line-height:1.3;margin:0!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-sale-unit{font-weight:400!important;color:var(--bjm-muted)!important;font-size:14px!important;white-space:nowrap;padding:0!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-mode{justify-content:flex-start!important;font-size:14px!important;margin:6px 0 0!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-details{min-height:0!important}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-minimum{font-size:14px!important;margin:2px 0 0!important;color:var(--bjm-muted)}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-state{display:none!important}
/* Sold out says it once: the «Agotado» badge. No purchase mode on a lot nobody can buy. */
#wrapper:not(#bjm-p) .product-miniature.bm-product-out-of-stock-card .bjm-list-mode{display:none!important}
#wrapper:not(#bjm-p) .product-miniature.bm-product-out-of-stock-card .product-thumbnail img{opacity:.55}
#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badge[data-badge-kind=stock]{background:#f1eff4!important;color:var(--bjm-ink)!important;border-color:#d9d5df!important}
/* Recommendations never offer what is sold out (cart «destacados», product «más lotes»). */
:is(#cart .featured-products,body#product .bm-reco-section) .js-product:has(.bm-product-out-of-stock-card){display:none!important}
#cart .featured-products .products-section-title{text-transform:none!important;text-align:left;font-size:22px;font-weight:800;margin:28px 0 14px}
@media(max-width:767px){
 #wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-badges .bjm-hdr-lot-badge{font-size:12px!important;padding:2px 6px}
 #wrapper:not(#bjm-p) .product-miniature.bjm-list-card .price,#wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-card-from-price{font-size:16px!important}
 #wrapper:not(#bjm-p) .product-miniature.bjm-list-card .bjm-list-sale-unit{font-size:13px!important}
 #wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-title a{font-size:15px!important}
 #wrapper:not(#bjm-p) .product-miniature.bjm-list-card .product-title{height:41px!important}
 .bjm-home[data-native-ssr=true] .bjm-list-card .product-price-and-shipping{min-height:0!important}
}

/* ---------- A3 · Buttons: pill for actions, 12px for boxes; never uppercase ---------- */
#wrapper :is(.btn-primary,.btn-secondary,.btn-tertiary,.btn-outline-primary){border-radius:999px!important;text-transform:none!important;font-weight:800!important;min-height:46px;padding:10px 22px;box-shadow:none!important;letter-spacing:0}
#wrapper .btn-primary:not(.disabled):not(:disabled){background:var(--bjm-brand)!important;border-color:var(--bjm-brand)!important;color:#fff!important}
#wrapper .btn-primary:not(.disabled):not(:disabled):hover{background:var(--bjm-brand-ink)!important}
#wrapper .btn-primary:is(.disabled,:disabled){background:#e9e6ee!important;border-color:#e9e6ee!important;color:var(--bjm-muted)!important;opacity:1}
:is(#bjm-how-to-buy,.bjm-safe) :is(a,button):is([class*=btn],[class*=cta]){border-radius:999px!important}
body#product .bjmf-follow,body#product .bjm-trust-ask,body#product .bjm-trust-contact button,.bjmf-account .bjmf-follow{border-radius:999px!important}

/* ---------- A4 · One heading scale (guides keep their hero size) ---------- */
#wrapper .page-header h1,#wrapper #js-product-list-header h1,#wrapper .cart-container h1,#wrapper #main>h1,#wrapper .bjmf-account h1{font-size:28px!important;line-height:1.25;font-weight:800!important;text-transform:none!important;letter-spacing:0;margin:0 0 16px}
body#product .product-container .h1{font-size:26px!important;font-weight:800!important}
.bjm-home-block-head h2,.bjm-home-families h2,body#product :is(.bjm-product-context h2,.bm-reco-section>h2){font-size:22px!important;font-weight:800!important;text-transform:none!important}
@media(max-width:767px){#wrapper .page-header h1,#wrapper #js-product-list-header h1,#wrapper .cart-container h1,#wrapper #main>h1{font-size:24px!important}}

/* ---------- C1–C3 · Listing controls ---------- */
body:is(#category,#search).bjm-list-page #subcategories .bm-subcategories-grid{justify-content:flex-start!important;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);padding-right:40px!important}
body:is(#category,#search).bjm-list-page #subcategories .bm-subcategory-link{min-height:40px!important;padding:8px 14px!important;font-size:15px!important;font-weight:700!important;background:#fff}
body:is(#category,#search).bjm-list-page #subcategories .bm-subcategory-link:hover{border-color:var(--bjm-brand);color:var(--bjm-brand)}
body:is(#category,#search).bjm-list-page #js-product-list-header .block-category{display:block}
body:is(#category,#search).bjm-list-page .bjm-volume-hero{gap:22px}
body:is(#category,#search).bjm-list-page #category-description a{color:var(--bjm-brand)!important}
body:is(#category,#search).bjm-list-page .products-sort-order .select-title{border-radius:999px!important;padding:8px 16px!important;font-weight:700;display:inline-flex;align-items:center;gap:6px}
body:is(#category,#search).bjm-list-page .products-sort-order .select-title::before{content:attr(data-bjm-prefix)}
#wrapper .pagination{background:transparent!important;box-shadow:none!important;padding:16px 0!important;display:flex;align-items:center}
#wrapper .pagination .page-list{background:transparent!important;box-shadow:none!important;padding:0!important;margin:0 auto!important;display:flex;gap:6px;align-items:center;justify-content:center}
#wrapper .pagination .page-list li a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--bjm-line);border-radius:999px;color:var(--bjm-ink);font-weight:700;background:#fff;font-size:15px}
#wrapper .pagination .page-list li.current a{background:var(--bjm-brand);border-color:var(--bjm-brand);color:#fff;font-size:15px}
#wrapper .pagination .page-list li:not(.current) a.disabled,#wrapper .pagination .page-list li .spacer{border:0;background:transparent}
#wrapper .pagination>div:first-child{color:var(--bjm-muted);font-size:14px}
@media(max-width:900px){
 .bjm-vf{padding:6px!important;gap:6px!important;border-radius:999px!important}
 .bjm-vf .bjm-vf-chip{min-height:40px}
 .bjm-vf .bjm-vf-link{padding:0 10px!important;gap:5px!important;min-height:40px;font-size:14px}
 .bjm-vf .bjm-vf-link svg{width:16px;height:16px}
 .bjm-vf .bjm-vf-count{font-size:12px}
}
@media(max-width:480px){.bjm-vf .bjm-vf-chip .bjm-vf-link svg{display:none!important}.bjm-vf{gap:4px!important}.bjm-vf .bjm-vf-link{padding:0 9px!important}}
@media(max-width:767px){
 #wrapper .pagination{flex-direction:column;gap:6px}
 #wrapper .pagination .page-list li a{min-width:40px;min-height:40px}
}

/* ---------- B · Product page ---------- */
body#product #wrapper:not(#bjm-p) .product-flags,body#product .product-cover .bm-product-out-of-stock-overlay,body#product .delivery-information,body#product [id^=product-description-short]{display:none!important}
/* Gallery fills its column and stays in view while the buy column scrolls. */
@media(min-width:768px){body#product .product-container #content.page-content{max-width:none!important;margin:0!important;position:sticky;top:16px}}
body#product .product-cover img{max-height:560px;width:100%}
body#product .bjm-trust-expect{border-radius:12px!important;margin-top:18px!important}
body#product .bjm-product-facts,body#product .product-add-to-cart{border-radius:12px!important;background:#fff!important;border:1px solid var(--bjm-line)!important}
body#product .bjm-journey-quote{background:var(--bjm-soft)!important;border-color:var(--bjm-line)!important}
body#product .bjm-trust-safe-link{text-decoration:none!important;font-weight:700;color:var(--bjm-brand)!important}
body#product [data-button-action=add-to-cart] .material-icons{display:none}
body#product [data-button-action=add-to-cart]:not(.bm-btn-out-of-stock)::before{content:'';width:20px;height:20px;margin-right:8px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6'/%3E%3Ccircle cx='10' cy='20' r='1.3'/%3E%3Ccircle cx='17' cy='20' r='1.3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6'/%3E%3Ccircle cx='10' cy='20' r='1.3'/%3E%3Ccircle cx='17' cy='20' r='1.3'/%3E%3C/svg%3E") center/contain no-repeat;display:inline-block;vertical-align:-4px}
/* Sold out: one calm notice + the disabled button; no red, no quotation offer. */
body#product .bm-oos-alert{background:#f1eff4!important;border:1px solid #d9d5df!important;border-left-width:1px!important;border-radius:12px!important;color:var(--bjm-ink)!important;padding:12px 14px!important}
body#product .bm-oos-alert .bm-oos-icon{display:none!important}
body#product .bm-oos-alert-title{color:var(--bjm-ink)!important;font-weight:800}
body#product .bm-oos-alert-body{color:var(--bjm-muted)!important}
body#product:has(.bm-btn-out-of-stock) #product-availability,body#product:has(.bm-btn-out-of-stock) .bjm-product-buy-guide,body#product:has(.bm-btn-out-of-stock) .bjm-product-data .bjm-list-mode,body#product:has(.bm-btn-out-of-stock) .product-add-to-cart .control-label,body#product:has(.bm-btn-out-of-stock) .product-add-to-cart .qty{display:none!important}
body#product .product-quantity .add{flex:1}
body#product #wrapper:not(#bjm-p) .bm-btn-out-of-stock{background:#f1eff4!important;color:var(--bjm-muted)!important;border:1px solid #d9d5df!important;opacity:1}
body#product .bjm-product-description .product-description a{color:var(--bjm-brand)}
body#product .bm-reco-section{margin-top:28px}
body#product .bm-reco-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
body#product .bm-reco-head h2{margin:0}
body#product .bm-reco-head a{color:var(--bjm-brand);font-weight:700}
body#product .bjm-after-buy{display:grid;gap:14px;margin-top:16px}
body#product .bjm-after-buy .bjm-trust-expect{margin-top:0!important}
body#product .bjm-after-buy .bjmf-save{justify-self:start}
@media(max-width:767px){
 body#product .bjm-journey-price-line,body#product .product-add-to-cart .bjm-qty-summary{font-size:14px}
}

/* ---------- A8 · One floating contact: the chat. WhatsApp stays in the top bar and the footer. ---------- */
a.whatsappchat-anchor:has(.whatsapp-badge),.whatsapp-badge.bjm-journey-whatsapp{display:none!important}

/* ---------- D · Mobile menu ---------- */
.bjm-hdr-drawer-extra{display:none}
@media(max-width:1023px){.bjm-hdr-drawer-open .bjm-hdr-drawer-extra{display:grid;padding:8px 0;border-top:1px solid var(--bjm-line)}.bjm-hdr-drawer-extra a{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 16px 0 48px;font-size:16px;font-weight:600;color:var(--bjm-ink)}}
@media(max-width:1023px){
 #header .bjm-hdr-category-toggle,#header .bjm-hdr-category-link,.bjm-hdr-drawer-head>span{text-transform:none!important}
 #header .bjm-hdr-category-toggle,#header .bjm-hdr-category-link{background:#fff!important;border-bottom:0!important}
 .bjm-hdr-drawer-head>span{font-size:18px;font-weight:800}
}
body#index #wrapper .breadcrumb{display:none!important}

/* ---------- F1 · Native pages: login, register, cart, search, 404, account ---------- */
body:is(#authentication,#registration,#password,#cart,#pagenotfound,#search,#my-account,#identity,#addresses,#address,#history,#order-slip,#discount,#module-bjmfavorites-account) :is(main,#wrapper){background:var(--bjm-soft)}
#wrapper .page-content.card,#wrapper .card.cart-container,#wrapper .card.cart-summary,#wrapper .page-content.page-not-found{border:1px solid var(--bjm-line)!important;border-radius:16px!important;box-shadow:none!important;background:#fff}
body:is(#authentication,#password) #wrapper .page-content.card{max-width:520px;margin:0 auto;padding:28px!important}
body:is(#authentication,#password,#registration) #main .page-header{max-width:520px;margin:0 auto}
body#registration #main .page-header{max-width:none}
#wrapper .form-control,#wrapper select.form-control,#wrapper .custom-select{border:1px solid #cfcad6!important;border-radius:10px!important;background:#fff!important;min-height:46px;font-size:16px;color:var(--bjm-ink);box-shadow:none!important}
#wrapper .form-control:focus{border-color:var(--bjm-brand)!important;outline:3px solid rgba(120,40,200,.18)!important;outline-offset:0}
#wrapper .input-group .form-control{border-radius:10px 0 0 10px!important}
#wrapper .input-group-btn>.btn{border-radius:0 10px 10px 0!important;min-height:46px;background:#fff!important;color:var(--bjm-brand)!important;border:1px solid #cfcad6!important;border-left:0!important;font-size:14px;font-weight:700;text-transform:none!important}
/* Labels above fields on the login form: a 3-column label wraps «Dirección de / correo / electrónico». */
body:is(#authentication,#password) #wrapper .login-form .form-group.row{display:block;margin:0 0 16px}
body:is(#authentication,#password) #wrapper .login-form .form-group.row>*{width:100%;max-width:100%;flex:none;padding:0;float:none;text-align:left}
body:is(#authentication,#password) #wrapper .form-control-label{font-weight:700;font-size:15px;margin:0 0 6px;padding:0!important;text-align:left!important}
body:is(#authentication,#password) #wrapper .form-control-comment:empty{display:none}
body:is(#authentication,#password) #wrapper .forgot-password{text-align:right;margin:-6px 0 16px}
body:is(#authentication,#password) #wrapper .forgot-password a,#wrapper .no-account a{color:var(--bjm-brand);font-weight:700}
body:is(#authentication,#password) #wrapper #submit-login{width:100%}
#wrapper .no-account{text-align:center;margin-top:4px}
#wrapper .form-control-label{color:var(--bjm-ink)}
#cart #wrapper .cart-grid-body>a.label{color:var(--bjm-brand);font-weight:700;display:inline-flex;align-items:center;min-height:44px}
#cart #wrapper .cart-summary .checkout .btn{width:100%}
#cart #wrapper .blockreassurance_product{text-align:center}
#cart #wrapper .blockreassurance_product .block-title{color:var(--bjm-brand);font-weight:700}
#wrapper .page-not-found{max-width:640px;margin:0 auto;padding:28px!important}
#wrapper .page-not-found .bjm-404-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
#wrapper .page-not-found .bjm-404-actions a{display:inline-flex;align-items:center;min-height:46px;padding:0 22px;border-radius:999px;font-weight:800;border:1.5px solid var(--bjm-brand);color:var(--bjm-brand)}
#wrapper .page-not-found .bjm-404-actions a:first-child{background:var(--bjm-brand);color:#fff}
#wrapper .page-not-found p{color:var(--bjm-muted);font-size:16px}
#wrapper .page-not-found h4{font-size:20px;font-weight:800;text-transform:none;color:var(--bjm-ink)}
body#pagenotfound #main .page-header{max-width:640px;margin:0 auto}
#search #wrapper #js-product-list-header h1{text-transform:none!important}

/* POLISH_V1.1 (Pablo, 2026-10-16): on mobile the favourites heart covered part of the photo in the list. Smaller and
   tucked into the corner; the invisible touch area stays 44 px. */
@media(max-width:767px){
 .product-miniature .bjmf-heart{top:4px!important;right:4px!important;width:32px!important;height:32px!important;box-shadow:0 2px 8px rgba(40,20,70,.14)!important}
 .product-miniature .bjmf-heart svg{width:17px!important;height:17px!important}
 .product-miniature .bjmf-heart::after{content:'';position:absolute;inset:-6px}
}
