/* =========================
   V1 HEADER
========================= */

:root{
  --v1-bg:#f7f8fa;
  --v1-card:#ffffff;
  --v1-text:#111827;
  --v1-muted:#6b7280;
  --v1-border:rgba(17,24,39,.08);
  --v1-brand:#16a34a;
  --v1-brand-dark:#15803d;
  --v1-shadow:0 10px 30px rgba(15,23,42,.06);
  --v1-radius:18px;
}

.v1-body{
  background:var(--v1-bg);
}

/* common */
.v1-header{
  width:100%;
  position:relative;
  z-index:90;
}

.v1-header-container{
  width:100%;
  max-width:1360px;
  margin:0 auto;
  padding:0 18px;
  box-sizing:border-box;
}

/* =========================
   DESKTOP
========================= */
.v1-desktop-header{
  display:none;
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  z-index:9999;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(17,24,39,.06);
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:transform .22s ease;
}

.v1-header-top{
  padding:12px 0;
}

.v1-header-top .v1-header-container{
  display:grid;
  grid-template-columns:auto 240px minmax(300px, 1fr) auto;
  gap:14px;
  align-items:center;
}

.v1-brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--v1-text);
  min-width:0;
}

.v1-brand-mark{
  width:42px;
  height:42px;
  border-radius:14px;
  background:linear-gradient(135deg, #f97316, #fb923c);
  color:#fff;
  font-weight:700;
  font-size:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 16px rgba(249,115,22,.20);
  flex:0 0 auto;
}

.v1-brand-text{
  min-width:0;
}

.v1-brand-title{
  font-size:16px;
  line-height:1.2;
  font-weight:700;
  color:var(--v1-text);
}

.v1-brand-sub{
  font-size:11.5px;
  color:var(--v1-muted);
  margin-top:2px;
  font-weight:400;
}

.v1-location-box{
  min-width:0;
  text-decoration:none;
  color:var(--v1-text);
  background:rgba(255,255,255,.78);
  border:1px solid rgba(17,24,39,.08);
  border-radius:15px;
  padding:9px 12px;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.v1-location-box:hover{
  transform:translateY(-1px);
  background:#fff;
}

.v1-location-label{
  font-size:10.5px;
  color:var(--v1-muted);
  line-height:1.2;
}

.v1-location-value{
  font-size:12.5px;
  line-height:1.3;
  margin-top:4px;
  color:var(--v1-text);
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.v1-search{
  position:relative;
  display:flex;
  align-items:center;
  height:50px;
  background:rgba(255,255,255,.80);
  border:1px solid rgba(17,24,39,.08);
  border-radius:15px;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.v1-search-ico{
  width:18px;
  height:18px;
  stroke:#6b7280;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  margin-left:15px;
  flex:0 0 auto;
}

.v1-search input{
  flex:1;
  height:100%;
  border:none;
  background:transparent;
  outline:none;
  padding:0 16px 0 10px;
  font-size:13.5px;
  color:var(--v1-text);
  font-family:'Poppins','Inter',sans-serif;
}

.v1-search input::placeholder{
  color:#9ca3af;
}

.v1-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.v1-login-link{
  text-decoration:none;
  color:var(--v1-text);
  font-size:13.5px;
  font-weight:600;
  padding:9px 12px;
  border-radius:12px;
  transition:background .15s ease;
}

.v1-login-link:hover{
  background:rgba(255,255,255,.75);
}

.v1-cart-btn{
  min-width:104px;
  height:46px;
  text-decoration:none;
  background:#0f172a;
  color:#fff;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 14px;
  font-size:13px;
  font-weight:700;
  box-shadow:0 12px 20px rgba(17,24,39,.16);
  position:relative;
}

.v1-cart-ico{
  width:18px;
  height:18px;
  stroke:#fff;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.v1-cart-count{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#f97316;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
  line-height:1;
}

/* =========================
   MOBILE
========================= */
.v1-mobile-header{
  display:block;
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  z-index:9999;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(17,24,39,.06);
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:transform .22s ease;
}

.v1-mobile-location-row{
  padding:10px 12px 8px;
}

.v1-mobile-location-box{
  display:block;
  text-decoration:none;
  color:var(--v1-text);
  background:rgba(255,255,255,.80);
  border:1px solid rgba(17,24,39,.08);
  border-radius:13px;
  padding:9px 12px;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}

.v1-mobile-location-label{
  font-size:10.5px;
  line-height:1.2;
  color:var(--v1-muted);
}

.v1-mobile-location-value{
  font-size:12.5px;
  line-height:1.3;
  margin-top:4px;
  color:var(--v1-text);
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.v1-mobile-search-row{
  padding:0 12px 10px;
}

.v1-mobile-search-box{
  position:relative;
  display:flex;
  align-items:center;
  height:46px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(17,24,39,.08);
  border-radius:13px;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}

.v1-mobile-search-box .v1-search-ico{
  margin-left:14px;
}

.v1-mobile-search-box input{
  flex:1;
  height:100%;
  border:none;
  background:transparent;
  outline:none;
  padding:0 14px 0 10px;
  font-size:13.5px;
  color:var(--v1-text);
  font-family:'Poppins','Inter',sans-serif;
}

.v1-mobile-search-box input::placeholder{
  color:#9ca3af;
}

/* reusable icon button */
.v1-icon-btn{
  width:42px;
  height:42px;
  border:none;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(17,24,39,.06);
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  text-decoration:none;
  position:relative;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
  -webkit-appearance:none;
  appearance:none;
}

.v1-ico{
  width:19px;
  height:19px;
  stroke:#111827;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* suggestions */
.v1-suggest{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:120;
}

/* =========================
   MOBILE FLOATING CART BAR
========================= */
.v1-mobile-cart-bar{
  position:fixed;
  left:12px;
  right:12px;
  bottom:78px;
  z-index:10025;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:18px;
  background:linear-gradient(135deg, #55a630, #3a8f1d);
  color:#fff;
  text-decoration:none;
  box-shadow:0 14px 30px rgba(58,143,29,.28);
  transform:translateY(12px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .22s ease;
}

.v1-mobile-cart-bar.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.v1-mobile-cart-bar-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.v1-mobile-cart-bag{
  width:38px;
  height:38px;
  border-radius:12px;
  background:rgba(255,255,255,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.v1-mobile-cart-bag-ico{
  width:19px;
  height:19px;
  stroke:#fff;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.v1-mobile-cart-copy{
  min-width:0;
}

.v1-mobile-cart-title{
  font-size:14px;
  line-height:1.15;
  font-weight:700;
  color:#fff;
}

.v1-mobile-cart-sub{
  margin-top:2px;
  font-size:11.5px;
  line-height:1.2;
  color:rgba(255,255,255,.92);
  font-weight:500;
}

.v1-mobile-cart-arrow{
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.v1-mobile-cart-arrow-ico{
  width:18px;
  height:18px;
  stroke:#fff;
  stroke-width:2.2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* =========================
   MOBILE BOTTOM NAV
========================= */
.v1-mobile-bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:10020;
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  align-items:stretch;
  gap:0;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-top:1px solid rgba(17,24,39,.08);
  box-shadow:0 -8px 24px rgba(15,23,42,.08);
  padding:8px 6px calc(8px + env(safe-area-inset-bottom));
}

.v1-bottom-nav-item{
  min-width:0;
  border:none;
  background:transparent;
  text-decoration:none;
  color:#6b7280;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:6px 4px;
  font-family:'Poppins','Inter',sans-serif;
  font-size:10.5px;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}

.v1-bottom-nav-item span{
  white-space:nowrap;
}

.v1-bottom-nav-ico{
  width:20px;
  height:20px;
  stroke:currentColor;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}

.v1-bottom-nav-item.active{
  color:#15803d;
}

.v1-bottom-nav-item.is-disabled{
  opacity:.7;
}

.v1-bottom-nav-item:active{
  transform:translateY(1px);
}

/* =========================
   DRAWER
========================= */
.drawer{
  position:fixed;
  inset:0;
  z-index:10050;
  pointer-events:none;
}

.drawer.is-open{
  pointer-events:auto;
}

.drawer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.36);
  opacity:0;
  transition:opacity .2s ease;
  z-index:1;
}

.drawer.is-open .drawer-backdrop{
  opacity:1;
}

.drawer-panel{
  position:absolute;
  top:0;
  left:0;
  height:100%;
  width:min(84vw, 340px);
  background:#fff;
  box-shadow:0 20px 50px rgba(15,23,42,.18);
  transform:translateX(-100%);
  transition:transform .22s ease;
  display:flex;
  flex-direction:column;
  z-index:2;
}

.drawer.is-open .drawer-panel{
  transform:translateX(0);
}

.drawer-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid rgba(17,24,39,.06);
}

.drawer-user{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.avatar{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg,#f97316,#fb923c);
  flex:0 0 auto;
}

.drawer-hi{
  font-size:15px;
  color:#111827;
  font-weight:600;
}

.drawer-login{
  font-size:13px;
  color:#16a34a;
  text-decoration:none;
  font-weight:500;
}

.drawer-close-btn{
  flex:0 0 auto;
}

.drawer-links{
  display:flex;
  flex-direction:column;
  padding:10px 12px 16px;
}

.drawer-links a{
  text-decoration:none;
  color:#111827;
  font-size:14px;
  padding:12px 10px;
  border-radius:12px;
  font-weight:400;
}

.drawer-links a:hover{
  background:#f9fafb;
}

.drawer-links hr{
  border:none;
  border-top:1px solid rgba(17,24,39,.08);
  margin:10px 4px;
}

/* =========================
   DESKTOP SWITCH
========================= */
@media (min-width: 861px){
  .v1-desktop-header{
    display:block;
  }

  .v1-mobile-header{
    display:none;
  }

  .v1-mobile-bottom-nav{
    display:none;
  }

  .v1-mobile-cart-bar{
    display:none !important;
  }
}

/* =========================
   CONTENT OFFSET
========================= */
.v1-main{
  padding-top:112px;
}

@media (max-width: 860px){
  .v1-main{
    padding-top:126px;
    padding-bottom:150px;
  }
}

/* =========================
   AUTO HIDE STATE
========================= */
.v1-mobile-header.is-hidden,
.v1-desktop-header.is-hidden{
  transform:translateY(-100%);
}