/* Jahoba Haat Homepage — scoped to .jh-* classes. Never touches the app-shell. */
:root{
  --jh-green:#1f7a3d;--jh-green-d:#17612f;--jh-green-l:#e8f3ea;
  --jh-cream:#faf6ec;--jh-brown:#7a5a3a;--jh-orange:#b85c0a;
  --jh-text:#1e2a1f;--jh-muted:#6b6458;--jh-line:#e6e1d3;--jh-card:#fff;
  --jh-gap:10px;--jh-pad:12px;--jh-max:1280px;
  --jh-bottom-space:0px; /* raise (e.g. 72px) only if your bottom nav overlaps the last section */
}
.jh-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Elementor flex children must be allowed to shrink so rails scroll internally */
.elementor-widget:has(.jh-section),.elementor-widget:has(.jh-strip),.elementor-widget-shortcode .elementor-shortcode{min-width:0;max-width:100%}
.jh-section,.jh-strip{box-sizing:border-box;min-width:0;width:100%;max-width:var(--jh-max);margin-inline:auto;color:var(--jh-text)}
.jh-section *,.jh-strip *{box-sizing:border-box}
.jh-section{margin-block:0 18px}
.jh-section a{text-decoration:none}

/* Delivery strip */
.jh-strip{display:flex;align-items:center;gap:6px;padding:7px var(--jh-pad);background:var(--jh-cream);font-size:13px;line-height:1.3;color:var(--jh-brown);max-width:none;border-bottom:1px solid var(--jh-line)}
.jh-strip__icon{flex:none;color:var(--jh-green)}
.jh-strip__text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Section header */
.jh-section__head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 var(--jh-pad);margin-bottom:8px}
.jh-section__title{margin:0;font-size:18px;line-height:1.25;font-weight:700;color:var(--jh-text);letter-spacing:-.01em}
.jh-section__more{flex:none;font-size:13px;font-weight:600;color:var(--jh-green);padding:6px 0}
.jh-section__more:hover{color:var(--jh-green-d);text-decoration:underline}

/* Native horizontal rails */
.jh-rail{display:flex;gap:var(--jh-gap);list-style:none;margin:0;padding:2px var(--jh-pad) 8px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:var(--jh-pad);-webkit-overflow-scrolling:touch;scrollbar-width:none}
.jh-rail::-webkit-scrollbar{display:none}
.jh-rail>li{flex:none;scroll-snap-align:start;min-width:0}
.jh-rail:focus-visible,.jh-hero-rail:focus-visible{outline:2px solid var(--jh-green);outline-offset:-2px;border-radius:12px}

/* Category rail */
.jh-cat{width:76px}
.jh-cat a{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--jh-text);padding:2px 0}
.jh-cat__thumb{width:64px;height:64px;border-radius:16px;background:var(--jh-cream);border:1px solid var(--jh-line);display:flex;align-items:center;justify-content:center;overflow:hidden}
.jh-cat__img{width:100%;height:100%;object-fit:cover;display:block}
.jh-cat__initial{font-size:24px;font-weight:700;color:var(--jh-green)}
.jh-cat__name{font-size:12px;line-height:1.25;text-align:center;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em;word-break:break-word}
.jh-cat a:hover .jh-cat__thumb,.jh-cat a:focus-visible .jh-cat__thumb{border-color:var(--jh-green)}
a:focus-visible,button:focus-visible{outline:2px solid var(--jh-green);outline-offset:2px}

/* Quick chips */
.jh-chip{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid var(--jh-line);border-radius:999px;background:#fff;color:var(--jh-text);font-size:13px;font-weight:600;white-space:nowrap}
.jh-chip:hover{border-color:var(--jh-green);color:var(--jh-green)}

/* Product card */
.jh-products .jh-card,.jh-card{position:relative;display:flex;flex-direction:column;background:var(--jh-card);border:1px solid var(--jh-line);border-radius:12px;overflow:hidden;box-shadow:0 1px 2px rgba(60,50,30,.05);margin:0;list-style:none}
.jh-rail .jh-card{width:clamp(136px,41vw,190px);height:100%}
.jh-card__media{position:relative;display:block;aspect-ratio:1/1;background:var(--jh-cream);overflow:hidden}
.jh-card__img{display:block;width:100%;height:100%;object-fit:contain;margin:0;border-radius:0}
.jh-card__badge{position:absolute;top:6px;left:6px;background:var(--jh-orange);color:#fff;font-size:11px;font-weight:700;line-height:1;padding:4px 6px;border-radius:6px}
.jh-card__body{display:flex;flex-direction:column;flex:1;padding:8px 10px 10px;gap:2px}
.jh-card__title{margin:0;font-size:13px;line-height:1.3;font-weight:600;min-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.jh-card__title a{color:var(--jh-text)}
.jh-card__title a:hover{color:var(--jh-green)}
.jh-card__meta{margin:0;font-size:12px;line-height:1.3;min-height:1.3em;color:var(--jh-muted)}
.jh-card__price{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px;font-size:14px;font-weight:700;min-height:1.4em;margin-top:2px}
.jh-price__now .amount,.jh-price__now{color:var(--jh-text)}
.jh-price__was{font-size:12px;font-weight:400;color:var(--jh-muted)}
.jh-card__price del .amount{font-weight:400}
.jh-card__price ins{background:none;text-decoration:none}
.jh-card__action{margin-top:auto;padding-top:8px}
.jh-card.is-oos .jh-card__img{opacity:.5}

/* ADD / stepper */
.jh-add,.jh-opts,.jh-oos{display:flex;align-items:center;justify-content:center;width:100%;height:44px;border-radius:8px;font-size:13px;font-weight:700;letter-spacing:.03em;line-height:1;margin:0;padding:0;cursor:pointer;text-decoration:none}
.jh-add{background:#fff;color:var(--jh-green);border:1.5px solid var(--jh-green);transition:background-color .15s,color .15s}
.jh-add:hover{background:var(--jh-green-l)}
.jh-add:active{background:var(--jh-green);color:#fff}
.jh-opts{background:#fff;color:var(--jh-green);border:1.5px solid var(--jh-line)}
.jh-opts:hover{border-color:var(--jh-green)}
.jh-oos{color:var(--jh-muted);background:var(--jh-cream);border:1px solid var(--jh-line);cursor:default;font-weight:600;letter-spacing:0}
.jh-step{display:none;align-items:center;justify-content:space-between;width:100%;height:44px;border-radius:8px;background:var(--jh-green);color:#fff;overflow:hidden}
.jh-step button{flex:none;width:44px;height:44px;border:0;background:transparent;color:#fff;font-size:18px;font-weight:700;line-height:1;cursor:pointer;padding:0;margin:0;border-radius:0}
.jh-step button:hover{background:var(--jh-green-d)}
.jh-step button:disabled{opacity:.45;cursor:not-allowed;background:transparent}
.jh-step button:focus-visible{outline-color:#fff;outline-offset:-3px}
.jh-step__qty{font-size:14px;font-weight:700;min-width:1.5em;text-align:center}
.jh-card__action:not([data-qty="0"]) .jh-add{display:none}
.jh-card__action:not([data-qty="0"]) .jh-step{display:flex}

/* Grid (browse all) */
.jh-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--jh-gap);list-style:none;margin:0;padding:2px var(--jh-pad) 8px}
.jh-grid .jh-card{width:auto;height:100%}
.jh-more-wrap{margin:8px var(--jh-pad) 0;text-align:center}
.jh-more{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 24px;border:1.5px solid var(--jh-green);border-radius:999px;color:var(--jh-green);font-weight:700;font-size:14px;background:#fff}
.jh-more:hover{background:var(--jh-green-l)}
.jh-more[aria-busy="true"]{opacity:.6;pointer-events:none}

/* Trust */
.jh-trust{margin-bottom:0;padding:0 var(--jh-pad) calc(16px + var(--jh-bottom-space) + env(safe-area-inset-bottom,0px))}
.jh-trust__list{list-style:none;margin:0;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:var(--jh-cream);border:1px solid var(--jh-line);border-radius:14px}
.jh-trust__item{display:flex;align-items:flex-start;gap:8px;color:var(--jh-green)}
.jh-trust__item svg{flex:none;margin-top:1px}
.jh-trust__item span{display:flex;flex-direction:column;min-width:0}
.jh-trust__item strong{font-size:13px;line-height:1.25;color:var(--jh-text)}
.jh-trust__item small{font-size:12px;line-height:1.3;color:var(--jh-muted)}

/* Hero banners — add class "jh-hero-rail" to an Elementor container, "jh-hero-slide" to each child container */
.jh-hero-rail{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:12px!important;width:100%;max-width:var(--jh-max);margin-inline:auto!important;padding:10px var(--jh-pad)!important;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-inline:var(--jh-pad);overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;box-sizing:border-box;min-width:0}
.jh-hero-rail::-webkit-scrollbar{display:none}
.jh-hero-rail>.jh-hero-slide{flex:0 0 88%!important;width:88%!important;max-width:88%!important;min-width:0;scroll-snap-align:center;position:relative;background:var(--jh-cream);border:1px solid var(--jh-line);border-radius:16px;overflow:hidden;min-height:150px;padding:16px!important;box-sizing:border-box}
.jh-hero-rail>.jh-hero-slide:only-child{flex-basis:100%!important;width:100%!important;max-width:100%!important}
.jh-hero-slide img{max-width:100%;height:auto;display:block}
.jh-hero-slide .elementor-heading-title{color:var(--jh-text);line-height:1.2;margin:0}
.jh-hero-slide h1.elementor-heading-title,.jh-hero-slide h2.elementor-heading-title{font-size:22px;font-weight:700}
.jh-hero-slide .elementor-widget-text-editor{color:var(--jh-brown);font-size:14px;line-height:1.4}
.jh-hero-slide .elementor-button{background:var(--jh-green);color:#fff;border-radius:999px;padding:9px 18px;font-size:14px;font-weight:700;line-height:1.2}
.jh-hero-slide .elementor-button:hover{background:var(--jh-green-d);color:#fff}

/* Toast */
.jh-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--jh-bottom-space) + 84px + env(safe-area-inset-bottom,0px));z-index:40;max-width:min(92vw,360px);padding:10px 14px;border-radius:10px;background:var(--jh-green-d);color:#fff;font-size:13px;line-height:1.3;opacity:0;pointer-events:none;transition:opacity .2s}
.jh-toast.is-on{opacity:1}

/* Tablet */
@media (min-width:600px){
  .jh-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .jh-trust__list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* Desktop */
@media (min-width:1024px){
  :root{--jh-gap:14px;--jh-pad:20px}
  .jh-section{margin-bottom:28px}
  .jh-section__title{font-size:22px}
  .jh-rail{scrollbar-width:thin;scrollbar-color:var(--jh-line) transparent}
  .jh-rail::-webkit-scrollbar{display:block;height:6px}
  .jh-rail::-webkit-scrollbar-thumb{background:var(--jh-line);border-radius:3px}
  .jh-rail .jh-card{width:200px}
  .jh-cats{flex-wrap:wrap;overflow:visible}
  .jh-cat{width:96px}
  .jh-cat__thumb{width:76px;height:76px}
  .jh-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .jh-hero-rail>.jh-hero-slide{flex:0 0 calc(50% - 6px)!important;width:calc(50% - 6px)!important;max-width:calc(50% - 6px)!important;min-height:220px;padding:28px!important}
  .jh-hero-rail>.jh-hero-slide:only-child{flex-basis:100%!important;width:100%!important;max-width:100%!important}
  .jh-hero-slide h1.elementor-heading-title,.jh-hero-slide h2.elementor-heading-title{font-size:32px}
}
@media (min-width:1440px){.jh-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){.jh-add,.jh-toast{transition:none}.jh-rail,.jh-hero-rail{scroll-behavior:auto}}

/* ===== Phase 3: product UX ===== */
/* Hello Elementor styles bare <button>s (pink hover/focus). Neutralise for our controls. */
.jh-card__action button,.jh-sheet button{font-family:inherit;text-transform:none;box-shadow:none;-webkit-appearance:none;appearance:none;margin:0}
.jh-add:focus,.jh-add:active{background:var(--jh-green);color:#fff;border-color:var(--jh-green)}
.jh-add:hover:not(:active){background:var(--jh-green-l);color:var(--jh-green)}
.jh-step button:focus,.jh-step button:active{background:var(--jh-green-d);color:#fff}
.jh-step button:disabled:focus,.jh-step button:disabled:hover{background:transparent;color:#fff}
.jh-opts{background:#fff;color:var(--jh-green);border:1.5px solid var(--jh-green);gap:6px}
.jh-opts:hover,.jh-opts:focus,.jh-opts:active{background:var(--jh-green-l);color:var(--jh-green);border-color:var(--jh-green)}
.jh-opts__n{display:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--jh-green);color:#fff;font-size:12px;line-height:20px;text-align:center}
.jh-card__action:not([data-incart="0"]) .jh-opts__n{display:inline-block}
.jh-card__action.is-busy{cursor:progress}
.jh-card__action.is-busy .jh-step__qty{opacity:.75}
.jh-step__qty{transition:opacity .15s}
.jh-card__action .jh-oos[hidden],.jh-card__action [hidden]{display:none!important}

/* Bottom sheet (variation chooser) */
html.jh-lock{overflow:hidden}
.jh-sheet{position:fixed;inset:0;z-index:var(--jh-sheet-z,100000);display:flex;align-items:flex-end;justify-content:center}
.jh-sheet[hidden]{display:none}
.jh-sheet__bg{position:absolute;inset:0;background:rgba(45,40,25,.45)}
.jh-sheet__panel{position:relative;width:100%;max-width:480px;max-height:85vh;max-height:85dvh;display:flex;flex-direction:column;gap:12px;background:#fff;color:var(--jh-text);border-radius:16px 16px 0 0;padding:16px var(--jh-pad) calc(16px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 20px rgba(60,50,30,.15);transform:translateY(24px);opacity:0;transition:transform .2s ease,opacity .2s ease;outline:0}
.jh-sheet.is-open .jh-sheet__panel{transform:none;opacity:1}
.jh-sheet__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.jh-sheet__title{margin:0;font-size:17px;line-height:1.3;font-weight:700}
.jh-sheet__sub{margin:2px 0 0;font-size:13px;color:var(--jh-muted)}
.jh-sheet__x{flex:none;width:44px;height:44px;margin:-8px -8px 0 0;border:0;border-radius:50%;background:transparent;color:var(--jh-text);font-size:28px;line-height:1;cursor:pointer}
.jh-sheet__x:hover,.jh-sheet__x:focus{background:var(--jh-cream);color:var(--jh-text)}
.jh-sheet__list{display:flex;flex-direction:column;gap:8px;overflow-y:auto;overscroll-behavior:contain;padding:2px}
.jh-opt{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;border:1.5px solid var(--jh-line);border-radius:12px;cursor:pointer;background:#fff}
.jh-opt input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--jh-green)}
.jh-opt:has(input:checked){border-color:var(--jh-green);background:var(--jh-green-l)}
.jh-opt:has(input:focus-visible){outline:2px solid var(--jh-green);outline-offset:2px}
.jh-opt.is-oos{opacity:.6;cursor:not-allowed}
.jh-opt__name{flex:1;min-width:0;font-size:15px;font-weight:600}
.jh-opt__price{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-end;gap:2px 8px;font-size:14px;font-weight:700;text-align:right}
.jh-opt__off{font-size:11px;font-weight:700;color:var(--jh-orange)}
.jh-sheet__foot{margin:0;padding:0}
.jh-sheet__foot .jh-add,.jh-sheet__foot .jh-oos{height:48px;font-size:15px}
.jh-sheet__foot .jh-step,.jh-sheet__foot .jh-step button{height:48px}

/* Same card system inside native WooCommerce loops (shop, category, [products], related) */
.jh-hp ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--jh-gap);margin:0 0 20px!important;padding:0;list-style:none}
.jh-hp ul.products::before,.jh-hp ul.products::after{display:none!important}
.jh-hp ul.products li.product{float:none!important;width:auto!important;margin:0!important;padding:0!important;display:flex;flex-direction:column;position:relative;background:#fff;border:1px solid var(--jh-line);border-radius:12px;overflow:hidden;text-align:left;box-shadow:0 1px 2px rgba(60,50,30,.05)}
.jh-hp ul.products li.product a.woocommerce-LoopProduct-link{display:block;color:inherit;text-decoration:none}
.jh-hp ul.products li.product img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;background:var(--jh-cream);margin:0}
.jh-hp ul.products li.product .woocommerce-loop-product__title{margin:0;padding:8px 10px 0;font-size:13px;line-height:1.3;font-weight:600;min-height:calc(2.6em + 8px);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--jh-text)}
.jh-hp ul.products li.product .price{display:block;padding:2px 10px 0;font-size:14px;font-weight:700;color:var(--jh-text)}
.jh-hp ul.products li.product .price del{font-size:12px;font-weight:400;color:var(--jh-muted);margin-right:4px}
.jh-hp ul.products li.product .price ins{background:none;text-decoration:none}
.jh-hp ul.products li.product .jh-card__action{margin-top:auto;padding:8px 10px 10px}
.jh-hp ul.products li.product .onsale{position:absolute;top:6px;left:6px;right:auto;margin:0;min-width:0;min-height:0;line-height:1;padding:4px 6px;border-radius:6px;background:var(--jh-orange);color:#fff;font-size:11px;font-weight:700}
@media (min-width:600px){.jh-hp ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1024px){
  .jh-hp ul.products{grid-template-columns:repeat(4,minmax(0,1fr))}
  .jh-sheet{align-items:center}
  .jh-sheet__panel{border-radius:16px;transform:translateY(12px)}
}
@media (min-width:1440px){.jh-hp ul.products{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){.jh-sheet__panel,.jh-step__qty{transition:none;transform:none}}
