/* ═══════════════════════════════════════════════════════
   RESET + VARIABLES
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nav-h:    60px;
  --search-h: 54px;

  /* Nav (dark green) */
  --nav-bg:   #0d3b1e;
  --nav-text: #ffffff;

  /* Content (light) */
  --bg:       #f4f6f5;
  --surface:  #ffffff;
  --surface2: #f0f5f2;
  --border:   #e3ede7;
  --border2:  #ccd8d0;

  /* Brand */
  --green:        #27ae60;
  --green-dark:   #1d8a4c;
  --green-dim:    rgba(39,174,96,.1);
  --green-border: rgba(39,174,96,.22);

  /* Text */
  --text:     #1a2e22;
  --text-sec: #5a7060;
  --text-hint:#9aaca2;

  /* Semantic */
  --error:      #e74c3c;
  --error-light:rgba(231,76,60,.1);
  --success:    #27ae60;
  --success-light:rgba(39,174,96,.1);
  --warn:       #f39c12;

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;

  font-family: 'Montserrat', sans-serif;
  color: var(--text);
}

html {
  overflow-x: hidden;
}
body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

img { display: block; object-fit: cover; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ═══════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  height: var(--nav-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: .04em;
  background: none;
  border: none;
  text-shadow: 0 0 20px rgba(82,214,138,.35);
  flex-shrink: 0;
}
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .55rem;
}

/* Generic nav button */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .48rem 1rem;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: #ffffff;
  transition: background .2s, border-color .2s, transform .15s;
  white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* WhatsApp button – green tint */
.nav-btn--whatsapp {
  background: rgba(39,174,96,.2);
  border-color: rgba(39,174,96,.4);
}
.nav-btn--whatsapp:hover { background: rgba(39,174,96,.32); border-color: rgba(39,174,96,.6); }

/* Cart button */
.nav-btn--cart {
  position: relative;
  padding: .48rem .8rem;
}
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--nav-bg);
}

/* ═══════════════════════════════════════════════════════
   SEARCH
═══════════════════════════════════════════════════════ */
.search-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 199;
  background: var(--nav-bg);
  padding: 0 clamp(1rem, 3vw, 2.5rem) .9rem;
}
.search-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.search-field {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.16);
  border-radius: 50px;
  padding: .6rem 1.1rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-field:focus-within {
  background: rgba(255,255,255,.16);
  border-color: rgba(82,214,138,.5);
  box-shadow: 0 0 0 3px rgba(82,214,138,.12);
}
.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(255,255,255,.55);
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 500;
  color: #ffffff;
}
.search-input::placeholder { color: rgba(255,255,255,.4); }
.search-clear {
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-clear svg { width: 14px; height: 14px; }
.search-clear:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════════════ */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.4rem clamp(1rem, 3vw, 2.5rem) 3rem;
  min-height: 60vh;
}
.view { display: block; }
.view[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════
   TYPE CHIPS
═══════════════════════════════════════════════════════ */
.types-row-wrap {
  position: sticky;
  top: calc(var(--nav-h) + var(--search-h));
  z-index: 198;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  padding: .55rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.types-row-wrap::-webkit-scrollbar { display: none; }
.types-row-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.types-row {
  display: flex;
  gap: .55rem;
  padding-bottom: 2px;
  width: max-content;
}
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem 1.05rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  color: var(--text-sec);
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.type-chip:hover { border-color: var(--green); color: var(--green); }
.type-chip--active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(39,174,96,.35);
}

/* ═══════════════════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.1rem;
}
.section-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(39,174,96,.6);
  flex-shrink: 0;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--text);
}
.section-count {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-hint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .65rem;
}

/* ═══════════════════════════════════════════════════════
   ESTABLISHMENT GRID
═══════════════════════════════════════════════════════ */
.est-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

/* Skeleton */
.est-skel {
  height: 320px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface) 25%, #e8eee9 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Establishment Card */
.est-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .22s, transform .22s, border-color .22s;
  display: flex;
  flex-direction: column;
}
.est-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(-2px);
  border-color: var(--border2);
}

.est-cover {
  height: 150px;
  width: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.est-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.est-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 4px;
}
.est-closed-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
}

.est-card-body {
  padding: .9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1;
}
.est-name-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.est-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .6rem;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 600;
  flex-shrink: 0;
}
.open-badge--open  { background: var(--success-light); color: var(--success); }
.open-badge--closed{ background: var(--error-light);   color: var(--error);   }
.open-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
}
.open-badge--open  .open-badge-dot { background: var(--success); }
.open-badge--closed .open-badge-dot { background: var(--error); }

.est-desc {
  font-size: .78rem;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.est-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.est-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .22rem .55rem;
  border-radius: 8px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.est-rating-row {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.star { color: #f5a623; font-size: .8rem; }
.est-rating-val { font-size: .75rem; font-weight: 700; color: var(--text-sec); }
.est-rating-count { font-size: .7rem; color: var(--text-hint); }
.est-addr {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .72rem;
  color: var(--text-hint);
  margin-top: auto;
}
.est-addr svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   ESTABLISHMENT PAGE HEADER
═══════════════════════════════════════════════════════ */
.est-page-hdr {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem 0 1rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: .8rem;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: .4rem .9rem .4rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-sec);
  flex-shrink: 0;
  transition: border-color .18s, color .18s;
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { border-color: var(--green); color: var(--green); }

.est-page-titles { flex: 1; overflow: hidden; }
.est-page-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.est-page-sub {
  font-size: .72rem;
  color: var(--text-hint);
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.est-cart-btn { border-color: rgba(255,255,255,.18); }

/* Rating row on est page */
.est-rating-row {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 0 .8rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════
   CATEGORY TABS (sticky in est view)
═══════════════════════════════════════════════════════ */
.cat-tabs-sticky {
  position: sticky;
  top: calc(var(--nav-h) + var(--search-h));
  z-index: 50;
  background: var(--bg);
  padding: .6rem 0;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: .8rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-tabs-sticky::-webkit-scrollbar { display: none; }
.cat-tabs {
  display: flex;
  gap: .5rem;
  width: max-content;
}
.cat-tab {
  padding: .38rem .9rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  color: var(--text-sec);
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.cat-tab:hover { border-color: var(--green); color: var(--green); }
.cat-tab--active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(39,174,96,.3);
}

/* Closed banner */
.closed-banner {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--error-light);
  border: 1px solid rgba(231,76,60,.2);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-size: .8rem;
  color: var(--error);
  font-weight: 500;
  margin-bottom: .8rem;
}
.closed-banner[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════
   PRODUCT GRID
═══════════════════════════════════════════════════════ */
.cat-group-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  margin-top: 1.2rem;
}
.cat-group-title:first-child { margin-top: 0; }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .9rem;
  margin-bottom: 1.2rem;
}

/* Skeleton products */
.prod-skel {
  height: 260px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, #e8eee9 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Product Card */
.prod-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.prod-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-1px); }

.prod-img-wrap {
  position: relative;
  height: 140px;
  flex-shrink: 0;
  overflow: hidden;
}
.prod-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.prod-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
}
.prod-unavail-badge, .prod-qty-badge {
  position: absolute;
  top: 8px;
  border-radius: 8px;
  font-size: .7rem;
  font-weight: 700;
  padding: .18rem .55rem;
}
.prod-unavail-badge { right: 8px; background: var(--error-light); color: var(--error); }
.prod-qty-badge     { left: 8px;  background: var(--green); color: #fff; }

.prod-info {
  padding: .7rem .75rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}
.prod-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-desc {
  font-size: .7rem;
  color: var(--text-sec);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .5rem;
}
.prod-price {
  font-size: .88rem;
  font-weight: 700;
  color: var(--green);
}
.prod-price-old {
  font-size: .7rem;
  color: var(--text-hint);
  text-decoration: line-through;
  margin-left: .25rem;
}

/* Add button */
.btn-add {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--green);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .18s, transform .15s;
}
.btn-add svg { width: 18px; height: 18px; }
.btn-add:hover { background: var(--green-dark); transform: scale(1.06); }

/* Qty row (−N+) */
.qty-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.qty-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--green);
  background: none;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.qty-btn svg { width: 14px; height: 14px; }
.qty-btn:hover { background: var(--green-dim); }
.qty-val {
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
  min-width: 18px;
  text-align: center;
}

/* Unavailable */
.btn-unavail {
  padding: .3rem .7rem;
  border-radius: 8px;
  background: var(--error-light);
  color: var(--error);
  font-size: .72rem;
  font-weight: 600;
  border: none;
}

/* ═══════════════════════════════════════════════════════
   CART BOTTOM BAR (sticky in est view)
═══════════════════════════════════════════════════════ */
.cart-go-bar {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--green);
  border-radius: 50px;
  padding: .7rem 1rem .7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  box-shadow: 0 8px 30px rgba(39,174,96,.45);
  animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
.cart-go-bar[hidden] { display: none; }
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cart-go-info  { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.75); }
.cart-go-btn   { background: rgba(255,255,255,.2); border: none; border-radius: 50px; padding: .38rem 1rem; font-family: inherit; font-size: .82rem; font-weight: 700; color: #fff; }
.cart-go-total { font-size: .88rem; font-weight: 700; color: #fff; }

/* ═══════════════════════════════════════════════════════
   PANELS
═══════════════════════════════════════════════════════ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.42);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.panel-overlay.visible { opacity: 1; pointer-events: all; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  background: var(--surface);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.25,.8,.25,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 40px rgba(0,0,0,.18);
  overscroll-behavior: contain;
}
.panel.open { transform: translateX(0); }

.panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem .9rem;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.panel-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-hint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-close svg { width: 14px; height: 14px; }
.panel-close:hover { background: var(--border); color: var(--text); }

.btn-clear-cart {
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  color: var(--error);
  background: none;
  border: none;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: 6px;
  transition: background .15s;
}
.btn-clear-cart:hover { background: var(--error-light); }

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════
   CART PANEL BODY
═══════════════════════════════════════════════════════ */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 3rem 1.5rem;
  text-align: center;
  height: 100%;
}
.cart-empty-icon { font-size: 3rem; }
.cart-empty-title { font-size: .95rem; font-weight: 600; color: var(--text); }
.cart-empty-sub   { font-size: .78rem; color: var(--text-hint); }

.cart-est-name {
  padding: .8rem 1.2rem .5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-hint);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.cart-item-info { flex: 1; overflow: hidden; }
.cart-item-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-label {
  font-size: .68rem;
  color: var(--text-hint);
  margin-top: .15rem;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.cart-item-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  min-width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.cart-summary {
  padding: 1rem 1.2rem;
  border-top: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--text-sec);
}
.cart-row--total { font-weight: 700; font-size: .9rem; color: var(--text); }
.cart-divider { height: 1px; background: var(--border); margin: .2rem 0; }

.cart-addr-label {
  padding: .2rem 1.2rem 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--text-hint);
  text-transform: uppercase;
}
.cart-addr-input {
  margin: .4rem 1.2rem;
  padding: .7rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .84rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  width: calc(100% - 2.4rem);
  box-sizing: border-box;
}
.cart-addr-input:focus { border-color: var(--green); }
.cart-note-input {
  resize: none;
  min-height: 60px;
  line-height: 1.45;
}

.cart-order-btn {
  margin: .5rem 1.2rem;
  padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
}

/* Service fee row */
.cart-row--fee {
  font-size: .78rem;
  color: var(--text-hint);
}

/* Delivery tariff selector */
.cart-tariff-wrap { padding: 0 1.2rem .2rem; }
.cart-tariffs {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .4rem;
}
.cart-tariff {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .18s, background .18s;
  user-select: none;
}
.cart-tariff:hover { border-color: var(--green-border); background: var(--green-dim); }
.cart-tariff.selected {
  border-color: var(--green);
  background: var(--green-dim);
}
.cart-tariff input[type="radio"] { display: none; }
.cart-tariff-name {
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.cart-tariff-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
}
.cart-tariff.selected .cart-tariff-name { color: var(--green); }

/* Separate summary block for total */
.cart-summary--total {
  border-top: 1.5px solid var(--border);
  margin-top: .4rem;
}

/* ═══════════════════════════════════════════════════════
   PROFILE PANEL BODY
═══════════════════════════════════════════════════════ */

/* Auth tabs in profile */
.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin: 1rem 1.2rem .2rem;
}
.auth-tab {
  flex: 1;
  padding: .48rem;
  text-align: center;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  color: var(--text-hint);
  background: none;
  transition: background .18s, color .18s;
}
.auth-tab.active { background: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(39,174,96,.35); }

.auth-form { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--text-hint);
  text-transform: uppercase;
}
.auth-input-wrap { position: relative; }
.auth-prefix {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .84rem;
  color: var(--text-hint);
  pointer-events: none;
}
.auth-input {
  width: 100%;
  padding: .68rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .84rem;
  color: var(--text);
  outline: none;
  background: var(--surface);
  transition: border-color .18s;
}
.auth-input.has-prefix { padding-left: 2.9rem; }
.auth-input:focus { border-color: var(--green); }
.auth-input::placeholder { color: var(--text-hint); }
.auth-err { font-size: .72rem; color: var(--error); display: none; }
.auth-err.show { display: block; }

.auth-general-err {
  font-size: .76rem;
  color: var(--error);
  background: var(--error-light);
  border-radius: var(--radius-sm);
  padding: .55rem .8rem;
  display: none;
}
.auth-general-err.show { display: block; }

/* Submit button */
.btn-primary {
  width: 100%;
  padding: .75rem;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .86rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .18s, transform .15s, box-shadow .18s;
  box-shadow: 0 4px 16px rgba(39,174,96,.35);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(39,174,96,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  color: var(--text-hint);
  margin: 0 1.2rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s, background .18s;
  margin: 0 0 0 0;
}
.btn-google:hover { background: var(--surface2); border-color: var(--border2); }
.btn-google svg { width: 18px; height: 18px; }

.auth-switch { text-align: center; font-size: .76rem; color: var(--text-hint); padding: .4rem 1.2rem .8rem; }
.auth-switch-btn { background: none; border: none; font-family: inherit; font-size: .76rem; font-weight: 600; color: var(--green); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Profile view */
.profile-view { padding: 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 2px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 auto;
}
.profile-name { text-align: center; font-size: 1rem; font-weight: 700; color: var(--text); }
.profile-phone { text-align: center; font-size: .8rem; color: var(--text-hint); }

.btn-outline {
  width: 100%;
  padding: .68rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.btn-outline:hover { border-color: var(--error); color: var(--error); }

/* Order history */
.history-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-hint);
  text-transform: uppercase;
  padding: .4rem 1.2rem 0;
}
.history-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.history-info { flex: 1; }
.history-est { font-size: .82rem; font-weight: 600; color: var(--text); }
.history-meta { font-size: .72rem; color: var(--text-hint); margin-top: .1rem; }
.history-price { font-size: .84rem; font-weight: 700; color: var(--text); text-align: right; }
.status-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-top: .25rem;
}
.status-new        { background: #fff3cd; color: #856404; }
.status-preparing  { background: #fff3cd; color: #d46b08; }
.status-on_the_way { background: #cff4fc; color: #0c5460; }
.status-completed,
.status-delivered  { background: var(--success-light); color: var(--success); }
.status-cancelled  { background: var(--error-light); color: var(--error); }
.status-default    { background: var(--surface2); color: var(--text-sec); }

.history-empty { padding: 2rem 1.2rem; text-align: center; font-size: .82rem; color: var(--text-hint); }

/* Expanded order card */
.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.history-order-items {
  margin-top: .45rem;
  padding-top: .45rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.history-order-item {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  font-size: .74rem;
}
.history-order-name {
  flex: 1;
  color: var(--text-sec);
  font-weight: 500;
}
.history-order-mod {
  color: var(--text-hint);
  font-weight: 400;
}
.history-order-qty {
  color: var(--text-hint);
  white-space: nowrap;
}
.history-order-price {
  color: var(--text-sec);
  font-weight: 600;
  white-space: nowrap;
  min-width: 38px;
  text-align: right;
}

/* History toggle button */
.btn-history-toggle {
  display: block;
  width: 100%;
  margin-top: .6rem;
  padding: .55rem 1rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-history-toggle:hover { background: var(--surface-alt); }

/* Product search results */
.prod-search-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .4rem; }
.prod-search-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.prod-search-item:hover { background: var(--surface-alt); transform: translateY(-1px); }
.prod-search-info { flex: 1; min-width: 0; }
.prod-search-name { font-size: .88rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-search-est  { font-size: .75rem; color: var(--text-hint); margin-top: 2px; }
.prod-search-price { font-size: .88rem; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   OPTIONS MODAL
═══════════════════════════════════════════════════════ */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-wrap[hidden] { display: none; }
.modal-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: thin;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.2rem .8rem;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.modal-price { font-size: .9rem; font-weight: 700; color: var(--green); margin-top: .25rem; }
.modal-body { padding: .8rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer { padding: .5rem 1.2rem 1.4rem; }

.option-group-title { font-size: .78rem; font-weight: 700; color: var(--text-sec); margin-bottom: .5rem; }
.option-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.option-pill {
  padding: .38rem .9rem;
  border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.option-pill.selected { background: var(--green); border-color: var(--green); color: #fff; }

.addition-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.addition-item:last-child { border-bottom: none; }
.addition-check {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.addition-item.checked .addition-check { background: var(--green); border-color: var(--green); }
.addition-check svg { width: 12px; height: 12px; color: #fff; }
.addition-name { flex: 1; font-size: .82rem; font-weight: 500; color: var(--text); }
.addition-price { font-size: .8rem; font-weight: 600; color: var(--green); }
.modal-add-btn { font-size: .88rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   REVIEW MODAL
═══════════════════════════════════════════════════════ */
.review-stars-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-hint);
  margin-bottom: .6rem;
}
.review-stars {
  display: flex;
  gap: .4rem;
  margin-bottom: .35rem;
}
.review-star {
  font-size: 2.4rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--border2);
  transition: color .12s, transform .12s;
  padding: 0;
}
.review-star:hover,
.review-star.filled { color: #f5a623; }
.review-star:hover   { transform: scale(1.15); }
.review-stars-hint {
  font-size: .72rem;
  color: var(--text-hint);
  margin-bottom: .9rem;
  min-height: 1em;
}
.review-textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .84rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color .18s;
  background: var(--surface);
  min-height: 90px;
}
.review-textarea:focus { border-color: var(--green); }
.review-textarea::placeholder { color: var(--text-hint); }

/* Review button in rating row */
.btn-review {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .32rem .75rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-border);
  cursor: pointer;
  transition: background .18s, border-color .18s;
  margin-left: auto;
}
.btn-review:hover { background: color-mix(in srgb, var(--green) 20%, white); border-color: var(--green); }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,.7);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.footer-app-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: .8rem;
}
.footer-badges { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.footer-badge {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.1rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  color: #fff;
  transition: background .2s, border-color .2s;
  min-width: 145px;
}
.footer-badge:not(.footer-badge--disabled):hover { background: rgba(255,255,255,.13); border-color: rgba(82,214,138,.35); }
.footer-badge--disabled {
  opacity: .35;
  filter: grayscale(1);
  cursor: not-allowed;
  pointer-events: none;
}
.footer-badge-icon { font-size: 1.3rem; }
.footer-badge-text { display: flex; flex-direction: column; text-align: left; }
.footer-badge-sub  { font-size: .6rem; color: rgba(255,255,255,.5); letter-spacing: .03em; }
.footer-badge-name { font-size: .84rem; font-weight: 700; }
/* Mobile copyright */
.footer-copy-mobile { font-size: .7rem; letter-spacing: .06em; text-align: center; padding-bottom: 1.4rem; }

/* Brand block — shown only on desktop */
.footer-brand { display: none; }
.footer-brand-logo {
  font-size: 1.25rem; font-weight: 900; letter-spacing: .12em;
  color: #fff; text-transform: uppercase; text-decoration: none;
  border: 2px solid rgba(255,255,255,.3);
  display: inline-block; padding: .15rem .6rem; border-radius: 6px;
  margin-bottom: .55rem;
  transition: border-color .18s, color .18s;
}
.footer-brand-logo:hover { border-color: rgba(82,214,138,.6); color: var(--green-bright); }
.footer-brand-tagline { font-size: .75rem; color: rgba(255,255,255,.42); margin-bottom: .9rem; }
.footer-brand-copy    { font-size: .67rem; color: rgba(255,255,255,.28); letter-spacing: .04em; }

/* Contacts label — shown only on desktop */
.footer-contacts-label { display: none; }

.footer-contacts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem 1rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.18);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: background .18s, border-color .18s;
}
.footer-contact-link:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.footer-contact-link svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Desktop footer layout ─────────────────────────────────── */
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    gap: 2rem;
    padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 2rem;
  }
  .footer-brand { display: flex; flex-direction: column; min-width: 160px; }
  .footer-copy-mobile { display: none; }
  .footer-app { text-align: center; }
  .footer-app-label { text-align: center; }
  .footer-badges { justify-content: center; }
  .footer-contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    min-width: 140px;
  }
  .footer-contacts-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    margin-bottom: .3rem;
  }
}

/* ═══════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════ */
.toast-wrap {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column-reverse;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: #1a2e22;
  color: #fff;
  padding: .65rem 1.1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
}
.toast--success { background: var(--green); }
.toast--error   { background: var(--error); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}
.empty-state[hidden] { display: none; }
.empty-icon  { font-size: 3.5rem; margin-bottom: .8rem; }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.empty-sub   { font-size: .82rem; color: var(--text-hint); }

/* ═══════════════════════════════════════════════════════
   ROLE CARDS (register form)
═══════════════════════════════════════════════════════ */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .8rem .5rem .7rem;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  text-align: center;
  user-select: none;
}
.role-card:hover { background: var(--green-dim); border-color: var(--green-border); }
.role-card input[type="radio"] { display: none; }
.role-card:has(input:checked) {
  background: var(--green-dim);
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent);
}
.role-icon { font-size: 1.6rem; }
.role-name { font-size: .78rem; font-weight: 700; color: var(--text); }
.role-desc { font-size: .65rem; color: var(--text-hint); }

/* ═══════════════════════════════════════════════════════
   PROFILE EDIT FORM
═══════════════════════════════════════════════════════ */
.profile-edit-form { display: flex; flex-direction: column; gap: .8rem; }
.profile-edit-row  { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.auth-input--readonly {
  background: var(--surface2) !important;
  color: var(--text-hint) !important;
  cursor: not-allowed;
}
.auth-hint {
  font-size: .67rem;
  color: var(--text-hint);
  margin-top: -.1rem;
}

.profile-full-name {
  text-align: center;
  font-size: .82rem;
  color: var(--text-sec);
  margin-top: -.5rem;
}
.profile-role-badge {
  text-align: center;
  display: inline-block;
  margin: -.3rem auto 0;
  padding: .18rem .65rem;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-border);
}

/* Panel link button (admin / owner / courier / etc.) */
.profile-panel-wrap {
  padding: 0 1.2rem .2rem;
}
.btn-panel-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, var(--green-dim) 0%, color-mix(in srgb, var(--green) 8%, white) 100%);
  border: 1.5px solid var(--green-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.btn-panel-link:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 18%, white) 0%, color-mix(in srgb, var(--green) 12%, white) 100%);
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(39,174,96,.2);
  transform: translateY(-1px);
}
.btn-panel-link-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-panel-link-icon svg { width: 18px; height: 18px; stroke: #fff; }
.btn-panel-link-text { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.btn-panel-link-label { font-size: .84rem; font-weight: 700; color: var(--text); }
.btn-panel-link-sub   { font-size: .7rem; color: var(--green); font-weight: 600; }
.btn-panel-link-arrow { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

/* History section inside profile panel */
.history-section {
  border-top: 1.5px solid var(--border);
  margin-top: .5rem;
}

/* Logout wrapper */
.profile-logout-wrap {
  padding: .8rem 1.2rem 1.5rem;
  border-top: 1.5px solid var(--border);
  margin-top: .3rem;
}
.btn-logout {
  width: 100%;
  padding: .68rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--error);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.btn-logout:hover { border-color: var(--error); background: var(--error-light); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .nav-btn span { display: none; }
  .nav-btn--ghost { padding: .5rem .7rem; }
  .nav-btn--whatsapp { padding: .5rem .7rem; }

  .est-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .prod-img-wrap { height: 120px; }
  .prod-img-placeholder { font-size: 2.5rem; }

  .panel { width: 100vw; }

  .modal { border-radius: 20px 20px 0 0; max-height: 90vh; }
  .modal-wrap { align-items: flex-end; }

  .cart-go-bar { bottom: .8rem; width: calc(100% - 2rem); border-radius: 14px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .est-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1025px) {
  .prod-grid { grid-template-columns: repeat(4, 1fr); }
}
