/* =====================================================
   HTFASIL — INSTACART STYLE MARKETPLACE THEME
   /public/assets/css/htfasil-theme.css
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root{
  /* Base */
  --ht-bg:#f7f7f5;
  --ht-bg-2:#efefeb;
  --ht-card:#ffffff;
  --ht-surface:#f9fafb;

  /* Text */
  --ht-text:#111827;
  --ht-text-2:#374151;
  --ht-muted:#6b7280;
  --ht-light:#9ca3af;

  /* Brand */
  --ht-green:#0b6b3a;
  --ht-green-2:#0a5a31;
  --ht-green-bright:#16a34a;
  --ht-green-soft:#ecfdf3;

  --ht-yellow:#fde047;
  --ht-yellow-soft:#fef9c3;

  --ht-orange:#f59e0b;
  --ht-orange-soft:#fff7ed;

  --ht-red:#dc2626;
  --ht-red-soft:#fff1f2;

  --ht-blue:#2563eb;
  --ht-blue-soft:#eff6ff;

  /* UI */
  --ht-border:#e5e7eb;
  --ht-border-2:#d1d5db;
  --ht-shadow:0 8px 24px rgba(17,24,39,.05);
  --ht-shadow-lg:0 16px 44px rgba(17,24,39,.09);

  /* Radius */
  --ht-r-xs:6px;
  --ht-r-sm:10px;
  --ht-r:14px;
  --ht-r-lg:18px;
  --ht-r-xl:24px;
  --ht-r-full:999px;

  /* Layout */
  --ht-container:1180px;
  --ht-sidebar:240px;
  --ht-font:'Inter',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

/* RESET */
*,
*::before,
*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html{
  scroll-behavior:smooth;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

body{
  min-height:100vh;
  font-family:var(--ht-font);
  color:var(--ht-text);
  background:var(--ht-bg);
  overflow-x:hidden;
  font-size:14px;
  line-height:1.45;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font-family:inherit;
}

button{
  cursor:pointer;
}

img{
  max-width:100%;
  display:block;
}

/* ================================
   GENERIC LAYOUT
================================ */

.ht-container,
.ht-section{
  max-width:var(--ht-container);
  margin:0 auto;
  padding:18px 18px;
}

.ht-section{
  padding-bottom:30px;
}

.ht-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.ht-flex{
  display:flex;
  align-items:center;
}

.ht-gap{gap:10px}
.ht-mb{margin-bottom:14px}
.ht-mt{margin-top:14px}
.ht-hidden{display:none!important}

.ht-truncate{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ================================
   TEXT
================================ */

.ht-title{
  font-size:clamp(30px,5vw,56px);
  line-height:1;
  font-weight:900;
  letter-spacing:-1.5px;
  color:var(--ht-text);
}

.ht-title span{
  color:var(--ht-green);
}

.ht-section-title{
  font-size:20px;
  font-weight:900;
  letter-spacing:-.4px;
  color:var(--ht-text);
}

.ht-subtitle{
  color:var(--ht-muted);
  font-size:14px;
  line-height:1.6;
  font-weight:600;
}

.ht-small{
  color:var(--ht-muted);
  font-size:12px;
  font-weight:700;
}

/* ================================
   BUTTONS
================================ */

.ht-btn{
  min-height:38px;
  border:none;
  border-radius:var(--ht-r-full);
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
  transition:.16s ease;
}

.ht-btn:hover{
  transform:translateY(-1px);
}

.ht-btn-primary,
.ht-btn-green{
  color:#fff;
  background:var(--ht-green-bright);
}

.ht-btn-primary:hover,
.ht-btn-green:hover{
  background:var(--ht-green);
}

.ht-btn-dark{
  color:#fff;
  background:#111827;
}

.ht-btn-light{
  color:var(--ht-text);
  background:#fff;
  border:1px solid var(--ht-border);
}

.ht-btn-soft{
  color:var(--ht-green);
  background:var(--ht-green-soft);
  border:1px solid #bbf7d0;
}

.ht-btn-yellow{
  color:#111827;
  background:var(--ht-yellow);
}

.ht-btn-danger{
  color:#be123c;
  background:var(--ht-red-soft);
  border:1px solid #fecdd3;
}

/* ================================
   CARDS
================================ */

.ht-card,
.ht-product-card,
.ht-store-card{
  background:#fff;
  border:1px solid var(--ht-border);
  border-radius:var(--ht-r-lg);
  box-shadow:var(--ht-shadow);
  overflow:hidden;
  transition:.18s ease;
}

.ht-card:hover,
.ht-product-card:hover,
.ht-store-card:hover{
  box-shadow:var(--ht-shadow-lg);
  transform:translateY(-2px);
}

.ht-card-head{
  padding:15px 16px;
  border-bottom:1px solid var(--ht-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.ht-card-head h2,
.ht-card-head h3{
  font-size:18px;
  font-weight:900;
}

.ht-card-body{
  padding:16px;
}

/* ================================
   FORMS / SEARCH
================================ */

.ht-input,
.ht-select,
.ht-textarea,
.ht-field input,
.ht-field select,
.ht-field textarea{
  width:100%;
  border:1px solid var(--ht-border-2);
  background:#fff;
  color:var(--ht-text);
  border-radius:var(--ht-r);
  padding:11px 13px;
  outline:none;
  font-size:14px;
  font-weight:600;
}

.ht-input:focus,
.ht-select:focus,
.ht-textarea:focus,
.ht-field input:focus,
.ht-field select:focus,
.ht-field textarea:focus{
  border-color:var(--ht-green);
  box-shadow:0 0 0 3px rgba(22,163,74,.12);
}

.ht-toolbar{
  background:#fff;
  border:1px solid var(--ht-border);
  border-radius:var(--ht-r-lg);
  padding:10px;
  margin-bottom:14px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  box-shadow:var(--ht-shadow);
}

.ht-toolbar-3{
  grid-template-columns:1fr 170px auto;
}

.ht-toolbar-4{
  grid-template-columns:1fr 150px 150px auto;
}

/* ================================
   BADGES / STATUS
================================ */

.ht-badge,
.ht-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border-radius:var(--ht-r-full);
  padding:5px 9px;
  font-size:11px;
  font-weight:900;
  line-height:1;
}

.ht-badge-green,
.ht-status.active,
.ht-status.delivered{
  color:#166534;
  background:var(--ht-green-soft);
  border:1px solid #bbf7d0;
}

.ht-badge-blue,
.ht-status.processing,
.ht-status.confirmed,
.ht-status.paid{
  color:#1d4ed8;
  background:var(--ht-blue-soft);
  border:1px solid #bfdbfe;
}

.ht-badge-orange,
.ht-status.pending{
  color:#92400e;
  background:var(--ht-yellow-soft);
  border:1px solid #fde68a;
}

.ht-badge-red,
.ht-status.cancelled,
.ht-status.failed,
.ht-status.inactive{
  color:#be123c;
  background:var(--ht-red-soft);
  border:1px solid #fecdd3;
}

/* ================================
   STATS
================================ */

.ht-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-bottom:16px;
}

.ht-stat{
  background:#fff;
  border:1px solid var(--ht-border);
  border-radius:var(--ht-r-lg);
  padding:14px;
  box-shadow:var(--ht-shadow);
}

.ht-stat span{
  display:block;
  color:var(--ht-muted);
  font-size:12px;
  font-weight:800;
  margin-bottom:5px;
}

.ht-stat strong{
  display:block;
  color:var(--ht-green);
  font-size:24px;
  line-height:1;
  font-weight:900;
}

/* ================================
   PRODUCT CARD GLOBAL
================================ */

.ht-product-img{
  height:150px;
  background:#f9fafb;
  display:grid;
  place-items:center;
  overflow:hidden;
  position:relative;
}

.ht-product-img img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.ht-product-body{
  padding:12px;
}

.ht-product-name{
  font-size:14px;
  line-height:1.3;
  font-weight:800;
  color:var(--ht-text);
}

.ht-product-meta{
  color:var(--ht-muted);
  font-size:12px;
  font-weight:700;
  margin-top:5px;
}

.ht-product-price{
  font-size:15px;
  font-weight:900;
  color:var(--ht-text);
}

/* ================================
   EMPTY
================================ */

.ht-empty{
  background:#fff;
  border:1px dashed var(--ht-border-2);
  border-radius:var(--ht-r-lg);
  padding:30px 16px;
  text-align:center;
  color:var(--ht-muted);
  font-weight:700;
}

.ht-empty .big{
  font-size:40px;
  margin-bottom:8px;
}

/* =====================================================
   INSTACART-LIKE WELCOME PAGE CLASSES
   These support resources/views/welcome.blade.php
===================================================== */

.page{
  display:grid;
  grid-template-columns:var(--ht-sidebar) 1fr;
  min-height:100vh;
}

/* SIDEBAR */
.sidebar{
  background:var(--ht-bg);
  border-right:1px solid var(--ht-border);
  padding:14px 14px 20px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

.brand-mobile{
  display:none;
}

.side-group{
  margin-top:10px;
}

.side-title{
  font-size:13px;
  font-weight:900;
  color:var(--ht-text);
  margin:18px 10px 10px;
}

.side-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:12px;
  color:var(--ht-text);
  font-size:15px;
  font-weight:750;
  margin-bottom:4px;
  transition:.15s ease;
}

.side-link:hover{
  background:var(--ht-bg-2);
}

.side-link.active{
  background:var(--ht-green);
  color:#fff;
}

.side-link .ico{
  width:18px;
  text-align:center;
  font-size:16px;
}

.sidebar-divider{
  height:1px;
  background:var(--ht-border);
  margin:14px 0;
}

/* MAIN + TOPBAR */
.main{
  min-width:0;
}

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--ht-bg);
  border-bottom:1px solid var(--ht-border);
  padding:12px 18px;
}

.topbar-row{
  display:flex;
  align-items:center;
  gap:14px;
}

.menu-btn{
  display:none;
  width:40px;
  height:40px;
  border:none;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--ht-border);
  font-size:18px;
  cursor:pointer;
}

.brand{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
  min-width:170px;
}

.brand-logo{
  width:34px;
  height:34px;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--ht-border);
  display:grid;
  place-items:center;
}

.brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:4px;
}

.brand-name{
  font-size:17px;
  font-weight:950;
  letter-spacing:-.4px;
  color:var(--ht-green);
}

.search-wrap{
  flex:1;
  min-width:0;
}

.search-box{
  width:100%;
  height:50px;
  border-radius:var(--ht-r-full);
  border:1px solid var(--ht-border-2);
  background:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  box-shadow:var(--ht-shadow);
}

.search-box .search-icon{
  color:var(--ht-muted);
  font-size:16px;
  flex-shrink:0;
}

.search-box input{
  flex:1;
  min-width:0;
  border:none;
  outline:none;
  background:transparent;
  font-size:16px;
  font-weight:650;
  color:var(--ht-text);
}

.search-box input::placeholder{
  color:var(--ht-muted);
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.zip-pill{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  font-weight:850;
  color:var(--ht-text);
  padding:0 6px;
}

.login-btn{
  min-height:44px;
  padding:0 20px;
  border:none;
  border-radius:var(--ht-r-full);
  background:var(--ht-green-bright);
  color:#fff;
  font-weight:900;
  font-size:15px;
  cursor:pointer;
}

.cart-btn{
  min-width:54px;
  height:44px;
  border:none;
  border-radius:var(--ht-r-full);
  background:#fff;
  border:1px solid var(--ht-border);
  font-size:17px;
  font-weight:850;
  cursor:pointer;
}

/* CONTENT */
.content{
  padding:16px 18px 32px;
}

.section{
  margin-bottom:28px;
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.section-title{
  font-size:21px;
  font-weight:950;
  color:var(--ht-text);
  letter-spacing:-.4px;
}

.section-sub{
  font-size:13px;
  color:var(--ht-muted);
  font-weight:650;
  margin-top:2px;
}

.show-link{
  font-size:14px;
  font-weight:850;
  color:var(--ht-text);
}

/* STORE ROW */
.store-row{
  display:flex;
  gap:12px;
  overflow:auto;
  padding-bottom:4px;
  scrollbar-width:none;
}

.store-row::-webkit-scrollbar{
  display:none;
}

.store-chip{
  min-width:92px;
  max-width:92px;
  text-align:center;
  flex:0 0 auto;
  cursor:pointer;
}

.store-box{
  width:74px;
  height:54px;
  margin:0 auto 8px;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--ht-border);
  display:grid;
  place-items:center;
  box-shadow:var(--ht-shadow);
  overflow:hidden;
}

.store-box img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:8px;
}

.store-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:950;
  color:var(--ht-green);
  background:#f3f4f6;
}

.store-name{
  font-size:13px;
  font-weight:850;
  color:var(--ht-text);
  line-height:1.15;
  min-height:30px;
  overflow:hidden;
}

.store-meta{
  font-size:12px;
  color:var(--ht-muted);
  font-weight:750;
  margin-top:3px;
}

.store-offer{
  display:inline-block;
  margin-top:4px;
  background:var(--ht-yellow);
  color:#111827;
  font-size:11px;
  font-weight:950;
  padding:2px 5px;
}

.store-chip.more .store-box{
  border-radius:var(--ht-r-full);
  width:54px;
  height:54px;
  font-size:24px;
  color:var(--ht-text);
}

/* PROMO CARDS */
.hero-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.hero-card{
  background:#fff;
  border:1px solid var(--ht-border);
  border-radius:20px;
  overflow:hidden;
  box-shadow:var(--ht-shadow);
  min-height:190px;
  display:grid;
  grid-template-columns:1.1fr .9fr;
}

.hero-card.alt{
  grid-template-columns:1fr 1fr;
}

.hero-copy{
  padding:18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:850;
  color:var(--ht-muted);
  margin-bottom:10px;
}

.hero-title{
  font-size:20px;
  font-weight:950;
  line-height:1.1;
  color:var(--ht-text);
  margin-bottom:10px;
  letter-spacing:-.4px;
}

.hero-desc{
  font-size:13px;
  font-weight:650;
  color:var(--ht-muted);
  line-height:1.45;
  margin-bottom:12px;
}

.hero-btn{
  align-self:flex-start;
  min-height:40px;
  padding:0 18px;
  border:none;
  border-radius:var(--ht-r-full);
  background:#111827;
  color:#fff;
  font-weight:900;
  font-size:14px;
  cursor:pointer;
}

.hero-art{
  background:linear-gradient(135deg,#fff7cc,#fde68a);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.hero-art.alt{
  background:linear-gradient(135deg,#fef3c7,#fed7aa);
}

.hero-art-fallback{
  font-size:72px;
}

/* FILTERS */
.filter-row{
  display:flex;
  gap:8px;
  overflow:auto;
  padding-bottom:4px;
  scrollbar-width:none;
  margin-bottom:14px;
}

.filter-row::-webkit-scrollbar{
  display:none;
}

.filter-pill{
  flex:0 0 auto;
  height:38px;
  border-radius:var(--ht-r-full);
  border:1px solid var(--ht-border);
  background:#fff;
  color:var(--ht-text);
  padding:0 14px;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}

.filter-pill.active{
  background:#111827;
  color:#fff;
  border-color:#111827;
}

/* PRODUCT GRID */
.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(175px,1fr));
  gap:14px;
}

.product-card{
  display:block;
  background:#fff;
  border:1px solid var(--ht-border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--ht-shadow);
  transition:.18s ease;
}

.product-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--ht-shadow-lg);
}

.product-image{
  height:150px;
  background:#f9fafb;
  position:relative;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.product-badge{
  position:absolute;
  top:10px;
  left:10px;
  border-radius:var(--ht-r-full);
  background:#fff;
  border:1px solid var(--ht-border);
  padding:4px 8px;
  font-size:10px;
  font-weight:950;
  color:#111827;
}

.product-body{
  padding:12px;
}

.product-store{
  color:var(--ht-muted);
  font-size:11px;
  font-weight:750;
  margin-bottom:5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.product-name{
  font-size:14px;
  line-height:1.25;
  font-weight:850;
  color:var(--ht-text);
  min-height:36px;
}

.product-meta{
  font-size:12px;
  color:var(--ht-muted);
  font-weight:750;
  margin-top:6px;
}

.product-bottom{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.product-price{
  font-size:15px;
  font-weight:950;
  color:var(--ht-text);
}

.add-btn{
  min-width:76px;
  height:38px;
  border:none;
  border-radius:var(--ht-r-full);
  background:var(--ht-green-bright);
  color:#fff;
  font-size:14px;
  font-weight:950;
  cursor:pointer;
}

/* EMPTY */
.empty-box{
  background:#fff;
  border:1px dashed var(--ht-border-2);
  border-radius:18px;
  padding:28px 14px;
  text-align:center;
  color:var(--ht-muted);
  font-size:14px;
  font-weight:750;
  grid-column:1/-1;
}

.empty-box .big{
  font-size:40px;
  margin-bottom:8px;
}

/* ================================
   RESPONSIVE
================================ */

@media(max-width:1100px){
  .page{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:none;
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:280px;
    z-index:50;
    background:var(--ht-bg);
    box-shadow:0 20px 60px rgba(0,0,0,.15);
  }

  .sidebar.open{
    display:block;
  }

  .menu-btn{
    display:grid;
    place-items:center;
  }

  .brand-mobile{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:12px;
  }

  .hero-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:900px){
  .ht-nav{
    display:none;
  }

  .ht-toolbar,
  .ht-toolbar-3,
  .ht-toolbar-4{
    grid-template-columns:1fr;
  }

  .ht-form-grid{
    grid-template-columns:1fr;
  }

  .ht-stats{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:760px){
  .topbar-row{
    flex-wrap:wrap;
  }

  .brand{
    min-width:auto;
  }

  .search-wrap{
    order:3;
    width:100%;
  }

  .zip-pill{
    display:none;
  }

  .content{
    padding:12px 10px 28px;
  }

  .topbar{
    padding:10px;
  }

  .product-grid{
    grid-template-columns:repeat(2,1fr);
    gap:10px;
  }

  .hero-card{
    grid-template-columns:1fr;
  }

  .hero-art{
    min-height:120px;
  }
}

@media(max-width:640px){
  .ht-container,
  .ht-section{
    padding-left:12px;
    padding-right:12px;
  }

  .ht-title{
    font-size:28px;
    letter-spacing:-.8px;
  }

  .ht-stats{
    grid-template-columns:repeat(2,1fr);
    gap:8px;
  }

  .ht-stat{
    padding:11px;
  }

  .ht-stat strong{
    font-size:21px;
  }
}

@media(max-width:430px){
  .product-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .store-chip{
    min-width:84px;
    max-width:84px;
  }

  .store-box{
    width:68px;
    height:50px;
  }

  .login-btn{
    min-height:40px;
    padding:0 14px;
    font-size:14px;
  }

  .cart-btn{
    height:40px;
  }
}

@media(max-width:380px){
  .ht-stats{
    grid-template-columns:1fr;
  }
}