/* Barkat Shop Builder modules. Colours come from CSS variables (Shop Builder > each module, and Style & CSS). */
:root {
  --bks-btn-bg: #9b0000; --bks-btn-text: #fff; --bks-btn-hover: #7a0000; --bks-btn-radius: 8px;
  --bks-card-bg: #fff; --bks-card-border: #ece7df; --bks-card-radius: 12px;
  --bks-bd-sale: #9b0000; --bks-bd-new: #2f6f4f; --bks-bd-featured: #c07a00; --bks-bd-oos: #5f5a57; --bks-bd-custom: #1f1a17; --bks-bd-text: #fff;
}

/* ---------- buttons ---------- */
.bks-btn-all .woocommerce a.button, .bks-btn-all .woocommerce button.button, .bks-btn-all .woocommerce input.button,
.bks-btn-all .woocommerce #respond input#submit, .bks-btn-all .woocommerce a.button.alt, .bks-btn-all .woocommerce button.button.alt,
.bks-btn-all .wc-block-components-button:not(.is-link), .bks-btn-all .wp-block-button.wc-block-components-product-button .wp-block-button__link,
.bks-loop .bks-loop-add, .bks-qv-btn--text, .bks-qv .single_add_to_cart_button, .bks-toast__btn {
  background: var(--bks-btn-bg); color: var(--bks-btn-text); border-color: var(--bks-btn-bg); border-radius: var(--bks-btn-radius);
}
.bks-btn-all .woocommerce a.button:hover, .bks-btn-all .woocommerce button.button:hover, .bks-btn-all .woocommerce input.button:hover,
.bks-btn-all .woocommerce a.button.alt:hover, .bks-btn-all .woocommerce button.button.alt:hover, .bks-btn-all .wc-block-components-button:not(.is-link):hover,
.bks-loop .bks-loop-add:hover, .bks-qv-btn--text:hover, .bks-qv .single_add_to_cart_button:hover, .bks-toast__btn:hover {
  background: var(--bks-btn-hover); border-color: var(--bks-btn-hover); color: var(--bks-btn-text);
}

/* ---------- badges ---------- */
.bks-own-sale .wc-block-components-product-sale-badge, .bks-own-sale .wc-block-components-product-image .onsale { display: none !important; }
.products .product, li.product, .wc-block-product, .wc-block-components-product-image, .wc-block-grid__product-image, .bks-qv__media, .bks-card { position: relative; }
.bks-badges { position: absolute; top: 10px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.bks-badges.is-left { left: 10px; }
.bks-badges.is-right { right: 10px; align-items: flex-end; }
.bks-badges--inline { position: static; flex-direction: row; flex-wrap: wrap; margin: 0 0 10px; }
.bks-badge { --bks-bd: var(--bks-bd-custom); display: inline-flex; align-items: center; min-height: 24px; padding: 3px 10px; font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; color: var(--bks-bd-text); background: var(--bks-bd); border-radius: 99px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.bks-badge--sale { --bks-bd: var(--bks-bd-sale); }
.bks-badge--new { --bks-bd: var(--bks-bd-new); }
.bks-badge--featured { --bks-bd: var(--bks-bd-featured); }
.bks-badge--oos { --bks-bd: var(--bks-bd-oos); }
.shape-square .bks-badge { border-radius: 3px; }
.shape-circle .bks-badge { width: 48px; height: 48px; padding: 4px; justify-content: center; text-align: center; border-radius: 50%; font-size: 11px; }
.shape-ribbon .bks-badge { border-radius: 0 4px 4px 0; padding-right: 14px; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); }
.is-right.shape-ribbon .bks-badge { border-radius: 4px 0 0 4px; padding: 3px 10px 3px 14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%); }
.woocommerce div.product > .bks-badges--single { top: 12px; }

/* ---------- quick view ---------- */
.bks-qv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: inherit; }
.bks-qv-btn.bks-qv-btn--text { margin-top: 6px; padding: .55em 1em; border: 1px solid; line-height: 1.2; font-size: .85em; }
.bks-qv-btn--text svg { display: none; }
.bks-qv-btn--image { position: absolute; top: 10px; right: 10px; z-index: 6; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #1f1a17; box-shadow: 0 2px 10px rgba(0,0,0,.15); opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.bks-qv-btn--image span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
li.product:hover .bks-qv-btn--image, .wc-block-product:hover .bks-qv-btn--image, .bks-qv-btn--image:focus, .bks-qv-btn--image:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .bks-qv-btn--image { opacity: 1; transform: none; } }
.bks-qv-btn--image:hover { background: var(--bks-btn-bg); color: var(--bks-btn-text); }

.bks-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bks-modal[hidden] { display: none; }
.bks-modal__scrim { position: absolute; inset: 0; background: rgba(20, 15, 12, .55); animation: bks-fade .15s; }
.bks-modal__box { position: relative; width: min(var(--bks-qv-width, 920px), 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bks-card-bg); border-radius: var(--bks-card-radius); box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: bks-pop .18s ease-out; }
.bks-modal__close { position: sticky; top: 10px; float: right; margin: 10px 10px -48px 0; z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #1f1a17; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.bks-modal__body { padding: 0; }
.bks-modal__loading { padding: 60px; text-align: center; color: #6f6262; }
@keyframes bks-fade { from { opacity: 0; } }
@keyframes bks-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
html.bks-noscroll { overflow: hidden; }

.bks-qv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 24px; width: auto !important; float: none !important; margin: 0 !important; }
.bks-qv.bks-tpl { display: block; }
.bks-qv__media { min-width: 0; }
.bks-qv__info { min-width: 0; width: auto !important; float: none !important; }
.bks-qv .product_title { margin: 0 0 8px; font-size: 1.6em; line-height: 1.2; }
.bks-qv .price { font-size: 1.25em; margin: 0 0 12px; }
.bks-qv form.cart { margin: 16px 0; }
.bks-qv form.cart:not(.variations_form), .bks-qv .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.bks-qv .quantity { margin: 0 !important; }
.bks-qv .quantity .qty { min-height: 46px; width: 4.5em; padding: 0 8px; font-size: 1em; border: 1px solid #d9d4ca; border-radius: var(--bks-btn-radius, 8px); }
.bks-qv .single_add_to_cart_button, .bks-qv .bks-buy-now { min-height: 46px; margin: 0 !important; }
.bks-qv .woocommerce-variation { margin: 0 0 10px; }
.bks-qv__more { margin: 12px 0 0; }
@media (max-width: 720px) { .bks-qv { grid-template-columns: 1fr; padding: 16px; gap: 16px; } }

/* simple gallery (quick view, templates) */
.bks-gallery__main { border-radius: var(--bks-card-radius); overflow: hidden; background: #f6f1ea; }
.bks-gallery__main img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin: 0 !important; }
.bks-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bks-gallery__thumb { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.bks-gallery__thumb.is-on { border-color: var(--bks-btn-bg); }
.bks-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0 !important; }

/* ---------- order now ---------- */
.woocommerce .bks-buy-now, .bks-buy-now { margin-left: 8px; font-size: inherit; font-weight: inherit; line-height: inherit; padding: var(--bks-bn-pad, .9em 1.6em); min-height: 100%; cursor: pointer; background: var(--bks-bn-bg, #1f1a17); color: var(--bks-bn-text, #fff); border-color: var(--bks-bn-bg, #1f1a17); }
.woocommerce .bks-buy-now:hover, .bks-buy-now:hover { filter: brightness(1.15); background: var(--bks-bn-bg, #1f1a17); color: var(--bks-bn-text, #fff); }
.bks-buy-now.disabled { opacity: .5; }

/* ---------- free delivery bar ---------- */
.bks-freebar { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bks-fb-bar, #2f6f4f) 7%, #fff); }
.bks-freebar[hidden] { display: none; }
.bks-freebar__msg { margin: 0 0 6px; font-size: .92em; font-weight: 600; }
.bks-freebar__track { height: 8px; border-radius: 99px; background: var(--bks-fb-track, #e9e4dc); overflow: hidden; }
.bks-freebar__fill { display: block; height: 100%; border-radius: 99px; background: var(--bks-fb-bar, #2f6f4f); transition: width .4s ease; }
.bks-freebar.is-done .bks-freebar__msg::before { content: "\2713\00a0"; }
.widget_shopping_cart_content .bks-freebar { margin: 0 0 12px; }

/* ---------- top bars ---------- */
.bks-topbar { position: relative; z-index: 50; padding: 8px 16px; text-align: center; font-size: 14px; font-weight: 600; }
.bks-topbar--closed { background: var(--bks-sc-bg, #9b0000); color: var(--bks-sc-text, #fff); }
.bks-topbar--free { background: var(--bks-fb-top-bg, #1f1a17); color: var(--bks-fb-top-text, #fff); }
.bks-topbar--free .bks-freebar { max-width: 520px; margin: 0 auto; padding: 0; background: none; }
.bks-topbar--free .bks-freebar__msg { margin: 0 0 4px; }
.bks-topbar--free .bks-freebar__track { height: 5px; background: rgba(255,255,255,.2); }
.bks-closed-notice { margin: 0 0 16px; }

/* ---------- countdown ---------- */
.bks-countdown { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 6px 12px; border-radius: 99px; background: var(--bks-fl-bg, #fff5f2); color: var(--bks-fl-text, #9b0000); font-size: .9em; font-weight: 600; }
.bks-countdown__time { font-variant-numeric: tabular-nums; font-weight: 800; }
li.product .bks-countdown { margin: 4px 0 8px; font-size: .78em; padding: 3px 9px; }
.bks-countdown.is-ended { opacity: .6; }

/* ---------- sales popup ---------- */
.bks-sp { position: fixed; bottom: 20px; z-index: 99990; display: flex; align-items: center; gap: 12px; width: min(340px, calc(100vw - 32px)); padding: 10px 34px 10px 10px; border-radius: 14px; background: var(--bks-sp-bg, #fff); color: var(--bks-sp-text, #1f1a17); box-shadow: 0 12px 32px rgba(0,0,0,.18); text-decoration: none; opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; pointer-events: none; }
.bks-sp.is-bl { left: 20px; }
.bks-sp.is-br { right: 20px; }
.bks-sp.is-show { opacity: 1; transform: none; pointer-events: auto; }
.bks-sp__img { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #f6f1ea; }
.bks-sp__img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; }
.bks-sp__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.3; }
.bks-sp__title { opacity: .75; }
.bks-sp__name { font-weight: 700; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bks-sp__time { font-size: 12px; opacity: .6; }
.bks-sp__close { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .55; font-size: 18px; line-height: 1; cursor: pointer; }
.bks-sp__close:hover { opacity: 1; }
@media (max-width: 600px) { .bks-sp.no-mobile { display: none; } .bks-sp { bottom: 12px; } .bks-sp.is-bl { left: 12px; } .bks-sp.is-br { right: 12px; } }
body:has(.bks-fc) .bks-sp.is-br { bottom: 92px; }

/* ---------- added to cart toast ---------- */
.bks-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100001; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border-radius: 12px; background: #1f1a17; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; }
.bks-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.bks-toast.is-error { background: #b42318; }
.bks-toast__btn { padding: 6px 12px; border: 0; text-decoration: none; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .bks-sp, .bks-toast, .bks-modal__box, .bks-modal__scrim, .bks-qv-btn--image, .bks-freebar__fill { transition: none; animation: none; }
}

/* theme guard (see frontend.css) */
.bks-modal__close:is(#bks-guard, *), .bks-sp__close:is(#bks-guard, *) { background: rgba(255,255,255,.92); color: #1f1a17; border: 0; padding: 0; }
.bks-sp__close:is(#bks-guard, *) { background: transparent; color: inherit; }
.bks-gallery__thumb:is(#bks-guard, *) { background: none; padding: 0; border: 2px solid transparent; }
.bks-gallery__thumb.is-on:is(#bks-guard, *) { border-color: var(--bks-btn-bg); }
.bks-qv-btn--image:is(#bks-guard, *) { background: #fff; color: #1f1a17; border: 0; padding: 0; }
.bks-qv-btn--image:is(#bks-guard, *):hover { background: var(--bks-btn-bg); color: var(--bks-btn-text); }
.bks-ac-notice { margin: 6px 0 12px; font-size: .82em; opacity: .7; }
