/*
 * Bee Factor — Shop: product lists and cards, like Rey (skin “basic”).
 * Values in px as Rey outputs them (there 1rem = 14px). Breakpoints as in Rey:
 * ≤767 mobile, 768–1024 tablet, ≥1025 desktop (1180 = landscape tablet = desktop).
 * No JavaScript for display; images scroll (scroll-snap).
 */

/* “BF Rey” (page title, badges): the theme's Geologica declared only as 400 (Geologica is loaded only as
   200/300/400); 600/700 are synthesized from 400 as faux bold. The @font-face is written by
   class-bfshop-catalog.php with the theme files (same URL = no second download). */

/* ---------- Catalog page: spacing (15px side, no gap above the cover header) ---------- */
.bfcat-listing .bft-woo{padding-inline:15px}
.bfcat-listing .bft-main{padding-top:0}

/* ---------- Header: “cover” (Elementor 99460) ---------- */
.bfcat-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:20px;padding:40px 0 46.25px}
.bfcat-head__title{margin:0;font-family:"BF Rey",var(--bf-font,sans-serif);font-size:32px;font-weight:700;line-height:1;letter-spacing:-1px;text-transform:capitalize;text-rendering:optimizeSpeed}
.bfcat-bc{display:flex;flex-wrap:wrap;align-items:center;gap:11px;font-size:11px;font-weight:500;line-height:1.7;color:#000}
.bfcat-bc a{color:inherit;text-decoration:none}
.bfcat-bc a:hover{color:#282828}
@media (max-width:767px){.bfcat-bc{align-self:flex-start}.bfcat-head__title{font-size:30px}}
@media (min-width:1025px){.bfcat-head{padding-bottom:20px}}
/* The cover header is 15px wider than the list once the screen exceeds 1285 + 2×15 */
@media (min-width:1315px){.bfcat-head:not(.bfcat-head--search){margin-inline:0 -15px}}
/* Search: breadcrumb “Home › Shop › …” and below it a 26px title */
.bfcat-head--search{display:block;padding:26.25px 0 0}
.bfcat-head--search .bfcat-bc{gap:12.25px;margin:17.5px 0;font-size:12.25px;font-weight:200;color:inherit}
.bfcat-head--search .bfcat-head__title{margin:0 0 19.25px;font-size:26px;font-weight:400;line-height:1.2;letter-spacing:0}
@media (min-width:1025px){.bfcat-head--search{padding-top:0}}

/* “118 PRODUCTS” (no sorting) */
.bfcat-bar{margin-bottom:26.25px;padding-bottom:28px;border-bottom:1px solid hsl(210 17% 98%)}
/* More specific selector than the generic “p” rules (theme / Elementor kit: margin 16–20px) */
.bfcat-bar p.bfcat-count{margin:0;font-size:13px;font-weight:600;line-height:1.7;text-transform:uppercase;color:hsl(210 7% 46%)}
@media (min-width:1025px){.bfcat-bar{margin-bottom:39.375px;padding:0;border:0}.bfcat-bar p.bfcat-count{color:inherit}}

/* ---------- Grid: 2 columns up to 1024px, 4 from 1025px; gap 10px, vertical 13px / 16px ---------- */
ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 10px}
@media (min-width:1025px){
ul.products{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 10px}
ul.products.columns-1{grid-template-columns:minmax(0,1fr)}
ul.products.columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}
ul.products.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}
ul.products.columns-5{grid-template-columns:repeat(5,minmax(0,1fr))}
ul.products.columns-6{grid-template-columns:repeat(6,minmax(0,1fr))}
}
/* Related / up-sells: a carousel with 1 (mobile), 2 (tablet), 4 (desktop) cards per screen.
   Here a scrolling row. :where() = lowest specificity, so the product page can override it. */
:where(.related,.upsells)>ul.products{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}
:where(.related,.upsells)>ul.products::-webkit-scrollbar{display:none}
:where(.related,.upsells)>ul.products>li{scroll-snap-align:start}
@media (min-width:768px){:where(.related,.upsells)>ul.products{grid-auto-columns:calc((100% - 10px)/2)}}
@media (min-width:1025px){:where(.related,.upsells)>ul.products{grid-template-columns:none;grid-auto-columns:calc((100% - 30px)/4)}}

/* ---------- Card ---------- */
/* Column: as tall as the row, the spare space is shared between the parts (rey-child: .rey-productInner) */
ul.products li.product{display:flex;flex-direction:column;justify-content:space-between;color:#0a0a0a;font-size:14px;font-weight:200;line-height:1.7;text-align:start}

/* Images: scrolling strip, one image per “stop” */
.bfcat-media{position:relative;margin-bottom:12px}
.bfcat-gal{display:flex;align-items:flex-start;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}
.bfcat-gal::-webkit-scrollbar{display:none}
ul.products li.product .bfcat-gal img{flex:0 0 100%;width:100%;margin:0;border-radius:0;scroll-snap-align:start;scroll-snap-stop:always}
/* Hover over the image: the 2nd image after 0.25s (Rey: --slide-hover, 250ms) */
@media (hover:hover) and (pointer:fine){
.bfcat-gal--multi img{transition:transform .4s cubic-bezier(.25,1,.5,1)}
.bfcat-media:hover .bfcat-gal--multi img{transform:translateX(-100%);transition-delay:.25s}
.bfcat-media:hover .bfcat-dots i:first-child{opacity:.6}
.bfcat-media:hover .bfcat-dots i:nth-child(2){opacity:1}
}

/* Image corners (Rey: thPos): 5px from the edge up to 1024px, 20px from 1025px; gap between badges is 1/3 */
.bfcat-media{--d:5px}
@media (min-width:1025px){.bfcat-media{--d:20px}}
.bfcat-pos{position:absolute;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:calc(var(--d)/3);max-width:70%}
.bfcat-pos--tl,.bfcat-dots--tl{top:var(--d);left:var(--d)}
.bfcat-pos--tr,.bfcat-dots--tr{top:var(--d);right:var(--d);justify-content:flex-end}
.bfcat-pos--bl,.bfcat-dots--bl{bottom:var(--d);left:var(--d)}
.bfcat-pos--br,.bfcat-dots--br{bottom:var(--d);right:var(--d);justify-content:flex-end}
.bfcat-dots--tc{top:var(--d);left:50%;transform:translateX(-50%)}

/* Dots: 6px, in the first free corner (like the Rey script); on desktop only while hovering the card */
.bfcat-dots{position:absolute;z-index:1;display:flex;color:#0a0a0a;pointer-events:none}
.bfcat-dots i{display:flex;align-items:center;justify-content:center;width:12px;height:12px;opacity:.6}
.bfcat-dots i::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.bfcat-dots i:first-child{opacity:1}
@media (min-width:1025px){
.bfcat-dots{opacity:0;transition:opacity .3s cubic-bezier(.215,.61,.355,1)}
li.product:hover .bfcat-dots{opacity:1}
}
/* Where supported (Chrome / Android): the active dot follows scrolling, still without JavaScript; elsewhere the 1st stays */
@supports (animation-timeline:scroll()) and (timeline-scope:--a){
@media (hover:none){
.bfcat-media{timeline-scope:--bfcat}
.bfcat-gal{scroll-timeline:--bfcat x}
.bfcat-dots i:first-child{opacity:.6}
.bfcat-dots::after{content:"";position:absolute;top:3px;left:3px;width:6px;height:6px;border-radius:50%;background:currentColor;animation:bfcat-dot 1ms linear both;animation-timeline:--bfcat}
}
}
@keyframes bfcat-dot{to{transform:translateX(calc((var(--n) - 1) * 12px))}}

/* “-27% OFF”: top left on the image up to 1024px, next to the price from 1025px */
.bfcat-off{display:block;padding:3.5px 6.125px;background:#cf2929;color:#fff;font-size:8.75px;font-weight:600;line-height:1;white-space:nowrap}
.bfcat-off--price{display:none}
/* “COMING SOON” top right */
.bfcat-soldout{padding:.45em .6em;background:hsl(210 17% 98%);color:#101010;font-size:11px;font-weight:600;line-height:1}
@media (min-width:1025px){
.bfcat-off--top{display:none}
.bfcat-off--price{display:block;padding:3.5px;font-size:10.5px}
}
/* Rey badges (OFFER, LIMITED EDITION, NEW …): on mobile only with “show on mobile”,
   hidden on tablet (768–1024) (Rey CSS does not show them there), always on desktop. Colors / sizes from meta. */
.bfcat-badge{display:none;font-family:"BF Rey",var(--bf-font,sans-serif);font-size:var(--b-m,10px);font-weight:600}
.bfcat-badge>span{display:inline-block;padding:.45em .6em .5em;background:var(--b-bg,hsl(210 17% 98%));color:var(--b-c,#101010);font-size:inherit;line-height:1}
@media (max-width:767px){.bfcat-badge--m{display:inline-block}}
@media (min-width:768px) and (max-width:1024px){.bfcat-badge{font-size:var(--b-t,10px)}}
@media (min-width:1025px){.bfcat-badge{display:inline-block;font-size:var(--b-d,10px)}}
.bfcat-badge--before,.bfcat-badge--after{display:block}
.bfcat-badge--before{margin-bottom:7.5px}
.bfcat-badge--after{margin-top:7.5px}
/* Product page: in the row above the title (text 14px / 1.7, gap 5px) */
.bfcat-pbadges{font-size:14px;line-height:1.7}
.bfcat-pbadges .bfcat-badge{margin:0 5px 5px 0}
.bfcat-pbadges .bfcat-badge:last-child{margin-right:0}

/* ★★★★★ (143 reviews): Rey's 11px stars (empty ones outlined), no icon font */
.bfcat-rating{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.bfcat-rating .star-rating{position:relative;display:block;flex:none;width:55px;height:11px;margin:0;overflow:hidden;font-size:0;letter-spacing:0;line-height:1;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath fill='none' stroke='%2300010a' stroke-width='3' d='M25 1l7.12 16.23L49 19.33 36.52 31.47 39.83 49 25 40.27 10.17 49l3.31-17.53L1 19.33l16.88-2.1z'/%3E%3C/svg%3E") 0 0/11px 11px repeat-x}
.bfcat-rating .star-rating span{position:absolute;top:0;left:0;height:11px;padding:0;overflow:hidden;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath fill='%2300010a' d='M25 1l7.12 16.23L49 19.33 36.52 31.47 39.83 49 25 40.27 10.17 49l3.31-17.53L1 19.33l16.88-2.1z'/%3E%3C/svg%3E") 0 0/11px 11px repeat-x}
.bfcat-rating .star-rating::before,.bfcat-rating .star-rating span::before{content:none}
.bfcat-rating small{font-size:9.8px;font-weight:200;line-height:1}
.bfcat-rating small::before{content:"("}
.bfcat-rating small::after{content:")"}

/* Title (as written: “AGELESS YOU™”, “Luminique™ Essence 5”) and subtitle. Like the Rey
   headings: no kerning (optimizeSpeed), so lines break at the same point and the price lines up. */
ul.products li.product .woocommerce-loop-product__title{margin:0 0 6px;padding:0;color:#000;font-size:15px;font-weight:400;line-height:1.4;word-break:break-word;text-rendering:optimizeSpeed}
ul.products li.product .woocommerce-loop-product__title a{color:inherit;text-decoration:none}
ul.products li.product .woocommerce-loop-product__title a:hover{color:#282828}
/* Subtitle: 6px to the price at all sizes; more specific than the generic “p” rules */
ul.products li.product p.bfcat-sub{margin:0 0 6px;padding:0;font-size:13px;font-weight:300;line-height:1.2;word-break:break-word;text-rendering:optimizeSpeed}

/* ---------- Price and “Add to cart” ---------- */
.bfcat-foot{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:6px 11.375px;line-height:1}
.bfcat-pricebox{display:flex;flex:1 0 100%;flex-wrap:wrap;align-items:center;gap:5px 10px}
.bfcat-pricebox .price{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin:0;color:#000;font-size:14px;font-weight:300;line-height:1}
.bfcat-pricebox .price del{margin:0;color:inherit;font-weight:400;opacity:.5}
.bfcat-pricebox .price ins{color:#cf2929;font-weight:600;text-decoration:none}
ul.products li.product .bfcat-atc .button{display:inline-flex;min-height:0;margin:0;padding:.75em 1.25em;border:1px solid #0a0a0a;border-radius:2px;background:#0a0a0a;color:#fff;font-size:13px;font-weight:400;line-height:1.2;letter-spacing:0;text-transform:capitalize}
ul.products li.product .bfcat-atc .button:hover{background:#0a0a0a;color:#fff}
ul.products li.product .bfcat-atc .button.loading{opacity:.25;pointer-events:none}
ul.products li.product .added_to_cart{display:none}
@media (min-width:1441px){.bfcat-foot{column-gap:17.5px}}
/* Desktop: the price is shown; on card hover the price slides up and the button rises */
@media (min-width:1025px){
.bfcat-pricebox{position:absolute;top:50%;left:0;transform:translateY(-50%)}
.bfcat-atc{overflow:hidden}
.bfcat-pricebox,ul.products li.product .bfcat-atc .button{transition:transform .3s cubic-bezier(.215,.61,.355,1),opacity .3s cubic-bezier(.215,.61,.355,1)}
ul.products li.product .bfcat-atc .button{transform:translateY(110%)}
ul.products li.product .bfcat-atc .button:focus-visible{outline-offset:-3px}
ul.products li.product:is(:hover,:focus-within) .bfcat-atc .button{transform:none}
ul.products li.product:is(:hover,:focus-within) .bfcat-pricebox{opacity:0;transform:translateY(-150%);pointer-events:none}
}


/* ---------- “SHOW MORE (1 / 8)” ---------- */
.bfcat-more{position:relative;margin:61.25px 0 26.25px;text-align:center}
.bfcat-more__btn,.bfcat-more__end{align-items:center;padding:9.75px 16.25px;border:1px solid #0a0a0a;border-radius:2px;background:#0a0a0a;color:#fff;font-size:13px;font-weight:600;line-height:1.2;text-decoration:none;transition:opacity .3s cubic-bezier(.215,.61,.355,1),transform .3s cubic-bezier(.215,.61,.355,1)}
.bfcat-more__btn{display:inline-flex}
.bfcat-more__end{display:none}
.bfcat-more__btn:hover{background:#000;color:#fff}
.bfcat-more__n{margin-left:.6em}
.bfcat-more.is-loading .bfcat-more__btn{opacity:0;transform:translateY(-30px);pointer-events:none}
.bfcat-more.is-loading::after{content:"";position:absolute;top:calc(50% - 1.5px);left:calc(50% - 50px);width:100px;height:3px;background:hsl(210 11% 71%);animation:bfcat-load 1s cubic-bezier(.215,.61,.355,1) infinite}
.bfcat-more.is-end .bfcat-more__btn{display:none}
.bfcat-more.is-end .bfcat-more__end{display:inline-flex;opacity:.3}
@keyframes bfcat-load{0%{transform:scaleX(0);transform-origin:left}50%{transform:scaleX(1);transform-origin:left}51%{transform-origin:right}100%{transform:scaleX(0);transform-origin:right}}

@media (prefers-reduced-motion:reduce){.bfcat-gal img,.bfcat-pricebox,.bfcat-atc .button,.bfcat-dots,.bfcat-more__btn{transition:none!important}}

/* 0.3.0 · like Rey (li.product.is-animated-entry): cards below the first screen enter with fade + scale
   (BFShop_Catalog::entry_script adds the classes; without the script nothing is hidden) */
ul.products li.product.bfcat-entry{opacity:0;transform:translateY(50px) scale(.95);transition:opacity .3s cubic-bezier(.215,.61,.355,1),transform .3s cubic-bezier(.215,.61,.355,1)}
ul.products li.product.bfcat-entry.bfcat-in{opacity:1;transform:none}

/* 0.3.1 · desktop: space below “SHOW MORE” to the footer (54px less than the theme's 4rem) */
@media (min-width:1025px){.bfcat-listing .bft-main{padding-bottom:10px}}

/* ---------- Skin needs / categories as “chips” below the title ---------- */
.bfcat-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-6px 0 30px}
.bfcat-chips__l{margin-right:4px;color:#8a8a8a;font-size:11px;font-weight:500;letter-spacing:.14em;text-transform:uppercase}
.bfcat-chip{display:inline-flex;align-items:center;min-height:36px;padding:0 16px;border:1px solid #e3e3e3;border-radius:999px;background:#fff;color:#111;font-size:13px;font-weight:400;line-height:1;white-space:nowrap;text-decoration:none;transition:border-color .2s,background .2s,color .2s}
.bfcat-chip:hover{border-color:#111;color:#111}
.bfcat-chip.is-on{border-color:#111;background:#111;color:#fff}
@media (max-width:767px){
.bfcat-chips{flex-wrap:nowrap;overflow-x:auto;margin:-14px -15px 22px;padding:2px 15px;scrollbar-width:none;scroll-snap-type:x proximity}
.bfcat-chips::-webkit-scrollbar{display:none}
.bfcat-chip{scroll-snap-align:start}
}

/* ---------- Key line above the name ---------- */
ul.products li.product p.bfcat-key{margin:0 0 5px;padding:0;color:#8a8a8a;font-size:10.5px;font-weight:500;line-height:1.3;letter-spacing:.12em;text-transform:uppercase}

/* ---------- Desktop: the price always stays, “Add to cart” rises over the photo ---------- */
@media (min-width:1025px){
ul.products li.product{position:relative}
ul.products li.product .bfcat-foot{position:static}
ul.products li.product .bfcat-pricebox{position:static;transform:none!important;opacity:1!important;pointer-events:auto!important}
ul.products li.product .bfcat-atc{position:absolute;top:0;left:0;right:0;z-index:3;display:flex;align-items:flex-end;aspect-ratio:1/1;padding:12px;overflow:hidden;pointer-events:none}
ul.products li.product .bfcat-atc .button{justify-content:center;width:100%;padding:13px 16px;border-color:rgba(10,10,10,.92);background:rgba(10,10,10,.92);font-size:13px;font-weight:500;letter-spacing:.02em;opacity:0;transform:translateY(calc(100% + 14px));pointer-events:auto;transition:transform .35s cubic-bezier(.215,.61,.355,1),opacity .25s ease,background .2s}
ul.products li.product .bfcat-atc .button::before{content:"+";margin-right:8px;font-weight:300;font-size:16px;line-height:.8}
ul.products li.product .bfcat-atc .button:hover{background:#000}
ul.products li.product:is(:hover,:focus-within) .bfcat-atc .button{opacity:1;transform:none}
}

/* ---------- “Complete your routine” ---------- */
.bfcat-routine{margin:64px 0 0;padding-top:48px;border-top:1px solid #efefef}
.bfcat-routine__t{margin:0 0 28px;font-size:24px;font-weight:600;letter-spacing:-.5px}
@media (max-width:767px){.bfcat-routine{margin-top:40px;padding-top:32px}.bfcat-routine__t{font-size:20px}}

/* Wholesale (bee-factor-core): multi-line price, no discount badge (kept from the U.S. 0.3.5 copy) */
.bf-wholesale-view li.product:has(.bf-wholesale-product-pricing) .bfcat-off{display:none}
@media (min-width:1025px){
.bf-wholesale-view li.product:has(.bf-wholesale-product-pricing) .bfcat-foot{margin-top:6px}
.bf-wholesale-view li.product:has(.bf-wholesale-product-pricing) .bfcat-pricebox{position:relative;top:auto;width:100%;transform:none}
.bf-wholesale-view ul.products li.product:has(.bf-wholesale-product-pricing):is(:hover,:focus-within) .bfcat-pricebox{transform:none}
.bf-wholesale-view li.product:has(.bf-wholesale-product-pricing) .bfcat-atc{position:absolute;top:50%;transform:translateY(-50%)}
}
