*{box-sizing:border-box}body{margin:0;background:#f4f6f8;color:#17202a;font:15px/1.5 system-ui,-apple-system,Segoe UI,Arial}.topbar{background:#132238;color:#fff;padding:14px max(18px,calc((100% - 1100px)/2));display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-size:24px;font-weight:900;letter-spacing:1px;color:#fff;text-decoration:none}.topbar nav{display:flex;gap:16px;flex-wrap:wrap}.topbar nav a{color:#fff;text-decoration:none}.container{max-width:1100px;margin:24px auto;padding:0 16px;min-height:75vh}footer{text-align:center;color:#667;padding:24px}.hero{background:linear-gradient(120deg,#17365d,#147d73);color:#fff;border-radius:18px;padding:32px;margin-bottom:22px}.hero h1{font-size:clamp(28px,5vw,44px);margin:0 0 8px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.card,.panel{background:#fff;border-radius:14px;padding:18px;box-shadow:0 4px 18px #14253b0d}.card h3{margin:0 0 6px}.price{font-size:20px;font-weight:800;color:#087e67}.muted{color:#667085}.btn,button{display:inline-block;border:0;border-radius:9px;background:#087e67;color:white;padding:11px 16px;font-weight:700;text-decoration:none;cursor:pointer}.btn.secondary{background:#e9eef4;color:#17304c}.btn.danger{background:#b42318}.form{max-width:560px;margin:20px auto}.field{margin:12px 0}.field label{display:block;font-weight:650;margin-bottom:5px}input,textarea,select{width:100%;padding:11px;border:1px solid #ccd4dd;border-radius:8px;font:inherit;background:white}textarea{min-height:80px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.row>*{flex:1}.flash{background:#e7f7ed;padding:12px;border-radius:8px;margin-bottom:16px}.table-wrap{overflow:auto;background:#fff;border-radius:12px}table{border-collapse:collapse;width:100%;min-width:620px}th,td{text-align:left;padding:12px;border-bottom:1px solid #edf0f3}th{background:#f8fafc}.pill{display:inline-block;padding:4px 9px;border-radius:99px;background:#e8f1ff;color:#174ea6;font-size:12px;font-weight:700}.qty{max-width:90px}.product-actions{display:flex;gap:8px;align-items:center;margin-top:12px}.stat{font-size:28px;font-weight:800}.notice{padding:14px;background:#fff7e6;border-radius:10px;margin:12px 0}.right{text-align:right}.invoice{max-width:760px;margin:auto;background:#fff;padding:24px;border-radius:12px}@media(max-width:600px){.topbar{align-items:flex-start}.topbar nav{gap:10px;font-size:14px}.hero{padding:22px}.container{margin:16px auto}.row{display:block}.row>*{margin-bottom:8px}}
/* Product photo upload and gallery */
.product-gallery{display:flex;gap:8px;overflow-x:auto;margin:-4px 0 12px}
.product-gallery img{width:calc(33.333% - 6px);min-width:80px;height:125px;object-fit:cover;border-radius:10px;background:#f1f1f1}
.admin-thumbs{display:flex;gap:5px;min-width:130px}
.admin-thumbs img{width:48px;height:48px;object-fit:cover;border-radius:6px}
.product-edit-form{display:grid;gap:7px;min-width:260px}
.product-edit-form .row{flex-wrap:wrap}
.product-edit-form label,.panel form label{font-size:12px;color:#555}
.product-edit-form input[type=file],.panel input[type=file]{max-width:190px;font-size:12px}

/* Bilingual product search and clickable admin dashboard */
.search-bar{display:flex;gap:10px;align-items:center;margin:12px 0 22px}.search-bar input{flex:1}.product-name-hi{font-size:18px;font-weight:700;color:#344054;margin-top:-3px;margin-bottom:8px}.dashboard-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:12px;margin-top:20px}.stat-card{display:flex;flex-direction:column;gap:4px;padding:14px;border-radius:12px;background:#ffffff20;color:#fff;text-decoration:none;min-height:94px;border:1px solid #ffffff35;transition:transform .15s,background .15s}.stat-card:hover{background:#ffffff35;transform:translateY(-2px)}.stat-card .stat{font-size:25px}.stat-card small{font-size:11px;color:#e4f2ff}.panel[id]{scroll-margin-top:18px}@media(max-width:600px){.search-bar{flex-wrap:wrap}.search-bar input{flex-basis:100%}.stat-card{min-height:84px}}


/* Admin dashboard stat links: high contrast on the blue hero */
.hero .dashboard-stats .stat-card,
.hero .dashboard-stats .stat-card:link,
.hero .dashboard-stats .stat-card:visited {
    color: #ffffff !important;
    background: rgba(7, 25, 55, 0.28);
    border: 1px solid rgba(255,255,255,0.62);
    text-decoration: none !important;
}
.hero .dashboard-stats .stat-card .stat,
.hero .dashboard-stats .stat-card span,
.hero .dashboard-stats .stat-card small {
    color: #ffffff !important;
    opacity: 1;
}
.hero .dashboard-stats .stat-card:hover,
.hero .dashboard-stats .stat-card:focus-visible {
    color: #ffffff !important;
    background: rgba(7, 25, 55, 0.52);
    border-color: #ffd166;
    outline: 2px solid rgba(255,209,102,0.45);
    outline-offset: 2px;
}
.hero .dashboard-stats .stat-card:focus-visible {
    outline: 3px solid #ffd166;
}

/* Admin-managed theme colors */
body{background:var(--site-bg,#f4f6f8);color:var(--site-text,#17202a)}
.category-list{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 20px}
.category-chip{display:inline-block;padding:9px 14px;border-radius:999px;background:#e8eef6;color:#17304c;text-decoration:none;font-weight:700;border:1px solid #cbd5e1}
.category-chip.active,.category-chip:hover{background:#087e67;color:#fff}
.banner-slider{position:relative;overflow:hidden;border-radius:16px;margin:0 0 22px;background:#17365d;min-height:150px}
.banner-slide{display:none;position:relative;min-height:190px;color:white}
.banner-slide.active{display:block}
.banner-slide img{width:100%;height:230px;object-fit:cover;display:block;opacity:.78}
.banner-copy{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;padding:22px 28px;background:linear-gradient(90deg,rgba(0,0,0,.65),transparent)}
.banner-copy h2{font-size:clamp(22px,4vw,34px);margin:0 0 6px;color:white}
.banner-copy p{margin:0;color:white}
.banner-dots{position:absolute;bottom:10px;right:14px;display:flex;gap:6px}
.banner-dots span{width:8px;height:8px;border-radius:50%;background:#ffffff88}
.banner-dots span.active{background:#fff}
.theme-preview{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.theme-preview input[type=color]{width:65px;height:42px;padding:3px}
@media(max-width:600px){.banner-slide img{height:170px}.banner-copy{padding:16px}}

.offer-badge{display:inline-block;margin:0 0 8px;padding:4px 9px;border-radius:999px;background:#fff0d6;color:#9a4d00;font-size:12px;font-weight:800}
.card del{font-size:14px;font-weight:500;margin-right:4px}


/* MANDI ADMIN DASHBOARD - high contrast card redesign */
.hero .dashboard-stats{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:stretch !important;
  margin-top:24px !important;
}
.hero .dashboard-stats > a.stat-card{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:7px !important;
  min-width:0 !important;
  min-height:118px !important;
  padding:18px !important;
  border-radius:14px !important;
  background:#102b49 !important;
  border:1px solid #315779 !important;
  color:#fff !important;
  text-decoration:none !important;
  box-shadow:0 5px 14px rgba(0,0,0,.18) !important;
  opacity:1 !important;
}
.hero .dashboard-stats > a.stat-card *,
.hero .dashboard-stats > a.stat-card .stat,
.hero .dashboard-stats > a.stat-card span,
.hero .dashboard-stats > a.stat-card small{
  color:#fff !important;
  opacity:1 !important;
  text-shadow:none !important;
  -webkit-text-fill-color:#fff !important;
}
.hero .dashboard-stats > a.stat-card .stat{
  display:block !important;
  font-size:clamp(25px,3vw,34px) !important;
  line-height:1.15 !important;
  font-weight:850 !important;
  letter-spacing:.2px !important;
}
.hero .dashboard-stats > a.stat-card span:not(.stat){
  display:block !important;
  font-size:15px !important;
  line-height:1.35 !important;
  font-weight:750 !important;
}
.hero .dashboard-stats > a.stat-card small{
  display:block !important;
  font-size:12px !important;
  line-height:1.35 !important;
  font-weight:500 !important;
}
.hero .dashboard-stats > a.stat-card:hover,
.hero .dashboard-stats > a.stat-card:focus-visible{
  background:#075e59 !important;
  border-color:#ffd166 !important;
  transform:translateY(-3px) !important;
  outline:3px solid rgba(255,209,102,.45) !important;
  outline-offset:2px !important;
}
@media(max-width:800px){
 .hero .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media(max-width:480px){
 .hero .dashboard-stats{grid-template-columns:1fr !important;gap:10px !important}
 .hero .dashboard-stats > a.stat-card{min-height:88px !important;padding:14px !important}
}

/* MANDI responsive layout pass: prevent page-level sideways scrolling. */
html{width:100%;max-width:100%;overflow-x:hidden}
body{width:100%;max-width:100%;overflow-x:hidden}
.container{width:100%;max-width:1100px;margin-left:auto;margin-right:auto;padding-left:clamp(12px,3vw,22px);padding-right:clamp(12px,3vw,22px)}
.topbar{width:100%;min-width:0;flex-wrap:wrap}
.topbar nav{min-width:0;justify-content:flex-end}
.grid{width:100%;max-width:100%;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));justify-items:stretch}
.card,.panel,.invoice{min-width:0;max-width:100%;overflow-wrap:anywhere}
.card img{max-width:100%}
input,select,textarea,button{max-width:100%;min-width:0}
.product-actions{display:flex;flex-wrap:nowrap;min-width:0}
.product-actions .qty{flex:0 1 92px;width:92px;min-width:72px}
.product-actions button{flex:0 0 auto}
.product-gallery{max-width:100%;scrollbar-width:thin}
.table-wrap{width:100%;max-width:100%;overflow-x:hidden}
.table-wrap table{width:100%;min-width:0;table-layout:fixed}
.table-wrap th,.table-wrap td{white-space:normal;overflow-wrap:anywhere;word-break:normal}
.invoice{width:100%;max-width:760px;margin:0 auto;padding:clamp(14px,4vw,24px)}
.right{text-align:right;overflow-wrap:anywhere}

@media(max-width:700px){
  .container{margin:12px auto;min-height:70vh}
  .topbar{padding:12px 14px;align-items:center}
  .brand{font-size:22px}
  .topbar nav{gap:12px;font-size:14px}
  .hero{padding:18px;margin-bottom:16px;border-radius:13px}
  .grid{grid-template-columns:minmax(0,1fr);gap:13px;max-width:560px;margin-left:auto;margin-right:auto}
  .card,.panel{padding:14px;border-radius:12px}
  .product-gallery img{width:calc(33.333% - 6px);min-width:0;height:clamp(90px,28vw,145px)}
  .product-name-hi{font-size:16px}
  .price{font-size:19px}
  .search-bar{display:flex;flex-wrap:wrap;gap:8px}
  .search-bar input{flex:1 1 100%;width:100%}
  .search-bar button,.search-bar .btn{flex:0 0 auto}
  .category-list{gap:7px}
  .category-chip{padding:8px 11px;font-size:13px}
  .row{display:flex;flex-wrap:wrap;gap:8px}
  .row>*{flex:1 1 100%;margin:0}
  .table-wrap table{font-size:13px}
  .table-wrap th,.table-wrap td{padding:8px 6px}
  /* Cart: each item becomes a centered, two-column mobile card. */
  .panel .table-wrap:has([data-cart-row]) table{display:block}
  .panel .table-wrap:has([data-cart-row]) thead{display:none}
  .panel .table-wrap:has([data-cart-row]) tbody{display:block;width:100%}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;padding:12px 4px;border-bottom:1px solid #edf0f3}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td{display:block;min-width:0;padding:3px 2px;border:0}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td:first-child{grid-column:1/-1;font-size:15px}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td:nth-child(2)::before{content:'Price: ';font-weight:700;color:#667085}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td:nth-child(3)::before{content:'Qty: ';font-weight:700;color:#667085}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td:nth-child(4)::before{content:'Total: ';font-weight:700;color:#667085}
  .panel .table-wrap:has([data-cart-row]) tr[data-cart-row] td:nth-child(5){grid-column:1/-1;text-align:right}
  /* Invoice item table fits the phone width without a horizontal swipe. */
  .invoice .table-wrap table{font-size:12px}
  .invoice .table-wrap th,.invoice .table-wrap td{padding:8px 4px}
  .invoice .row{display:flex;align-items:flex-start}
  .invoice .row>*{flex:1 1 100%}
  .invoice .right{text-align:left}
  .stat{font-size:24px}
  .mandi-floating-cart.style-pill{right:10px;bottom:14px;max-width:calc(100vw - 20px)}
}
@media(max-width:380px){
  .topbar nav{font-size:13px;gap:8px}
  .brand{font-size:20px}
  .product-actions{gap:6px}
  .product-actions .qty{flex-basis:76px;width:76px}
  .product-actions button{padding:10px 11px;font-size:13px}
}
@media(max-width:700px){
  .panel .table-wrap:has([data-cart-row]) table>tbody>tr:not([data-cart-row]){display:none}
}

/* Product/cart quantity stepper */
[hidden]{display:none!important}.qty-stepper{display:inline-flex;align-items:center;justify-content:center;gap:0;border:1px solid #d5dde5;border-radius:10px;overflow:hidden;background:#fff;min-height:42px;vertical-align:middle}.qty-stepper button{width:40px;height:40px;padding:0;border-radius:0;background:#087e67;color:#fff;font-size:23px;line-height:1;font-weight:800}.qty-stepper .qty-value{display:inline-grid;place-items:center;min-width:38px;padding:0 8px;font-weight:800;font-size:16px;color:#17202a}.shop-product-actions{display:flex;align-items:center;gap:10px;min-height:44px}.shop-product-actions .shop-add-btn{min-width:120px}.cart-qty-stepper{min-width:118px}.cart-qty-stepper button{width:36px;height:36px}.cart-qty-stepper .qty-value{min-width:36px}
@media(max-width:600px){.shop-product-actions{gap:8px}.shop-product-actions .shop-add-btn{min-width:112px}.qty-stepper button{width:38px;height:38px}.cart-qty-stepper{min-width:112px}}

/* MANDI customer product catalogue: centered, balanced responsive columns.
   Small phones use one comfortable column; wider phones use two equal columns. */
@media (min-width: 480px) and (max-width: 700px) {
  .container {
    width: 100%; max-width: 680px; margin-left: auto; margin-right: auto;
    padding-left: 16px; padding-right: 16px;
  }
  .container > .grid {
    width: 100%; max-width: 648px; margin-left: auto; margin-right: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; justify-items: stretch;
  }
  .container > .grid > .card { width: 100%; min-width: 0; padding: 12px; }
  .container > .grid > .card .product-actions { flex-wrap: wrap; gap: 8px; }
  .container > .grid > .card .shop-product-actions .shop-add-btn { min-width: 0; width: 100%; }
  .container > .grid > .card .shop-product-actions .qty-stepper { max-width: 100%; }
}
@media (max-width: 479px) {
  .container > .grid {
    width: 100%; max-width: 420px; margin-left: auto; margin-right: auto;
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (min-width: 701px) {
  .container > .grid { margin-left: auto; margin-right: auto; justify-content: center; }
}


/* Cart and invoice product thumbnails */
.cart-product-info,.invoice-item{display:flex;align-items:center;gap:12px;min-width:180px}
.cart-product-info img{width:68px;height:68px;flex:0 0 68px;object-fit:contain;border-radius:9px;background:#f1f5f9}
.invoice-item-image{width:60px;height:60px;flex:0 0 60px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#f1f5f9;color:#64748b;font-size:11px}
.invoice-item-image img{width:100%;height:100%;object-fit:contain}
@media(max-width:600px){
 .cart-product-info img{width:58px;height:58px;flex-basis:58px}
 .invoice-item-image{width:52px;height:52px;flex-basis:52px}
}
