@import url("https://fonts.googleapis.com/css2?family=Sour+Gummy:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;700&display=swap");

:root {
  --bg: #f7f4ee;
  --card: #ffffff;
  --ink: #1c2524;
  --muted: #5f6b66;
  --accent: #1a7f5a;
  --accent-2: #f1c453;
  --line: #e2ddd2;
  --shadow: 0 14px 30px rgba(27, 39, 37, 0.08);
}

/* ==============================
   FreshCart Navigation (fc-nav)
   - Desktop: Logo left, main links middle, utility right
   - Hover: bold + underline
   - Dropdown: hover fade/slide down, hide on leave
   - Mobile: hide main links, keep utility right, clicking logo toggles menu
   ============================== */

.fc-nav{ position: sticky; top: 0; z-index: 1100; background: #fff; border-bottom: 1px solid #eef2f7; }
.fc-nav__inner{ max-width: 1200px; margin: 0 auto; padding: 12px 16px; display:flex; align-items:center; justify-content: space-between; gap: 18px; }

.fc-logo{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 20px;
  letter-spacing: 0.2px;
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
}

.fc-logo-icon {
  color: var(--accent);
}

/* Hamburger icon inside logo (hidden on desktop) */
.fc-burger-icon {
  display: none;
  margin-right: 8px;
}

.fc-nav__links{ display:flex; align-items:center; gap: 16px; flex: 1; justify-content: flex-start; margin-left: 22px; }
.fc-link{ color:#111827; text-decoration:none; padding: 6px 8px; border-radius: 8px; }

.fc-nav__utils{ display:flex; align-items:center; gap: 14px; justify-content:flex-end; }
.fc-util-link{ color:#111827; text-decoration:none; padding: 6px 8px; border-radius: 8px; }

/* Hover style: bold + underline */
.fc-link:hover,
.fc-util-link:hover,
.fc-dd__btn:hover,
.footer-links a:hover{
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fc-cart{ color:var(--accent); text-decoration:none; padding: 6px 10px; border-radius: 999px; border: 1px solid #e5e7eb; display:inline-flex; align-items:center; gap: 8px; }
.fc-cart:hover{ border-color: #cbd5e1; }
.fc-badge{ display:inline-flex; align-items:center; justify-content:center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #16a34a; color:#fff; font-size: 12px; font-weight: 700; }

/* Dropdown */
.fc-dd{ position: relative; }
.fc-dd__btn{
  background: none;
  border: none;
  color:#111827;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  font: inherit;
  display:inline-flex;
  align-items:center;
  gap: 6px;
}
.fc-tri{ font-size: 11px; opacity: .8; transform: translateY(1px); }

.fc-dd__menu{
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17,24,39,0.10);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

/* Bridge the gap between button and menu so hover is sustained */
.fc-dd__menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
}

.fc-dd:hover .fc-dd__menu,
.fc-dd:focus-within .fc-dd__menu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fc-dd__item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  color:#111827;
  text-decoration:none;
}
.fc-dd__item:hover{ background: rgba(26,95,122,0.08); }
.fc-dd__ico{ width: 18px; display:inline-flex; justify-content:center; }

/* Mobile panel */
.fc-mobile{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  padding: 12px 16px 24px;
  max-height: 85vh;
  overflow-y: auto;
}
.fc-mobile__group{ border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; background:#fff; margin-top: 10px; box-shadow: 0 8px 20px rgba(17,24,39,0.06); }
.fc-mobile__title{ font-weight: 800; margin-bottom: 6px; }
.fc-mobile__link{ display:flex; align-items:center; gap: 10px; padding: 10px 8px; border-radius: 10px; text-decoration:none; color:#111827; }
.fc-mobile__link:hover{ background: rgba(26,95,122,0.08); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

/* Footer: add same hover underline/bold + icon alignment */
.footer-links a{ display:inline-flex; align-items:center; gap: 8px; color:#111827; text-decoration:none; padding: 6px 8px; border-radius: 10px; }
.footer-links a:hover{ background: rgba(26,95,122,0.08); }
.footer-links .footer-ico{ width: 16px; display:inline-flex; justify-content:center; }

@media (max-width: 900px){
  .fc-nav__links{ display:none; }
  .fc-nav__inner{ gap: 10px; }
  .fc-nav__utils{ gap: 10px; }
  .fc-burger-icon { display: inline; }
  .fc-hide-mobile { display: none !important; }
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff, var(--bg) 60%);
}

/* Typography for card-like components */
.product-card,
.auth-card,
.portal-card,
.summary-card,
.cart-item,
.admin-row,
.card {
  font-family: 'Sour Gummy', 'Noto Sans TC', 'Chocolate Classical Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.underline { text-decoration: underline; }

/* Password eye icon inside input (right) */
.input-with-eye{
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-with-eye input{
  width: 100%;
  padding-right: 2.5rem;
  padding-left: 12px;
}
.eye-btn{
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: .75;
}
.eye-btn:hover{ opacity: 1; }
.pwd-meta{ margin-top: .35rem; }

/* Checkout order summary thumbnails */
.summary-item{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.summary-thumb{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.08);
}
.summary-item-meta{ flex: 1; min-width: 0; }
.summary-item-title{ font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Slide-down panel (payment proof) */
.slide-panel{
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
  margin-top: 10px;
}
.slide-panel.open{ max-height: 240px; }
.proof-preview img{ width: 120px; height: auto; border-radius: 12px; border: 1px solid rgba(0,0,0,.08); margin-top: 8px; }


img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.sub {
  color: var(--muted);
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.page {
  padding: 32px clamp(16px, 4vw, 56px) 80px;
}

.page-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(14px, 3vw, 48px) 56px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(16px, 4vw, 56px);
  position: sticky;
  top: 0;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.logo a {
  font-family: "Fraunces", serif;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.nav-links, .nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-actions .admin-link {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.hero-text h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 4vw, 44px);
  margin: 8px 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
}

.hero-card {
  background: linear-gradient(140deg, #fef7e1, #dff2e8);
  padding: 24px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap input {
  width: min(420px, 90vw);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.search-social {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.social-ico svg { width: 18px; height: 18px; fill: currentColor; }

.social-ico.fb { color: #1877F2; }
.social-ico.ig { color: #E1306C; }
.social-ico.yt { color: #FF0000; }
.social-ico.pin { color: #BD081C; }

.social-ico:hover {
  transform: translateY(-1px);
  filter: brightness(0.85);
  background: rgba(17, 24, 39, 0.04);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card);
  padding: 16px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.product-detail .card-actions {
  margin-top: 24px;
}

.variant-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}

/* Placeholder keeps card layout consistent when a product has no variants */
.variant-placeholder {
  height: 44px;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.product-card img {
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #f0f0f0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f1efe7;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.product-detail img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  background: #f0f0f0;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.product-detail > div {
  max-width: 460px;
  margin: 0 auto;
}

.gallery {
  display: grid;
  gap: 12px;
}

.gallery-main {
  border-radius: 20px;
  overflow: hidden;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}

.gallery-thumbs img {
  border-radius: 12px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}

.gallery-thumbs img.active {
  border-color: var(--accent);
}

.form-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-section h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input, select, textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="search"]), select, textarea {
  width: 100%;
}

textarea {
  resize: vertical;
}

.checkout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
}

.checkout-summary {
  background: var(--card);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.summary-items {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.summary-row.total {
  font-size: 18px;
  margin-top: 16px;
}

.cart-section {
  display: grid;
  gap: 24px;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-item {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow);
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cart-summary {
  display: grid;
  gap: 12px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.form-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.success-message {
  background: #e6f4ee;
  border: 1px solid #bde3d3;
  padding: 16px;
  border-radius: 16px;
}

.portal-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portal-card {
  background: var(--card);
  padding: 20px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  align-content: start;
}

.portal-list {
  display: grid;
  gap: 10px;
}

.portal-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.portal-item:last-child { border-bottom: none; }

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}

.hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px clamp(16px, 4vw, 56px) 24px;
  background: #f9f7f2;
  display: block;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-col {
  text-align: left;
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 24px;
  text-align: left;
}

.footer-copy {
  text-align: center;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 16px;
  top: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .toast {
    bottom: auto;
    top: 16px;
    left: 16px;
    right: 16px;
    transform: translateY(-20px);
    z-index: 2000;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .product-detail img {
    max-width: 320px;
  }
  .checkout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ */
/* Checkout: tooltips + payments  */
/* ------------------------------ */

.payment-methods {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 2px;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  color: #475467;
  font-size: 12px;
  line-height: 1;
  cursor: help;
  position: relative;
  user-select: none;
}

.hint-icon[data-tooltip]:hover::after,
.hint-icon[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 125%;
  transform: translateX(-50%);
  width: min(260px, 70vw);
  background: #101828;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.18);
  z-index: 30;
  white-space: normal;
}

.hint-icon[data-tooltip]:hover::before,
.hint-icon[data-tooltip]:focus::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 110%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #101828;
}

.qr-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.qr {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  border: 1px solid #e4e7ec;
  background: #fff;
}

.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.success-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.success-meta {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
}

.small { font-size: 12px; }


/* === v1.6 UI state + greeting === */
.nav-greeting{
  margin-left: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  white-space: nowrap;
}
body.state-admin .site-nav{ border-bottom: 2px solid #7c3aed; }
body.state-admin .btn.primary{ background: #7c3aed; border-color:#7c3aed; }
body.state-admin .admin-link{ font-weight: 700; color:#7c3aed; }

body.state-member .site-nav{ border-bottom: 2px solid #2563eb; }
body.state-member .btn.primary{ background:#2563eb; border-color:#2563eb; }

.nav-icon-link{ display:inline-flex; align-items:center; gap:8px; }
.nav-ico{ display:inline-flex; width:18px; justify-content:center; }

/* Confirm modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.modal{
  width:min(520px, calc(100vw - 32px));
  background:#fff;
  border-radius:20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.25);
  border:1px solid #e5e7eb;
  overflow:hidden;
}
.modal-header{
  padding:16px 18px;
  border-bottom:1px solid #e5e7eb;
  font-weight:700;
}
.modal-body{ padding:16px 18px; color:#334155; }
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 18px 18px;
  border-top:1px solid #e5e7eb;
}
.btn.danger{ background:#dc2626; border-color:#dc2626; color:#fff; }

.product-card .card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.like-btn{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:0.9rem;
  cursor:pointer;
}
.like-btn.liked{ border-color:#ef4444; color:#ef4444; }
.qty-select{
  width:100%;
  max-width: 120px;
  margin-top:8px;
}
.qty-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0;
}
.qty-row label{ margin:0; }
.qty-row select{ flex:1; }

/* Cart thumbnail */
.cart-thumb{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #e2e8f0;
}

/* Form spacing improvements */
.form-actions{ 
  margin-top: 14px; 
  display: flex;
  justify-content: center;
}

/* Password field tools */
.pwd-tools{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:6px;
}
.pwd-toggle{
  border:none;
  background:transparent;
  cursor:pointer;
  color:#2563eb;
  font-weight:600;
}
.pwd-status{
  font-size:0.9rem;
}
.pwd-status.ok{ color:#16a34a; }
.pwd-status.bad{ color:#dc2626; }

/* Remarks highlight in admin tables */
.flag-remark{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  background:#fff7ed;
  border:1px solid #fdba74;
  color:#9a3412;
  font-size:0.8rem;
  font-weight:700;
}

.cart-item-left{
  display:flex;
  align-items:center;
  gap:12px;
}
.qty-inline{
  display:flex;
  align-items:center;
  gap:8px;
}



/* ===== Category filters & search (Index) ===== */
.search-row { margin-top: 14px; }
.search-input {
  width: 100%;
  max-width: 640px;
  padding: 12px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
}
.category-row { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.category-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.cat-btn.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}
.category-select {
  display: none;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

/* Mobile: use dropdown instead of many buttons */
@media (max-width: 640px) {
  .category-buttons { display: none; }
  .category-select { display: block; width: 100%; max-width: 100%; }
  .search-input { width: 100%; max-width: 100%; }
}

/* ===== Responsive Nav (hamburger) ===== */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid #f0f0f0; }
.site-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; }
.nav-toggle {
  display: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle .bar { display:block; width: 18px; height: 2px; background:#111827; margin: 4px 0; }

.nav-menu { display:flex; align-items:center; justify-content: space-between; gap: 14px; width: 100%; }
.nav-links, .nav-actions { display:flex; gap: 12px; align-items:center; flex-wrap: wrap; }

/* Keep admin controls on far right */
.nav-actions { flex: 1; justify-content: flex-end; }
.nav-actions-main { display:flex; gap: 12px; align-items:center; flex-wrap: wrap; }
.nav-actions-admin { display:flex; gap: 12px; align-items:center; margin-left: auto; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; flex-direction: column; align-items: stretch; width: 100%; padding: 10px 16px 14px; }
  .site-nav.is-open .nav-menu { display: flex; }
  .nav-links, .nav-actions { width: 100%; justify-content: flex-start; }
  .nav-actions { gap: 10px; }
}


/* --- FreshCart header (hi-fi nav) --- */
.site-nav{
  background:#fff !important;
  backdrop-filter:none !important;
  border-bottom:1px solid rgba(17,24,39,.10) !important;
  box-shadow: 0 8px 22px rgba(17,24,39,.06);
}
.site-nav .nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
}
.site-nav .nav-menu{
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 56px);
}
.site-nav .nav-links a,
.site-nav .nav-actions a,
.site-nav .nav-dd-trigger{
  color:#111827;
  text-decoration:none;
  font-weight:500;
  font-size:15px;
}
.site-nav .nav-dd-trigger{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:transparent;
  border:0;
  padding:6px 6px;
  cursor:pointer;
}
.site-nav .nav-dd-trigger .chev{ font-size:12px; opacity:.8; }
.site-nav .nav-links > a,
.site-nav .nav-links > .nav-dd{
  position:relative;
}
.site-nav .nav-links > a:hover,
.site-nav .nav-actions a:hover,
.site-nav .nav-dd-trigger:hover{
  font-weight:700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Dropdown panel */
.nav-dd{ position:relative; }
.nav-dd-panel{
  position:absolute;
  left:0;
  top: calc(100% + 10px);
  min-width: 520px;
  background:#1a5f7a;
  color:#fff;
  border-radius:14px;
  box-shadow: 0 18px 45px rgba(17,24,39,.18);
  padding:14px;
  display:none;
  z-index: 20;
}
.nav-dd:hover .nav-dd-panel,
.nav-dd:focus-within .nav-dd-panel,
.nav-dd.open .nav-dd-panel{
  display:block;
}
.dd-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dd-col{ display:flex; flex-direction:column; gap:8px; }
.dd-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:600;
}
.dd-ic{
  width:22px; height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.95;
}
.dd-ic svg{ width:22px; height:22px; }
.dd-item:hover{
  background: rgba(255,255,255,.12);
}
.dd-item:hover .dd-text{
  font-weight:800;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Cart badge */
.cart-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background:#1f7a4f;
  color:#fff;
  font-weight:800;
  margin-left:8px;
}

/* Mobile behaviour */
@media (max-width: 860px){
  .nav-dd-panel{
    position: static;
    min-width: auto;
    width: 100%;
    margin-top:10px;
  }
  .dd-grid{ grid-template-columns:1fr; }
}



/* === Hi-fi Nav refinements (v1.6.9) === */
.nav-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:flex-end; }
.nav-social { display:flex; align-items:center; gap:10px; margin-left:6px; }
.nav-social a { display:inline-flex; width:28px; height:28px; align-items:center; justify-content:center; border-radius:999px; transition: transform .15s ease, filter .15s ease, background-color .15s ease; }
.nav-social a:hover { transform: translateY(-1px); filter: brightness(0.9); background: rgba(26,95,122,0.08); }
.nav-social svg { width:16px; height:16px; display:block; }

.nav-dd { position:relative; }
.nav-dd-trigger { transition: transform .15s ease; }
.nav-dd:hover .nav-dd-trigger, .nav-dd[data-open="true"] .nav-dd-trigger { transform: translateY(1px); }

.nav-dd-panel {
  background:#ffffff;
  border:1px solid rgba(10,25,38,0.18);
  box-shadow: 0 18px 40px rgba(10,25,38,0.10);
  border-radius: 14px;
  padding: 10px 12px;
  transform-origin: top;
  transform: translateY(8px);
}
.nav-dd-panel .dd-grid { gap: 14px; }
.dd-item { border-radius: 10px; padding: 10px 10px; transition: background-color .15s ease, transform .15s ease; }
.dd-item:hover { background: rgba(26,95,122,0.08); transform: translateY(-1px); }
.dd-item:hover .dd-text { font-weight:700; text-decoration: underline; text-underline-offset: 3px; }
.dd-ic { color:#1a5f7a; }

.footer a:hover { font-weight:700; text-decoration: underline; text-underline-offset: 3px; }

/* Checkout payment panels */
.pay-panel { overflow:hidden; max-height:0; opacity:0; transform: translateY(-4px); transition: max-height .25s ease, opacity .2s ease, transform .25s ease; }
.pay-panel.open { max-height: 520px; opacity:1; transform: translateY(0); }
.qr-box { display:flex; gap:12px; align-items:flex-start; }
.qr-img { width:120px; height:120px; border-radius:12px; border:1px solid rgba(10,25,38,0.15); cursor:zoom-in; }
.qr-note { font-size: 13px; color: rgba(10,25,38,0.72); }
.dropzone { border:2px dashed rgba(26,95,122,0.35); border-radius:14px; padding:14px; background: rgba(26,95,122,0.04); transition: background-color .15s ease, border-color .15s ease; }
.dropzone.dragover { background: rgba(26,95,122,0.08); border-color: rgba(26,95,122,0.6); }
.dropzone .dz-title { font-weight:700; margin-bottom:6px; }

/* QR Overlay */
.qr-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.qr-overlay-content { position: relative; max-width: 100%; max-height: 100%; animation: popIn 0.2s ease-out; }
.qr-overlay img { max-width: 100%; max-height: 80vh; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); display: block; }
.qr-close {
  position: absolute; top: -44px; right: 0;
  background: #fff; border: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== v1_6_10 NAV polish: align dropdown left, social above links, restore clean layout ===== */
.site-nav{ background:#fff; }
.site-nav .nav-menu{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:12px 16px;
}
.site-nav .nav-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  min-width: 420px;
}
.site-nav .nav-links{
  display:flex;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
}
.site-nav .nav-actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.site-nav .nav-social-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0;
}
.site-nav .nav-social-top a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:999px;
  transition: transform .12s ease, filter .12s ease, background-color .12s ease;
}
.site-nav .nav-social-top a:hover{
  transform: translateY(-1px);
  filter: brightness(0.92);
  background: rgba(26,95,122,0.06);
}
.site-nav .nav-dd{ position:relative; }
.site-nav .nav-dd-panel{
  position:absolute;
  left:0;
  top: calc(100% + 10px);
  min-width: 360px;
  z-index: 50;
  border-radius: 14px;
}
.site-nav .nav-dd-panel .dd-grid{ gap:0; }
.site-nav .nav-dd-panel .dd-col{ padding: 10px 0; }
.site-nav .nav-dd-panel .dd-item{ padding:10px 14px; }
.site-nav .nav-dd-panel .dd-item:hover .dd-text{
  font-weight:800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Mobile: hamburger menu -> stacked links; keep social above links */
@media (max-width: 860px){
  .site-nav .nav-menu{
    flex-direction:column;
    align-items:stretch;
    padding: 10px 12px 12px;
  }
  .site-nav .nav-left{
    min-width: unset;
    width: 100%;
  }
  .site-nav .nav-links{
    flex-direction:column;
    align-items:flex-start;
    gap: 10px;
  }
  .site-nav .nav-actions{
    justify-content:flex-start;
    margin-top: 8px;
  }
  .site-nav .nav-dd-panel{
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--ink);
  transform: translateY(-2px);
}
