/* ==========================================================================
   Best Leather Store v4 — animations, product page, size guides, responsive
   ========================================================================== */

/* ---------- Opening animation ---------- */
.v4-loader { position: fixed; inset: 0; z-index: 9999; background: var(--bls-dark); color: #fff; display: grid; place-items: center; transition: transform 1s cubic-bezier(.76,0,.24,1) .1s; }
.v4-noloader .v4-loader { display: none; }
.v4-loaded .v4-loader { transform: translateY(-101%); }
.v4-loader__in { display: flex; flex-direction: column; align-items: center; gap: 22px; transition: opacity .4s, transform .6s; }
.v4-loaded .v4-loader__in { opacity: 0; transform: translateY(-30px); }
.v4-loader img { max-height: 92px; width: auto; background: #fff; padding: 10px 18px; border-radius: 4px; animation: v4-pop .9s cubic-bezier(.2,.8,.2,1) both; }
.v4-loader strong { font: 700 34px/1 var(--bls-display); text-transform: uppercase; letter-spacing: .08em; animation: v4-pop .9s cubic-bezier(.2,.8,.2,1) both; }
.v4-loader__bar { position: relative; width: 180px; height: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.v4-loader__bar i { position: absolute; inset: 0; background: var(--bls-accent); transform-origin: left; animation: v4-bar 1.3s cubic-bezier(.6,0,.2,1) forwards; }
.v4-loader small { font: 500 11px/1 var(--bls-sans); letter-spacing: .34em; text-transform: uppercase; opacity: .6; animation: v4-pop .9s .2s both; }
@keyframes v4-pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes v4-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
html.v4-loading body { overflow: hidden; }
/* hero waits for the intro */
html.v4-loading .v3-hero__content > *, html.v4-loading .v3-hero__bg { animation-play-state: paused !important; }

/* ---------- Page change animation ---------- */
.v4-curtain { position: fixed; inset: 0; z-index: 9998; pointer-events: none; display: block; }
.v4-curtain::before, .v4-curtain span { content: ""; position: absolute; inset: 0; transform: scaleY(0); }
.v4-curtain::before { background: var(--bls-accent); transform-origin: bottom; transition: transform .5s cubic-bezier(.76,0,.24,1); }
.v4-curtain span { background: var(--bls-dark); transform-origin: bottom; transition: transform .5s cubic-bezier(.76,0,.24,1) .08s; }
html.v4-leaving .v4-curtain::before, html.v4-leaving .v4-curtain span { transform: scaleY(1); }
html.v4-entering .v4-curtain::before, html.v4-entering .v4-curtain span { transform: scaleY(1); transition: none; }
html.v4-loaded:not(.v4-leaving) .v4-curtain::before, html.v4-loaded:not(.v4-leaving) .v4-curtain span { transform-origin: top; }
html.v4-loaded:not(.v4-leaving) .v4-curtain span { transition-delay: 0s; }
html.v4-loaded:not(.v4-leaving) .v4-curtain::before { transition-delay: .08s; }
.bls-main { animation: v4-pagein .8s cubic-bezier(.2,.8,.2,1) both; }
html.v4-loading .bls-main, html.v4-entering .bls-main { animation-play-state: paused; }
@keyframes v4-pagein { from { opacity: 0; } }

/* ---------- Animated cursor ---------- */
.v4-cursor { display: none; }
html.v4-has-cursor .v4-cursor { display: block; }
html.v4-has-cursor, html.v4-has-cursor body, html.v4-has-cursor a, html.v4-has-cursor button, html.v4-has-cursor label, html.v4-has-cursor summary { cursor: none !important; }
html.v4-has-cursor input, html.v4-has-cursor textarea, html.v4-has-cursor select { cursor: text !important; }
html.v4-has-cursor select { cursor: pointer !important; }
.v4-cursor__dot, .v4-cursor__ring { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s; will-change: transform; }
.v4-cursor.is-on .v4-cursor__dot, .v4-cursor.is-on .v4-cursor__ring { opacity: 1; }
.v4-cursor__dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--bls-primary); }
.v4-cursor__ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; display: grid; place-items: center; }
.v4-cursor__ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--bls-primary); transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s, border-color .3s; }
.v4-cursor__ring em { position: relative; font: 700 11px/1 var(--bls-sans); letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: #fff; opacity: 0; transition: opacity .25s; }
.v4-cursor.is-link .v4-cursor__ring::before { transform: scale(1.5); background: rgba(185,138,90,.15); border-color: var(--bls-accent); }
.v4-cursor.is-link .v4-cursor__dot { transform: scale(0) !important; }
.v4-cursor.is-view .v4-cursor__ring::before { transform: scale(2.1); background: var(--bls-primary); border-color: var(--bls-primary); }
.v4-cursor.is-view .v4-cursor__ring em { opacity: 1; }
.v4-cursor.is-view .v4-cursor__dot { opacity: 0 !important; }
.v4-cursor.is-text .v4-cursor__ring, .v4-cursor.is-text .v4-cursor__dot { opacity: 0 !important; }
.v4-cursor.is-down .v4-cursor__ring::before { transform: scale(.75); }
.v4-cursor.is-view.is-down .v4-cursor__ring::before { transform: scale(1.8); }

/* ---------- Product page gallery ---------- */
.bls-pdp__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.v4-gal { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; position: sticky; top: 140px; }
.v4-gal:not(:has(.v4-gal__thumbs)) { grid-template-columns: minmax(0, 1fr); }
.v4-gal__thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; scrollbar-width: none; }
.v4-gal__thumbs::-webkit-scrollbar { display: none; }
.v4-gal__thumbs button { flex: none; padding: 0; border: 1px solid var(--bls-line); background: #f3f1ee; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; opacity: .6; transition: opacity .25s, border-color .25s; }
.v4-gal__thumbs button.is-active, .v4-gal__thumbs button:hover { opacity: 1; border-color: var(--bls-dark); }
.v4-gal__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.v4-gal__main { position: relative; border-radius: 4px; overflow: hidden; background: #f3f1ee; }
.v4-gal__track { position: relative; aspect-ratio: 4 / 5; }
.v4-gal__slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; overflow: hidden; cursor: zoom-in; }
.v4-gal__slide.is-active { opacity: 1; visibility: visible; }
.v4-gal__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .35s ease; }
.v4-gal__slide.is-zoom img { transform: scale(1.9); }
.v4-gal__nav { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); opacity: 0; transition: .3s; }
.v4-gal__main:hover .v4-gal__nav { opacity: 1; }
.v4-gal__nav:hover { background: var(--bls-dark); color: #fff; }
.v4-gal__nav--prev { left: 14px; }
.v4-gal__nav--next { right: 14px; }
.v4-gal__count { position: absolute; z-index: 3; right: 14px; bottom: 14px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 20px; }
.v4-gal__zoomhint { position: absolute; z-index: 3; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.9); font-size: 12px; padding: 6px 10px; border-radius: 20px; transition: opacity .3s; }
.v4-gal__zoomhint .bls-ico { width: 14px; height: 14px; }
.v4-gal__main:hover .v4-gal__zoomhint { opacity: 0; }
.bls-pdp__badge { position: absolute; top: 14px; left: 14px; z-index: 3; border-radius: 2px; font-weight: 700; }
.bls-pdp__gallery, .bls-pdp__track, .bls-pdp__dots { display: none; }

/* Summary extras */
.bls-pdp__sticky { top: 150px; }
.v4-eta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 18px; background: #eef5f0; color: #24563a; border-radius: 4px; font-size: 14px; }
.v4-eta .bls-ico { width: 20px; height: 20px; }
.v4-sizebtn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--bls-line); background: none; padding: 0 0 3px; font-size: 14px; color: inherit; }
.v4-sizebtn:hover { border-color: var(--bls-primary); color: var(--bls-primary); }
.v4-sizebtn .bls-ico { width: 17px; height: 17px; color: var(--bls-primary); }
.v4-sizelink { margin-left: 10px; border: 0; background: none; padding: 0; font: 600 12px/1 var(--bls-sans); letter-spacing: .02em; text-transform: none; text-decoration: underline; text-underline-offset: 3px; color: var(--bls-primary); }
.bls-store table.variations th.label { display: flex !important; align-items: baseline; justify-content: space-between; }
.v4-pay { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 14px 16px; border: 1px dashed var(--bls-line); border-radius: 4px; font-size: 13px; }
.v4-pay span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.v4-pay .bls-ico { width: 18px; height: 18px; color: var(--bls-ok); }
.v4-pay img { height: 22px; width: auto; }

/* ---------- Size guide (tabs, modal, page) ---------- */
.v4-size__tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: #f3f1ee; border-radius: 30px; }
.v4-size__tabs button { border: 0; background: transparent; padding: 10px 20px; border-radius: 24px; font: 600 13px/1 var(--bls-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--bls-muted); transition: .25s; }
.v4-size__tabs button.is-active { background: var(--bls-dark); color: #fff; }
.v4-size__panel { display: none; margin: 0; }
.v4-size__panel.is-active { display: block; animation: bls-fade .4s ease; }
.v4-size__panel img { width: 100%; height: auto; border: 1px solid var(--bls-line); border-radius: 4px; background: #fff; }
.v4-size__panel figcaption { margin-top: 10px; font-size: 13px; color: var(--bls-muted); }
.v4-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(22,17,14,.6); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.v4-modal.is-open { opacity: 1; visibility: visible; }
.v4-modal__box { width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 6px; transform: translateY(24px) scale(.98); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.v4-modal.is-open .v4-modal__box { transform: none; }
.v4-modal__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--bls-line); }
.v4-modal__head strong { font: 600 20px/1 var(--bls-display); text-transform: uppercase; letter-spacing: .04em; }
.v4-modal__body { padding: 22px; }
.v4-modal__more { margin: 16px 0 0; font-size: 14px; }
.v4-modal__more a { color: var(--bls-primary); font-weight: 600; }
body.bls-lock-modal { overflow: hidden; }
.v4-sizepage { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.v4-sizepage__how { position: sticky; top: 150px; padding: 30px; background: #f7f5f2; border-radius: 4px; }
.v4-sizepage__how h2 { font-size: 24px !important; margin-bottom: 18px; }
.v4-sizepage__how ol { list-style: none; counter-reset: m; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.v4-sizepage__how li { counter-increment: m; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.v4-sizepage__how li::before { content: counter(m); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--bls-primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.v4-sizepage__how li span { font-size: 14px; color: var(--bls-muted); }
.v4-sizepage__custom { display: flex; gap: 14px; padding: 20px; background: #fff; border-radius: 4px; }
.v4-sizepage__custom .bls-ico { width: 30px; height: 30px; color: var(--bls-primary); }
.v4-sizepage__custom p { font-size: 14px; color: var(--bls-muted); margin: 6px 0 14px; }

/* ---------- Sticky add-to-cart bar (fixed) ---------- */
.bls-stickybar { gap: 12px; padding: 10px clamp(12px, 3vw, 40px); }
.bls-stickybar__info { flex: 1; min-width: 0; }
.bls-stickybar__info > div { min-width: 0; display: flex; flex-direction: column; }
.bls-stickybar__info strong { max-width: none; font-size: 14px; }
.bls-stickybar__info span { font-size: 13px; white-space: nowrap; }
.bls-stickybar__info img { flex: none; border-radius: 3px; }
.bls-store .bls-stickybar .bls-btn { flex: none; white-space: nowrap; min-height: 44px; padding: 0 18px; font-size: 12px; }

/* ---------- Responsive fixes ---------- */
@media (max-width: 1100px) {
	.v4-sizepage { grid-template-columns: 1fr; }
	.v4-sizepage__how { position: static; }
}
@media (max-width: 980px) {
	.bls-pdp__in { grid-template-columns: 1fr; padding-top: 10px; }
	.v4-gal { position: static; grid-template-columns: 1fr; gap: 10px; }
	.v4-gal__main { order: 1; margin: 0 calc(-1 * clamp(16px, 3.6vw, 44px)); border-radius: 0; }
	.v4-gal__thumbs { order: 2; flex-direction: row; max-height: none; overflow-x: auto; }
	.v4-gal__thumbs button { width: 64px; }
	.v4-gal__track { display: flex; aspect-ratio: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.v4-gal__track::-webkit-scrollbar { display: none; }
	.v4-gal__slide { position: relative; inset: auto; flex: 0 0 100%; aspect-ratio: 4 / 5; opacity: 1; visibility: visible; scroll-snap-align: start; }
	.v4-gal__nav, .v4-gal__zoomhint { display: none; }
	.bls-pdp__sticky { position: static; }
	.bls-crumbwrap .bls-crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.v3-header__top { grid-template-columns: auto 1fr auto; }
	.v3-header__left { gap: 0; }
}
@media (max-width: 680px) {
	.bls-wrap { padding-left: 16px; padding-right: 16px; }
	.bls-pdp__title { font-size: 26px !important; }
	.bls-store .bls-pdp__price { font-size: 22px; }
	.bls-pdp__meta-row { gap: 10px; padding-bottom: 16px; margin-bottom: 16px; }
	.bls-store form.cart:not(.variations_form), .bls-store .woocommerce-variation-add-to-cart { gap: 8px; }
	.bls-store .quantity .qty { width: 40px; min-height: 52px; }
	.bls-qty-btn { width: 34px; }
	.bls-store form.cart .single_add_to_cart_button { min-height: 54px; padding: 0 14px; }
	.bls-swatch { min-width: 50px; height: 44px; padding: 0 12px; }
	.bls-pdp__help { gap: 10px 16px; font-size: 13px; }
	.bls-pdp__share em { margin-left: 0; width: 100%; }
	.v4-modal { padding: 0; place-items: end center; }
	.v4-modal__box { max-height: 88vh; border-radius: 14px 14px 0 0; }
	.v4-modal__body { padding: 16px; }
	.v4-size__tabs { display: flex; width: 100%; }
	.v4-size__tabs button { flex: 1; padding: 10px 8px; font-size: 11.5px; }
	.bls-stickybar__info img { width: 40px; height: 48px; }
	.bls-stickybar__info strong { font-size: 13px; }
	.bls-store .bls-stickybar .bls-btn { padding: 0 14px; font-size: 11px; letter-spacing: .06em; min-height: 42px; }
	/* general mobile polish */
	.v3-sec { padding: 46px 0; }
	.v3-title { margin-bottom: 24px; }
	.v3-title h2 { font-size: 26px !important; }
	.v3-title p { font-size: 14px; }
	.v3-promo__track { width: 78vw; }
	.v3-promo__track p { font-size: 12px; }
	.v3-hero__kicker { font-size: 10.5px; padding: 6px 10px; margin-bottom: 14px; }
	.v3-hero__text { font-size: 15px; margin-bottom: 22px; }
	.v3-cat__label { padding: 14px; }
	.v3-cat__label strong { font-size: 17px; }
	.v3-cat__label em { font-size: 11px; }
	.bls-card__quick { right: 8px; bottom: 8px; left: auto; }
	.bls-card__cat { font-size: 10px; }
	.bls-card__title { min-height: 2.8em; font-size: 13.5px !important; }
	.bls-card__price, .bls-store .bls-card__price .price { font-size: 14.5px; }
	.bls-store .bls-card__price del { font-size: 12.5px; }
	.bls-badge { font-size: 9.5px; padding: 5px 7px; }
	.v3-deal h2 { font-size: 34px !important; }
	.v3-deal .bls-countdown strong { font-size: 26px; }
	.v3-banner h2 { font-size: 34px !important; }
	.v3-feature-row__promo { min-height: 260px; }
	.bls-pagehead { padding: 40px 0; }
	.bls-pagehead__title { font-size: 32px !important; }
	.bls-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; padding-bottom: 4px; }
	.bls-chips::-webkit-scrollbar { display: none; }
	.bls-chips a { white-space: nowrap; flex: none; }
	.bls-footer__giant { font-size: 54px; }
	.bls-footer__bottom { justify-content: center; text-align: center; }
	.bls-store .woocommerce-mini-cart__buttons { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.v4-loader, .v4-curtain { display: none !important; }
	.bls-main { animation: none; }
}
.bls-store .bls-pagehead__desc { margin: 16px auto 0; }
.bls-store .single_variation_wrap .woocommerce-variation { margin: 0; }
.bls-store .single_variation_wrap .woocommerce-variation:not(:empty) { margin-bottom: 14px; }
.bls-store table.variations { margin-bottom: 6px; }

/* Pagination fix: the <ul> also has class "page-numbers" */
.bls-pagination { margin-top: 48px; display: flex; justify-content: center; width: 100%; }
.bls-store .bls-pagination ul.page-numbers, .bls-store .bls-pagination .nav-links { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; min-width: 0; height: auto; padding: 0; margin: 0; border: 0; background: none; list-style: none; }
.bls-store .bls-pagination ul.page-numbers li { display: block; margin: 0; padding: 0; border: 0; float: none; }
.bls-store .bls-pagination a.page-numbers, .bls-store .bls-pagination span.page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--bls-line); border-radius: 4px; background: #fff; font-weight: 600; font-size: 15px; color: var(--bls-dark); }
.bls-store .bls-pagination span.page-numbers.current, .bls-store .bls-pagination a.page-numbers:hover { background: var(--bls-dark); border-color: var(--bls-dark); color: #fff; }
.bls-store .bls-pagination span.page-numbers.dots { border: 0; background: none; min-width: 20px; }
.bls-store .bls-pagination .page-numbers .bls-ico { width: 18px; height: 18px; }
@media (max-width: 680px) {
	.bls-pagination { margin-top: 34px; }
	.bls-store .bls-pagination a.page-numbers, .bls-store .bls-pagination span.page-numbers { min-width: 40px; height: 40px; font-size: 14px; }
}
@media (max-width: 680px) {
	.bls-perks__in { grid-template-columns: 1fr 1fr; gap: 0; }
	.bls-perk { flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 10px 18px 0; border: 0; }
	.bls-perk .bls-ico { width: 26px; height: 26px; }
	.bls-perk strong { font-size: 14px; line-height: 1.3; }
	.bls-perk span { font-size: 12.5px; line-height: 1.4; }
}
