/* Sarwans Hyperlocal Experience & Quick-Commerce UI */
:root{
  --shq-primary:#00a859;
  --shq-primary-dark:#08783f;
  --shq-ink:#111827;
  --shq-muted:#6b7280;
  --shq-line:#eceff3;
  --shq-bg:#f6f8fb;
  --shq-red:#d92d20;
  --shq-orange:#e8710a;
  --shq-amber:#b7791f;
  --shq-blue:#1d6fd6;
  --shq-dark:#1f2937;
  --shq-nav-offset:68px;
}
.shq-card *,.shq-layout *,.shq-modal *,.shq-gate *,.shq-empty *{box-sizing:border-box}

/* ---------- Status badges (all product photos) ---------- */
.shq-badge{position:absolute;top:6px;left:6px;z-index:3;max-width:calc(100% - 12px);padding:3px 7px;border-radius:999px;font:700 10px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;letter-spacing:.02em;text-transform:uppercase;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.shq-badge--red{background:var(--shq-red)}
.shq-badge--dark{background:var(--shq-dark)}
.shq-badge--orange{background:var(--shq-orange)}
.shq-badge--amber{background:var(--shq-amber)}
.shq-badge--blue{background:var(--shq-blue)}
ul.products li.product,.woocommerce-product-gallery__image{position:relative}
.shq-btn-disabled{opacity:.6;cursor:not-allowed;pointer-events:none}

/* ---------- Status banner on product page ---------- */
.shq-banner{display:flex;flex-direction:column;gap:2px;margin:0 0 14px;padding:10px 14px;border-radius:10px;border-left:4px solid;background:#fff;font-size:14px;line-height:1.4}
.shq-banner strong{font-size:14px}
.shq-tone-red{border-color:var(--shq-red);background:#fef3f2;color:#912018}
.shq-tone-dark{border-color:var(--shq-dark);background:#f3f4f6;color:var(--shq-dark)}
.shq-tone-orange{border-color:var(--shq-orange);background:#fff4e5;color:#8a4b00}
.shq-tone-amber{border-color:var(--shq-amber);background:#fffaeb;color:#7a4f0a}
.shq-tone-blue{border-color:var(--shq-blue);background:#eff6ff;color:#14468f}

/* ---------- Buttons ---------- */
.shq-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 20px;border:0;border-radius:12px;background:var(--shq-primary);color:#fff;font:700 15px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-decoration:none;cursor:pointer}
.shq-btn:hover{background:var(--shq-primary-dark);color:#fff}
.shq-btn--ghost{background:#fff;color:var(--shq-primary-dark);border:1.5px solid var(--shq-primary)}
.shq-btn--ghost:hover{background:#f0fbf5;color:var(--shq-primary-dark)}

/* ---------- Layout (shop / category / tag only) ---------- */
body.shq-qc .woocommerce-products-header,body.shq-qc .woocommerce-breadcrumb,body.shq-qc .woocommerce-result-count,body.shq-qc .woocommerce-ordering{display:none!important}
body.shq-qc .shq-layout{display:flex;align-items:flex-start;width:100%;max-width:2400px;margin:0 auto;background:var(--shq-bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--shq-ink)}
body.shq-fullwidth.shq-qc .shq-layout{width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}

.shq-rail{flex:0 0 72px;width:72px;position:sticky;top:0;align-self:flex-start;max-height:100vh;overflow-y:auto;overscroll-behavior:contain;background:#fff;border-right:1px solid var(--shq-line);scrollbar-width:none}
.shq-rail::-webkit-scrollbar{display:none}
.shq-rail ul{list-style:none;margin:0;padding:6px 0}
.shq-rail li{margin:0;padding:0}
.shq-rail a{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;color:var(--shq-ink);text-decoration:none;border-left:3px solid transparent}
.shq-rail li.is-active a{background:#eefbf3;border-left-color:var(--shq-primary);font-weight:700}
.shq-rail__ico{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:#f1f5f9;overflow:hidden}
.shq-rail__ico img{width:100%;height:100%;object-fit:cover;display:block}
.shq-rail__ico b{font-size:18px;color:var(--shq-primary-dark)}
.shq-rail__name{display:block;width:100%;font-size:10.5px;line-height:1.2;text-align:center;overflow-wrap:anywhere}

.shq-main{flex:1 1 auto;min-width:0;padding:10px 8px 96px}
.shq-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
.shq-head__title{font-size:18px;font-weight:800;line-height:1.2}
.shq-head__sub{font-size:12px;color:var(--shq-muted);margin-top:2px}
.shq-loc-chip{display:inline-flex;align-items:center;gap:5px;max-width:48%;padding:6px 10px;border:1px solid var(--shq-line);border-radius:999px;background:#fff;color:var(--shq-ink);font-size:12px;font-weight:600;cursor:pointer}
.shq-loc-chip svg{flex:none;color:var(--shq-primary)}
.shq-loc-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- Grid ---------- */
ul.shq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
ul.shq-grid::before,ul.shq-grid::after{display:none}
@media (min-width:600px){ul.shq-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}}
@media (min-width:1024px){.shq-rail{flex-basis:104px;width:104px}.shq-rail__name{font-size:12px}.shq-main{padding:16px 16px 40px}.shq-head__title{font-size:22px}ul.shq-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}}
@media (min-width:1600px){ul.shq-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}}

/* ---------- Card ---------- */
.shq-card{position:relative;display:flex;flex-direction:column;margin:0!important;padding:0!important;width:auto!important;float:none!important;background:#fff;border:1px solid var(--shq-line);border-radius:12px;overflow:hidden}
.shq-card__media{position:relative;display:block;aspect-ratio:1/1;background:#fff;overflow:hidden}
.shq-card__img{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain;padding:6px;margin:0!important}
.shq-ribbon{position:absolute;top:0;right:0;z-index:2;padding:3px 7px 4px 9px;border-bottom-left-radius:10px;background:var(--shq-primary);color:#fff;font:800 9.5px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
.shq-card__body{display:flex;flex-direction:column;flex:1;gap:3px;padding:6px 8px 8px}
.shq-eta{display:inline-flex;align-items:center;gap:3px;align-self:flex-start;padding:2px 6px;border-radius:6px;background:#f1f5f9;color:#374151;font-size:9.5px;font-weight:800;letter-spacing:.02em;text-transform:uppercase}
.shq-card__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;min-height:2.6em;font-size:12.5px;font-weight:600;line-height:1.3;color:var(--shq-ink);text-decoration:none}
.shq-card__unit{font-size:11px;color:var(--shq-muted);line-height:1.2}
.shq-card__foot{display:flex;align-items:flex-end;justify-content:space-between;gap:6px;margin-top:auto;padding-top:4px}
.shq-price{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.shq-sp{font-size:13.5px;font-weight:800;color:var(--shq-ink)}
.shq-sp small{font-size:9.5px;font-weight:600;color:var(--shq-muted)}
.shq-sp .woocommerce-Price-amount{font-weight:800}
.shq-mrp{font-size:11px;color:var(--shq-muted);text-decoration:line-through}
.shq-mrp .woocommerce-Price-amount{font-weight:400}
.shq-card.is-off .shq-card__img{filter:grayscale(.85);opacity:.65}

/* ---------- ADD button and stepper ---------- */
.shq-act{flex:none;position:relative;min-width:62px;display:flex;justify-content:flex-end}
.shq-add{display:inline-flex;align-items:center;justify-content:center;min-width:62px;height:30px;padding:0 10px;border:1.5px solid var(--shq-primary);border-radius:8px;background:#f0fbf5;color:var(--shq-primary-dark);font:800 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-transform:uppercase;text-decoration:none;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.shq-add:active{transform:scale(.96)}
.shq-add--opts{font-size:10.5px}
.shq-add.is-off{border-color:#d1d5db;background:#f3f4f6;color:#9ca3af}
.shq-step{display:inline-flex;align-items:center;justify-content:space-between;min-width:72px;height:30px;border-radius:8px;background:var(--shq-primary);color:#fff;overflow:hidden}
.shq-step[hidden]{display:none}
.shq-step button{width:24px;height:30px;padding:0;border:0;background:transparent;color:#fff;font:700 16px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;cursor:pointer;touch-action:manipulation}
.shq-step span{min-width:18px;text-align:center;font:800 12.5px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
.shq-card.has-qty .shq-add:not(.is-off){display:none}

@media (max-width:359px){
  .shq-rail{flex-basis:62px;width:62px}
  .shq-rail__ico{width:38px;height:38px}
  .shq-main{padding:8px 6px 96px}
  ul.shq-grid{gap:6px}
  .shq-card__body{padding:5px 6px 7px}
  .shq-card__title{font-size:11.5px}
  .shq-add,.shq-act{min-width:54px}
  .shq-step{min-width:64px}
  .shq-eta{font-size:9px}
}

/* ---------- Mobile pills variant ---------- */
@media (max-width:767px){
  body.shq-nav-pills .shq-layout{flex-direction:column}
  body.shq-nav-pills .shq-rail{position:sticky;top:0;z-index:20;flex:none;width:100%;max-height:none;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--shq-line)}
  body.shq-nav-pills .shq-rail ul{display:flex;gap:6px;padding:8px}
  body.shq-nav-pills .shq-rail a{flex-direction:row;gap:6px;padding:6px 12px;border:1px solid var(--shq-line);border-radius:999px;border-left-width:1px;white-space:nowrap}
  body.shq-nav-pills .shq-rail li.is-active a{border-color:var(--shq-primary)}
  body.shq-nav-pills .shq-rail__ico{display:none}
  body.shq-nav-pills .shq-rail__name{width:auto;font-size:12.5px}
  body.shq-nav-pills .shq-main{width:100%}
}

/* ---------- Empty state / gate ---------- */
.shq-empty,.shq-gate__card{max-width:440px;margin:40px auto;padding:32px 22px;text-align:center;background:#fff;border:1px solid var(--shq-line);border-radius:16px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--shq-ink)}
.shq-empty h2,.shq-gate__card h1{margin:10px 0 6px;font-size:20px;font-weight:800;line-height:1.25}
.shq-empty p,.shq-gate__card p{margin:0 0 18px;color:var(--shq-muted);font-size:14px;line-height:1.5}
.shq-empty__ico,.shq-gate__ico{color:var(--shq-red)}
.shq-gate{padding:24px 14px}
.shq-gate__actions{display:flex;flex-direction:column;gap:10px}

/* ---------- Toast + cart bar ---------- */
.shq-toast{position:fixed;left:50%;bottom:calc(var(--shq-nav-offset) + 70px + env(safe-area-inset-bottom,0px));z-index:100001;max-width:min(92vw,420px);padding:10px 16px;border-radius:12px;background:#111827;color:#fff;font:600 13.5px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-align:center;opacity:0;transform:translate(-50%,10px);pointer-events:none;transition:opacity .2s,transform .2s}
.shq-toast.is-on{opacity:1;transform:translate(-50%,0)}
.shq-cartbar{position:fixed;left:10px;right:10px;bottom:calc(var(--shq-nav-offset) + 8px + env(safe-area-inset-bottom,0px));z-index:100000;display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:520px;margin:0 auto;padding:11px 16px;border-radius:14px;background:var(--shq-primary);color:#fff;font:700 14px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-decoration:none;box-shadow:0 6px 20px rgba(0,0,0,.18)}
.shq-cartbar:hover{color:#fff;background:var(--shq-primary-dark)}
.shq-cartbar[hidden]{display:none}
.shq-cartbar .woocommerce-Price-amount{color:#fff}
@media (min-width:768px){:root{--shq-nav-offset:0px}.shq-cartbar{left:auto;right:20px;margin:0}}

/* ---------- Location modal (bottom sheet) ---------- */
.shq-modal{position:fixed;inset:0;z-index:100002;display:flex;align-items:flex-end;justify-content:center;background:rgba(17,24,39,.45)}
.shq-modal[hidden]{display:none}
.shq-modal__sheet{position:relative;width:100%;max-width:480px;max-height:88vh;overflow:auto;padding:22px 18px calc(22px + env(safe-area-inset-bottom,0px));border-radius:20px 20px 0 0;background:#fff;color:var(--shq-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;animation:shq-up .22s ease-out}
@keyframes shq-up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@media (min-width:600px){.shq-modal{align-items:center}.shq-modal__sheet{border-radius:20px}}
.shq-modal__x{position:absolute;top:10px;right:12px;width:34px;height:34px;border:0;border-radius:50%;background:#f3f4f6;color:#374151;font-size:20px;line-height:1;cursor:pointer}
.shq-modal h2{margin:0 36px 4px 0;font-size:19px;font-weight:800}
.shq-modal p{margin:0 0 14px;color:var(--shq-muted);font-size:13.5px}
.shq-modal .shq-btn{width:100%}
.shq-or{display:flex;align-items:center;gap:10px;margin:14px 0;color:var(--shq-muted);font-size:12px;text-transform:uppercase}
.shq-or::before,.shq-or::after{content:"";flex:1;height:1px;background:var(--shq-line)}
.shq-search{display:flex;gap:8px}
.shq-search input{flex:1;min-width:0;height:44px;padding:0 12px;border:1.5px solid var(--shq-line);border-radius:12px;font-size:15px}
.shq-search input:focus{outline:0;border-color:var(--shq-primary)}
.shq-search button{flex:none;height:44px;padding:0 16px;border:0;border-radius:12px;background:var(--shq-dark);color:#fff;font-weight:700;cursor:pointer}
.shq-results{list-style:none;margin:10px 0 0;padding:0}
.shq-results li{margin:0}
.shq-results button{display:block;width:100%;padding:11px 8px;border:0;border-bottom:1px solid var(--shq-line);background:transparent;text-align:left;font-size:13.5px;line-height:1.35;color:var(--shq-ink);cursor:pointer}
.shq-results button:hover{background:#f6f8fb}
.shq-modal__err{margin:10px 0 0;color:var(--shq-red);font-size:13px}

/* ---------- Vendor radius shortcode ---------- */
.shq-vr input[type=number]{width:120px;min-height:40px;padding:0 10px}
.shq-vr-ok{color:var(--shq-primary-dark);font-weight:600}
.shq-vr-note{color:var(--shq-muted)}

/* ---------- v1.0.2 theme-proofing (seen on real phone screenshot) ---------- */
.shq-card .shq-badge{top:auto;bottom:6px;left:6px;max-width:calc(100% - 12px)}
.shq-card__foot{flex-wrap:wrap;row-gap:4px}
.shq-card .shq-price,.shq-card .shq-sp,.shq-card .shq-mrp,.shq-card .woocommerce-Price-amount,.shq-card .woocommerce-Price-currencySymbol{white-space:nowrap!important}
.shq-card .shq-sp{font-size:13.5px!important;line-height:1.2!important}
.shq-card .shq-mrp{font-size:11px!important;line-height:1.2!important}
.shq-card .shq-card__title{font-size:12.5px!important;line-height:1.3!important;font-weight:600!important}
.shq-card .shq-card__unit{font-size:11px!important}
.shq-card .shq-eta{font-size:9.5px!important}
.shq-card .shq-add{min-width:54px;height:30px;font-size:12px!important;line-height:1!important}
.shq-card .shq-act{min-width:54px;margin-left:auto}
.shq-card .shq-badge{font-size:9.5px!important;line-height:1.2!important;padding:3px 7px!important}

/* ---------- v1.0.3 homepage rows + vendor store pages ---------- */
.shpui-product-row .shq-card{flex:0 0 150px;width:150px!important;min-width:150px;max-width:150px;margin:0!important;scroll-snap-align:start;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
@media (max-width:359px){.shpui-product-row .shq-card{flex-basis:140px;width:140px!important;min-width:140px;max-width:140px}}
body.shq-store ul.shq-grid{padding:8px 0}
.shq-store .shq-card{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}

/* v1.0.4 store page grid for loops that keep the theme's <ul class="products"> */
body.shq-store ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0!important;padding:8px 0!important;list-style:none!important}
body.shq-store ul.products::before,body.shq-store ul.products::after{display:none!important}
@media (min-width:600px){body.shq-store ul.products{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))!important;gap:12px!important}}
@media (min-width:1024px){body.shq-store ul.products{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))!important;gap:14px!important}}

/* ---------- v1.0.8 product page badge + homepage search bar fixes ---------- */
.single-product .shq-badge{top:12px!important;bottom:auto!important;left:12px!important;z-index:20;font-size:12px!important;padding:5px 11px!important}
.shpui-root .shpui-search .shpui-search-icon{flex:0 0 auto;display:flex!important;align-items:center;justify-content:center;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;font-size:0!important;color:transparent!important;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center/24px 24px no-repeat!important}
.shpui-root .shpui-search a.shpui-account{flex:0 0 auto;display:block!important;width:44px!important;height:44px!important;margin:0 0 0 6px!important;padding:0!important;border-radius:50%!important;overflow:hidden!important;background:#e6f6ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230A5EA8'%3E%3Ccircle cx='12' cy='8' r='4.2'/%3E%3Cpath d='M4 20.5c0-4.2 3.6-6.6 8-6.6s8 2.4 8 6.6z'/%3E%3C/svg%3E") center/24px 24px no-repeat!important}
.shpui-root .shpui-search a.shpui-account .shpui-user-icon,.shpui-root .shpui-search a.shpui-account *{display:none!important}
.shpui-root .shpui-search .shpui-mic{flex:0 0 auto;margin:0 4px 0 6px!important}

/* ---------- v1.0.9 bigger, consistent status badges + greyed add to cart on product page ---------- */
.shq-card .shq-badge{font-size:11px!important;padding:4px 9px!important;letter-spacing:.02em}
.single-product .shq-badge{font-size:13px!important;padding:6px 13px!important}
form.cart[data-shq-blocked="1"] .single_add_to_cart_button,form.cart[data-shq-blocked="1"] button[type="submit"]{opacity:.5!important;filter:grayscale(1)!important;cursor:not-allowed!important}

/* ---------- v1.0.10 search field on wide screens; theme sidebar no longer squeezes the layout ---------- */
.shq-head{flex-wrap:wrap}
@media (min-width:769px){
  body.shq-hide-sidebar.shq-qc #left-sidebar,
  body.shq-hide-sidebar.shq-qc #right-sidebar,
  body.shq-hide-sidebar.shq-qc .sidebar-container{display:none!important}
  body.shq-hide-sidebar.shq-qc #primary,
  body.shq-hide-sidebar.shq-qc .content-area{width:100%!important;max-width:100%!important;float:none!important}
}

/* ---------- v1.0.12 product search bar above the category layout (tablet / laptop / desktop) ---------- */
.shq-topsearch{display:none;position:relative;max-width:820px;margin:14px auto 12px;padding:0 16px;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
.shq-topsearch input[type="search"]{display:block;width:100%!important;height:46px!important;margin:0!important;padding:0 52px 0 18px!important;border:1.5px solid #d9dee5!important;border-radius:23px!important;background:#fff!important;color:#111827!important;font-size:15px!important;box-shadow:none!important;box-sizing:border-box!important}
.shq-topsearch input[type="search"]:focus{outline:0!important;border-color:#00a859!important}
.shq-topsearch button{position:absolute;right:22px;top:50%;transform:translateY(-50%);width:36px;height:36px;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#111827!important;cursor:pointer;box-shadow:none!important}
@media (min-width:769px){.shq-topsearch{display:block!important}}

/* ---------- v1.0.13 theme sidebar (Filters / Price / In stock) stays on wide screens; the layout fits beside it ---------- */
@media (min-width:769px){
  body.shq-keep-sidebar.shq-fullwidth.shq-qc .shq-layout{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}
}
