/*
Theme Name: Haat Commerce
Theme URI: https://example.com/haat-commerce
Author: WooCommerce Automation Platform
Description: Mobile-first WooCommerce theme with a point-and-click Store Setup screen (logo, colors, menu icons, drag-and-drop homepage). Settings are validated; no code editing is exposed.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
WC requires at least: 8.0
License: GPL-2.0-or-later
Text Domain: haat
*/

/* ---------- tokens (overridden by Store Setup via inline CSS) ---------- */
:root{
  --haat-primary:#0F4C45;--haat-on-primary:#fff;--haat-secondary:#10201E;--haat-on-secondary:#fff;--haat-accent:#F2A900;--haat-on-accent:#10201E;
  --haat-sale:#D6361F;--haat-bg:#F6F8F7;--haat-surface:#fff;--haat-line:#D9E1DE;--haat-muted:#5B6B68;
  --haat-font:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;--haat-radius:6px;--haat-logo-h:40px;
  --haat-gap:12px;--haat-wrap:1240px;--haat-side:232px;--haat-tab-h:60px;
}
@media (min-width:640px){:root{--haat-gap:20px}}
@media (min-width:1024px){:root{--haat-gap:24px}}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--haat-bg);color:var(--haat-secondary);font:16px/1.55 var(--haat-font);-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:var(--haat-primary)}
[hidden]{display:none!important}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--haat-accent);outline-offset:2px}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}
.skip-link:focus{clip:auto;width:auto;height:auto;background:#fff;padding:8px 14px;z-index:1000;top:8px;left:8px}
.haat-wrap{max-width:var(--haat-wrap);margin:0 auto;padding:0 var(--haat-gap)}
h1,h2,h3{line-height:1.2;letter-spacing:-.01em;margin:0 0 .5em}
h1{font-size:clamp(1.5rem,5vw,2.4rem);font-weight:800}
h2{font-size:clamp(1.15rem,3.4vw,1.6rem);font-weight:750}

/* iOS: 16px inputs stop auto-zoom; 44px touch targets */
input,select,textarea{font:inherit;font-size:16px}
.haat-btn,.button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:0;border-radius:var(--haat-radius);
  background:var(--haat-primary);color:var(--haat-on-primary);font:600 .95rem var(--haat-font);text-decoration:none;cursor:pointer;line-height:1.2}
.haat-btn:hover,.button:hover,.woocommerce a.button:hover,.woocommerce button.button:hover{background:var(--haat-secondary);color:var(--haat-on-secondary)}
.haat-btn--accent,.woocommerce a.button.alt,.woocommerce button.button.alt{background:var(--haat-accent);color:var(--haat-on-accent)}
.haat-btn--accent:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover{background:var(--haat-secondary);color:var(--haat-on-secondary)}

/* ---------- header / navbar ---------- */
.haat-header{--h-bg:var(--haat-primary);--h-fg:var(--haat-on-primary);background:var(--h-bg);color:var(--h-fg);position:sticky;top:0;z-index:50;padding-top:env(safe-area-inset-top,0)}
.haat-navstyle-light .haat-header{--h-bg:#fff;--h-fg:var(--haat-secondary);border-bottom:1px solid var(--haat-line)}
.haat-navstyle-dark .haat-header{--h-bg:var(--haat-secondary);--h-fg:var(--haat-on-secondary)}
.haat-header a{color:var(--h-fg);text-decoration:none}
.admin-bar .haat-header{top:46px}
@media (min-width:783px){.admin-bar .haat-header{top:32px}}
.haat-header__top{display:grid;grid-template-columns:1fr auto;grid-template-areas:"brand actions" "search search";align-items:center;gap:8px var(--haat-gap);padding:8px var(--haat-gap);max-width:var(--haat-wrap);margin:0 auto}
.haat-brand{grid-area:brand;display:inline-flex;align-items:center;font-weight:800;font-size:1.3rem;min-height:44px}
.haat-logo{height:var(--haat-logo-h);width:auto;max-width:200px;object-fit:contain}
.haat-brand__text{white-space:nowrap}
.haat-search{grid-area:search;display:flex;width:100%}
.haat-search input[type=search]{flex:1;min-width:0;min-height:44px;border:1px solid var(--haat-line);border-right:0;border-radius:var(--haat-radius) 0 0 var(--haat-radius);padding:0 12px;background:#fff;color:var(--haat-secondary)}
.haat-search button{min-height:44px;padding:0 16px;border:0;border-radius:0 var(--haat-radius) var(--haat-radius) 0;background:var(--haat-accent);color:var(--haat-on-accent);font-weight:700;cursor:pointer}
.haat-actions{grid-area:actions;display:flex;gap:2px;align-items:center}
.haat-actions a{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;justify-content:center;border-radius:var(--haat-radius);font-weight:600}
.haat-actions a:hover{background:rgba(127,127,127,.18)}
.haat-label{display:none}
.haat-cart-count{background:var(--haat-accent);color:var(--haat-on-accent);border-radius:99px;min-width:20px;height:20px;padding:0 5px;display:inline-grid;place-items:center;font-size:.75rem;font-weight:700;line-height:1}
.haat-actions .haat-cart-count{position:absolute;top:2px;right:0}

/* Menu row: hidden on phones (tab bar is used instead), scrollable on tablets */
.haat-nav{display:none}
.haat-nav ul{list-style:none;margin:0 auto;padding:0 var(--haat-gap);max-width:var(--haat-wrap);display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.haat-nav ul::-webkit-scrollbar{display:none}
.haat-nav a{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;font-weight:600;white-space:nowrap;border-radius:var(--haat-radius)}
.haat-nav a:hover{background:rgba(127,127,127,.18)}
.haat-nav a[aria-current=page]{background:rgba(127,127,127,.26)}

/* Tablet 640+: logo, search and actions on one row, menu row under it */
@media (min-width:640px){
  .haat-header__top{grid-template-columns:auto minmax(200px,1fr) auto;grid-template-areas:"brand search actions"}
  .haat-label{display:inline}
  .haat-actions .haat-cart-count{position:static}
  .haat-nav{display:block;border-top:1px solid rgba(127,127,127,.25)}
}

/* Vertical (left) navbar: desktops 1024+ only. Smaller screens fall back to the top layout above. */
@media (min-width:1024px){
  .haat-nav-left .haat-header{position:fixed;left:0;top:0;bottom:0;width:var(--haat-side);overflow-y:auto;display:flex;flex-direction:column;z-index:60}
  .admin-bar.haat-nav-left .haat-header{top:32px}
  .haat-nav-left .haat-header__top{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:20px 16px 8px;max-width:none;margin:0}
  .haat-nav-left .haat-actions{order:3;flex-direction:column;align-items:stretch}
  .haat-nav-left .haat-actions a{justify-content:flex-start}
  .haat-nav-left .haat-actions .haat-cart-count{position:static;margin-left:auto}
  .haat-nav-left .haat-nav{display:block;border:0;flex:1}
  .haat-nav-left .haat-nav ul{flex-direction:column;overflow:visible;padding:8px 12px;max-width:none}
  .haat-nav-left .haat-page{margin-left:var(--haat-side)}
  .haat-nav-left .haat-footer{margin-left:0}
}

/* Phone bottom tab bar */
.haat-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:70;display:flex;background:#fff;border-top:1px solid var(--haat-line);padding-bottom:env(safe-area-inset-bottom,0);box-shadow:0 -2px 12px rgba(0,0,0,.06)}
.haat-tabbar a{flex:1;min-width:0;min-height:var(--haat-tab-h);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--haat-muted);text-decoration:none;font-size:.7rem;font-weight:600}
.haat-tabbar a span:not(.haat-cart-count){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 2px}
.haat-tabbar a[aria-current=page]{color:var(--haat-primary)}
.haat-tabbar .haat-cart-count{position:absolute;top:6px;left:calc(50% + 6px)}
@media (max-width:639.98px){body{padding-bottom:calc(var(--haat-tab-h) + env(safe-area-inset-bottom,0))}}
@media (min-width:640px){.haat-tabbar{display:none}}

.haat-announce{background:var(--haat-secondary);color:var(--haat-on-secondary);font-size:.85rem;text-align:center;padding:8px var(--haat-gap)}

/* ---------- homepage sections ---------- */
.haat-section{padding:16px 0}
@media (min-width:1024px){.haat-section{padding:28px 0}}
.haat-section__head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.haat-section__head h2{margin:0;display:flex;align-items:center;gap:8px}
.haat-section__head a{font-weight:600;white-space:nowrap}

/* Banner: swipeable on touch, auto-advances on desktop */
.haat-slides{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;border-radius:var(--haat-radius)}
.haat-slides::-webkit-scrollbar{display:none}
.haat-slide{position:relative;flex:0 0 100%;scroll-snap-align:start;display:block;aspect-ratio:16/9;border-radius:var(--haat-radius);overflow:hidden;background:var(--haat-primary);color:var(--haat-on-primary);text-decoration:none}
@media (min-width:640px){.haat-slide{aspect-ratio:2.6/1}}
@media (min-width:1024px){.haat-slide{aspect-ratio:3.2/1}}
.haat-slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.haat-slide__copy{position:absolute;inset:auto 0 0 0;display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px var(--haat-gap);background:linear-gradient(transparent,rgba(0,0,0,.65));color:#fff}
.haat-slide__copy strong{font-size:clamp(1.1rem,4vw,2rem);line-height:1.15}
.haat-slide__copy .haat-btn{min-height:38px;font-size:.85rem}

/* Category circles: swipe row on phones, wrapping grid on larger screens */
.haat-cats{display:flex;gap:14px;overflow-x:auto;scrollbar-width:none;padding-bottom:4px;scroll-snap-type:x proximity}
.haat-cats::-webkit-scrollbar{display:none}
.haat-cat{flex:0 0 76px;display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;color:var(--haat-secondary);font-size:.8rem;font-weight:600;text-align:center;scroll-snap-align:start}
.haat-cat__img{width:68px;height:68px;border-radius:50%;overflow:hidden;background:var(--haat-surface);border:2px solid var(--haat-line);display:grid;place-items:center}
.haat-cat:hover .haat-cat__img{border-color:var(--haat-primary)}
.haat-cat__img img{width:100%;height:100%;object-fit:cover}
.haat-cat__ph{font-size:1.5rem;font-weight:800;color:var(--haat-primary)}
.haat-cat__name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25}
@media (min-width:640px){.haat-cats{flex-wrap:wrap;overflow:visible;gap:18px}.haat-cat{flex-basis:96px;font-size:.88rem}.haat-cat__img{width:84px;height:84px}}

/* ---------- product grid + hang-tag cards ---------- */
.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 1.5em;padding:0;list-style:none}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
@media (min-width:640px){.woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--haat-gap)}}
@media (min-width:1024px){.woocommerce ul.products{grid-template-columns:repeat(4,minmax(0,1fr))}.haat-nav-left .woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1360px){.haat-nav-left .woocommerce ul.products{grid-template-columns:repeat(4,minmax(0,1fr))}}
.woocommerce ul.products li.product{float:none!important;width:auto!important;margin:0!important;position:relative;background:var(--haat-surface);border:1px solid var(--haat-line);border-radius:var(--haat-radius);padding:8px;display:flex;flex-direction:column;min-width:0}
@media (min-width:640px){.woocommerce ul.products li.product{padding:12px}}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{display:block;flex:1;color:inherit;text-decoration:none}
.woocommerce ul.products li.product img{aspect-ratio:1/1;object-fit:cover;border-radius:4px;margin:0 0 8px;width:100%}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.9rem;font-weight:600;padding:0;margin:0 0 4px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.woocommerce ul.products li.product .price{display:block;font-weight:800;font-size:1rem;color:var(--haat-primary);margin:4px 0 8px}
.woocommerce ul.products li.product .price del{color:var(--haat-muted);font-weight:400;font-size:.82rem;display:block}
.woocommerce ul.products li.product .price ins{text-decoration:none}
.woocommerce ul.products li.product .button{width:100%;margin-top:auto;min-height:40px;padding:0 10px;font-size:.88rem}
.woocommerce span.onsale{position:absolute;top:12px;left:-1px;right:auto;min-height:0;min-width:0;margin:0;padding:4px 12px 4px 8px;border-radius:0 99px 99px 0;background:var(--haat-sale);color:#fff;font-weight:700;font-size:.78rem;line-height:1.2;z-index:2}
.haat-stock{font-size:.78rem;margin:0 0 6px;color:var(--haat-muted)}
.haat-stock--out{color:var(--haat-sale)}

/* Category sections become a swipe rail on phones */
@media (max-width:639.98px){
  .haat-rail .woocommerce ul.products{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;margin-right:calc(var(--haat-gap) * -1);padding-right:var(--haat-gap);scrollbar-width:none}
  .haat-rail .woocommerce ul.products::-webkit-scrollbar{display:none}
  .haat-rail .woocommerce ul.products li.product{flex:0 0 46%!important;scroll-snap-align:start}
}

/* ---------- single product, cart, checkout ---------- */
.haat-main{padding:16px 0 32px}
.haat-content{background:var(--haat-surface);padding:16px;border-radius:var(--haat-radius);border:1px solid var(--haat-line)}
@media (min-width:640px){.haat-content{padding:28px}}
.woocommerce div.product{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
@media (min-width:768px){.woocommerce div.product{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px}}
.woocommerce div.product div.images,.woocommerce div.product div.summary{float:none!important;width:auto!important;margin:0}
.woocommerce div.product .woocommerce-tabs,.woocommerce div.product .related,.woocommerce div.product .upsells{grid-column:1/-1}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--haat-primary);font-size:1.5rem;font-weight:800}
.woocommerce div.product form.cart{display:flex;gap:10px;flex-wrap:wrap}
.woocommerce div.product form.cart .single_add_to_cart_button{flex:1 1 180px}
.woocommerce .quantity .qty{min-height:44px;width:76px;border:1px solid var(--haat-line);border-radius:var(--haat-radius);padding:0 8px}
.woocommerce-ordering select{min-height:44px;border:1px solid var(--haat-line);border-radius:var(--haat-radius);padding:0 10px;max-width:100%}
.woocommerce form .form-row input.input-text,.woocommerce form .form-row select,.woocommerce form .form-row textarea{min-height:44px;border:1px solid var(--haat-line);border-radius:var(--haat-radius);padding:8px 12px;width:100%}
.woocommerce-breadcrumb{font-size:.85rem;color:var(--haat-muted);margin:0 0 12px}
.woocommerce-message,.woocommerce-info,.woocommerce-error{border-radius:var(--haat-radius)}
.woocommerce table.shop_table{border-radius:var(--haat-radius)}
.woocommerce-cart .cart-collaterals .cart_totals,.woocommerce-cart .cart-collaterals{width:100%!important;float:none!important}
.woocommerce-checkout #payment .place-order .button,.woocommerce .wc-proceed-to-checkout a.checkout-button{width:100%;min-height:48px}
.woocommerce #customer_details .col-1,.woocommerce #customer_details .col-2{float:none!important;width:100%!important}
@media (max-width:767.98px){.woocommerce div.product .woocommerce-tabs ul.tabs{display:flex;overflow-x:auto}}
.haat-video{aspect-ratio:16/9;width:100%;border:0;border-radius:var(--haat-radius);margin:8px 0}

/* ---------- footer ---------- */
.haat-footer{background:var(--haat-secondary);color:var(--haat-on-secondary);margin-top:24px}
.haat-footer a{color:inherit}
.haat-footer__grid{display:grid;grid-template-columns:1fr;gap:20px;padding-top:28px;padding-bottom:20px}
@media (min-width:640px){.haat-footer__grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.haat-footer__grid{grid-template-columns:2fr 1fr 1fr}}
.haat-footer ul{list-style:none;margin:0;padding:0}
.haat-footer li{margin:2px 0}
.haat-footer li a{display:inline-block;padding:8px 0}
.haat-footer h3{font-size:1rem}
.haat-footer__base{border-top:1px solid rgba(127,127,127,.35);padding-top:14px;padding-bottom:14px;font-size:.85rem}

@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* ---------- menu buttons that open category panels ---------- */
.haat-navbtn{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;font:inherit;font-weight:600;white-space:nowrap;border-radius:var(--haat-radius);background:none;border:0;color:inherit;cursor:pointer}
.haat-header .haat-navbtn{color:var(--h-fg)}
.haat-navbtn:hover{background:rgba(127,127,127,.18)}
.haat-navbtn[aria-expanded=true]{background:rgba(127,127,127,.26)}
.haat-nav-left .haat-nav .haat-navbtn{width:100%}
.haat-tabbar .haat-navbtn{flex:1;min-width:0;min-height:var(--haat-tab-h);flex-direction:column;justify-content:center;gap:2px;color:var(--haat-muted);font-size:.7rem;padding:0;border-radius:0}
.haat-tabbar .haat-navbtn span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.haat-tabbar .haat-navbtn[aria-expanded=true]{color:var(--haat-primary);background:none}

/* ---------- slide-in category panels ---------- */
.haat-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:90;opacity:0;visibility:hidden;transition:opacity .2s}
.haat-overlay.is-open{opacity:1;visibility:visible}
.haat-drawer{position:fixed;top:0;bottom:0;width:min(88vw,360px);background:#fff;color:var(--haat-secondary);z-index:100;display:flex;flex-direction:column;visibility:hidden;transition:transform .25s ease,visibility .25s;padding-bottom:env(safe-area-inset-bottom,0)}
.haat-drawer--left{left:0;transform:translateX(-100%)}
.haat-drawer--right{right:0;transform:translateX(100%)}
.haat-drawer.is-open{transform:none;visibility:visible}
.haat-drawer__head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top,0)) 8px 10px 16px;background:var(--haat-primary);color:var(--haat-on-primary)}
.haat-drawer__head h2{margin:0;font-size:1.1rem}
.haat-drawer__close{min-width:44px;min-height:44px;display:grid;place-items:center;background:none;border:0;color:inherit;cursor:pointer;border-radius:var(--haat-radius)}
.haat-drawer__close:hover{background:rgba(127,127,127,.3)}
.haat-drawer__body{overflow-y:auto;flex:1;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.haat-drawer__all{display:block;padding:14px 16px;font-weight:700;color:var(--haat-primary);text-decoration:none;border-bottom:1px solid var(--haat-line)}
.haat-drawer__empty{padding:16px;color:var(--haat-muted)}
.haat-tree,.haat-tree ul{list-style:none;margin:0;padding:0}
.haat-tree li{border-bottom:1px solid var(--haat-line)}
.haat-tree__row{display:flex;align-items:stretch}
.haat-tree__row a{flex:1;min-width:0;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;color:inherit;text-decoration:none;font-weight:600}
.haat-tree__row a:hover{background:var(--haat-bg)}
.haat-tree__toggle{flex:none;width:52px;display:grid;place-items:center;background:none;border:0;border-left:1px solid var(--haat-line);cursor:pointer;color:inherit}
.haat-tree__toggle svg{transition:transform .2s}
.haat-tree li.is-open>.haat-tree__row .haat-tree__toggle svg{transform:rotate(180deg)}
.haat-tree ul{display:none;background:var(--haat-bg)}
.haat-tree li.is-open>ul{display:block}
.haat-tree--2 a{padding-left:32px;font-weight:500}
.haat-tree--3 a{padding-left:48px;font-weight:400}
.haat-count{color:var(--haat-muted);font-weight:400;font-size:.85rem}
body.haat-drawer-lock{overflow:hidden}

/* ---------- panel variants: top-down sheet and dropdown under the button ---------- */
.haat-overlay.is-clear{background:transparent}
.haat-drawer--top{left:0;right:0;top:0;bottom:auto;width:auto;max-height:85vh;transform:translateY(-100%)}
.haat-drawer--top.is-open{transform:none}
.haat-drawer--dropdown{left:0;top:0;bottom:auto;right:auto;width:min(360px,92vw);border-radius:var(--haat-radius);box-shadow:0 12px 32px rgba(0,0,0,.28);transform:translateY(-8px);opacity:0;transition:opacity .15s,transform .15s,visibility .15s;overflow:hidden}
.haat-drawer--dropdown.is-open{transform:none;opacity:1}
.haat-drawer--dropdown .haat-drawer__head{padding-top:6px;padding-bottom:6px}
.haat-drawer__search{padding:16px}
.haat-drawer__search .haat-search{max-width:none}

/* ---------- product video (YouTube, loads only when played) ---------- */
.haat-yt{position:relative;aspect-ratio:16/9;max-width:820px;margin:0 0 20px;border-radius:var(--haat-radius);overflow:hidden;background:#000}
.haat-yt__play,.haat-yt iframe{position:absolute;inset:0;width:100%;height:100%;border:0;padding:0;margin:0;background:none;cursor:pointer;display:block}
.haat-yt__play img{width:100%;height:100%;object-fit:cover;opacity:.92}
.haat-yt__btn{position:absolute;left:50%;top:50%;width:68px;height:68px;margin:-34px 0 0 -34px;border-radius:50%;display:grid;place-items:center;background:var(--haat-accent);color:var(--haat-on-accent);box-shadow:0 4px 16px rgba(0,0,0,.35)}
.haat-yt__play:hover .haat-yt__btn{transform:scale(1.06)}

/* ---------- product gallery: pictures + video in the owner's order ---------- */
.haat-media{min-width:0}
.haat-gallery{max-width:640px}
.haat-gallery__stage{position:relative}
.haat-gallery__track{position:relative;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;border:1px solid var(--haat-line);border-radius:var(--haat-radius);background:var(--haat-surface);outline-offset:2px}
.haat-gallery__track::-webkit-scrollbar{display:none}
.haat-gallery__item{flex:0 0 100%;scroll-snap-align:center;aspect-ratio:1/1;display:grid;place-items:center;background:var(--haat-surface);position:relative;overflow:hidden}
.haat-gallery__item[data-type=video]{background:#000}
.haat-gallery__img{width:100%;height:100%;object-fit:contain}
.haat-gallery__item .haat-yt{width:100%;margin:0;border-radius:0}
.haat-gallery__nav{display:none;position:absolute;top:50%;margin-top:-22px;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--haat-secondary);box-shadow:0 2px 8px rgba(0,0,0,.25);cursor:pointer;place-items:center}
.haat-gallery__prev{left:8px}.haat-gallery__next{right:8px}
@media (hover:hover) and (min-width:768px){.haat-gallery__nav{display:grid}}
.haat-gallery__thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;scrollbar-width:thin;padding-bottom:4px}
.haat-gallery__thumb{position:relative;flex:0 0 64px;width:64px;height:64px;padding:0;border:2px solid var(--haat-line);border-radius:var(--haat-radius);background:#fff;cursor:pointer;overflow:hidden}
.haat-gallery__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.haat-gallery__thumb.is-active{border-color:var(--haat-primary)}
.haat-gallery__badge{position:absolute;inset:auto 4px 4px auto;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--haat-accent);color:var(--haat-on-accent)}
@media (min-width:768px){.haat-gallery__thumb{flex-basis:72px;width:72px;height:72px}}
