/* style.css — EcoShop · Organic & Modern Green Theme */
/* Google Fonts được load qua <link> trong HTML để không block render */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --green-900: #0d2b1d;
  --green-800: #1a4a30;
  --green-700: #246040;
  --green-600: #2e7d52;
  --green-500: #3a9e68;
  --green-400: #55c485;
  --green-300: #85d9a8;
  --green-100: #e6f5ed;
  --green-50:  #f3fbf6;
  --sand:      #f7f2ea;
  --sand-dark: #e8dfd1;
  --text-dark: #1a2e22;
  --text-mid:  #3d5444;
  --text-light:#6b8573;
  --white:     #ffffff;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(13,43,29,.12);
  --shadow-lg: 0 12px 48px rgba(13,43,29,.18);
  --transition:0.25s cubic-bezier(.4,0,.2,1);
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}
img { display: block; max-width: 100%; object-fit: cover; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  border: 1.5px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  background: var(--white);
  color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58,158,104,.15);
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--green-900);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.logo {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--green-300);
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--white); }
.header-nav { display: flex; gap: 8px; }
.header-nav a {
  color: var(--green-300);
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
}
.header-nav a:hover, .header-nav a.active {
  background: var(--green-700);
  color: var(--white);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-500) 100%);
  padding: 90px 5% 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero h1 em { color: var(--green-300); font-style: normal; }
.hero p {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 34px;
}
.hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 14px 20px;
  font-size: 1rem;
  flex: 1;
  box-shadow: none;
}
.hero-search .btn-search {
  background: var(--green-500);
  color: var(--white);
  padding: 0 24px;
  font-size: .95rem;
  font-weight: 600;
  border-radius: 0 40px 40px 0;
  transition: background var(--transition);
}
.hero-search .btn-search:hover { background: var(--green-600); }

/* ── FILTER BAR ──────────────────────────────────────────── */
.filter-section {
  padding: 28px 5% 8px;
  text-align: center;
}
.filter-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-800);
  margin-bottom: 16px;
}
#filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filter-btn {
  padding: 9px 20px;
  border-radius: 24px;
  border: 2px solid var(--green-300);
  color: var(--green-700);
  font-weight: 500;
  font-size: .88rem;
  background: var(--white);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(46,125,82,.3);
}

/* ── PRODUCT GRID ────────────────────────────────────────── */
.products-section { padding: 30px 5% 60px; }
#product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 28px;
  margin-top: 20px;
}
.empty-msg, .error-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--text-light);
  font-size: 1.05rem;
}
.error-msg { color: #c0392b; }

/* ── PRODUCT CARD ─────────────────────────────────────────── */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes salePulse {
  0%, 100% { transform: scale(1) rotate(-2deg); box-shadow: 0 4px 16px rgba(220,38,38,.4); }
  50%       { transform: scale(1.06) rotate(-2deg); box-shadow: 0 6px 24px rgba(220,38,38,.6); }
}
@keyframes newGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(14,165,233,.4); }
  50%       { box-shadow: 0 4px 28px rgba(14,165,233,.7); }
}
@keyframes hotFlicker {
  0%, 90%, 100% { opacity: 1; }
  95%            { opacity: .7; }
}
@keyframes shimmerWave {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes ribbonSlide {
  from { transform: translateX(60px) rotate(45deg); opacity: 0; }
  to   { transform: translateX(0)    rotate(45deg); opacity: 1; }
}
@keyframes priceStrike {
  from { width: 0; }
  to   { width: 100%; }
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  animation: cardEntrance .4s ease both;
  position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Card shimmer sweep on hover */
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 2;
}
.product-card:hover::after {
  opacity: 1;
  animation: shimmerWave .7s ease forwards;
}

.card-img-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--green-100);
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-badge { position: absolute; top: 12px; left: 12px; }

/* ── Promo ribbon (corner) ─────────────────────────────────── */
.promo-ribbon {
  position: absolute;
  top: 18px;
  right: -30px;
  width: 110px;
  padding: 5px 0;
  text-align: center;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  transform: rotate(45deg);
  z-index: 5;
  animation: ribbonSlide .4s .2s cubic-bezier(.34,1.56,.64,1) both;
  pointer-events: none;
}
.promo-ribbon.ribbon-sale {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 2px 10px rgba(220,38,38,.45);
}
.promo-ribbon.ribbon-new {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(14,165,233,.4);
}
.promo-ribbon.ribbon-hot {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #fff;
  box-shadow: 0 2px 10px rgba(234,88,12,.4);
}
.promo-ribbon.ribbon-eco {
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  color: #fff;
  box-shadow: 0 2px 10px rgba(46,125,82,.4);
}

/* ── Inline promo tag (on price row) ──────────────────────── */
.promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.promo-tag.tag-sale {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
  animation: salePulse 2s ease-in-out infinite;
}
.promo-tag.tag-new {
  background: #f0f9ff;
  color: #0284c7;
  border: 1.5px solid #7dd3fc;
  animation: newGlow 2s ease-in-out infinite;
}
.promo-tag.tag-hot {
  background: #fff7ed;
  color: #ea580c;
  border: 1.5px solid #fdba74;
  animation: hotFlicker 3s ease-in-out infinite;
}

/* ── Price with sale ──────────────────────────────────────── */
.price-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.price-original {
  font-size: .78rem;
  color: var(--text-light);
  text-decoration: line-through;
  line-height: 1;
}
.price-sale {
  color: #dc2626 !important;
  font-size: 1.15rem !important;
}

.card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green-900);
  margin-bottom: 6px;
}
.card-origin { font-size: .82rem; color: var(--text-light); margin-bottom: 8px; }
.card-desc { font-size: .88rem; color: var(--text-mid); flex: 1; line-height: 1.5; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--green-100);
  gap: 8px;
}
.card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-700);
}
.card-price-area {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-order {
  background: var(--green-600);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 24px;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.btn-order:hover { background: var(--green-700); transform: scale(1.04); }

/* stagger animation delays for grid items */
.product-card:nth-child(1)  { animation-delay: .05s }
.product-card:nth-child(2)  { animation-delay: .10s }
.product-card:nth-child(3)  { animation-delay: .15s }
.product-card:nth-child(4)  { animation-delay: .20s }
.product-card:nth-child(5)  { animation-delay: .25s }
.product-card:nth-child(6)  { animation-delay: .30s }
.product-card:nth-child(7)  { animation-delay: .35s }
.product-card:nth-child(8)  { animation-delay: .40s }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.badge-green  { background: #1e7e34; color: #fff; }
.badge-blue   { background: #0d6efd; color: #fff; }
.badge-orange { background: #e67e22; color: #fff; }

/* ── MODALS ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,43,29,.55);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 36px;
  width: min(500px, 95vw);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.active .modal-box { transform: none; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green-900);
}
.modal-close {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--green-100); color: var(--green-700); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 500; color: var(--text-mid); margin-bottom: 6px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

.btn-primary {
  background: var(--green-600);
  color: var(--white);
  padding: 10px 28px;
  border-radius: 24px;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--green-700); }
.btn-secondary {
  background: var(--green-100);
  color: var(--green-700);
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 500;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--sand-dark); }
.btn-danger {
  background: #c0392b;
  color: var(--white);
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-danger:hover { background: #992d22; }

/* ── TOAST ───────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 30px; right: 30px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .92rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all .4s;
  min-width: 230px;
  color: var(--white);
  background: var(--green-700);
}
.toast.toast-error { background: #c0392b; }
.toast.show { opacity: 1; transform: none; }

/* ── SUCCESS BANNER ──────────────────────────────────────── */
#success-msg {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-700);
  color: var(--white);
  padding: 16px 32px;
  border-radius: 40px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: bottom .5s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  text-align: center;
  max-width: 90vw;
}
#success-msg.show { bottom: 40px; }

/* ── ADMIN LAYOUT ────────────────────────────────────────── */
.admin-wrapper { max-width: 1200px; margin: 0 auto; padding: 40px 5%; }
.admin-header { margin-bottom: 32px; }
.admin-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-900);
}
.admin-header p { color: var(--text-light); margin-top: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--green-100); margin-bottom: 30px; }
.tab-btn {
  padding: 12px 24px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--text-light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--green-600); background: var(--green-50); }
.tab-btn.active { color: var(--green-700); border-color: var(--green-600); background: var(--white); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-toolbar h2 { font-family: var(--font-display); font-size: 1.25rem; color: var(--green-800); }
.btn-add {
  background: var(--green-600);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 24px;
  font-weight: 600;
  font-size: .9rem;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-add:hover { background: var(--green-700); box-shadow: 0 4px 14px rgba(46,125,82,.35); }

/* ── ADMIN TABLE ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
thead tr { background: var(--green-900); }
thead th { color: var(--green-300); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; padding: 14px 16px; text-align: left; }
tbody tr { border-bottom: 1px solid var(--green-50); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--green-50); }
tbody td { padding: 12px 16px; font-size: .92rem; vertical-align: middle; color: var(--text-dark); }
.empty-row { text-align: center; color: var(--text-light); padding: 40px !important; }
.thumb { width: 50px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); }

.actions { display: flex; gap: 6px; }
.btn-edit, .btn-del {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  transition: background var(--transition);
}
.btn-edit:hover { background: var(--green-100); }
.btn-del:hover  { background: #fde8e6; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 24px;
  font-size: .88rem;
}
.site-footer strong { color: var(--green-300); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 60px 5%; }
  .admin-wrapper { padding: 24px 4%; }
  .modal-box { padding: 24px 20px; }
  .panel-toolbar { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ── Admin hint strip ────────────────────────────────────── */
.admin-hint {
  background: #fffbe6;
  border-bottom: 1px solid #f0e68c;
  padding: 9px 18px;
  font-size: 0.8rem;
  color: #7a6200;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-hint code {
  background: rgba(0,0,0,.07);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 0.82rem;
  color: #4a3a00;
}

/* ── Auth Page ───────────────────────────────────────────── */
body.auth-body-page {
  background: var(--sand);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

/* Brand strip */
.auth-brand {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-600) 100%);
  padding: 30px 32px 26px;
  text-align: center;
  color: var(--white);
}
.auth-brand-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 8px; }
.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--white);
}
.auth-brand p { font-size: 0.82rem; opacity: 0.8; margin: 0; }

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--green-100);
  background: var(--green-50);
}
.auth-tab {
  flex: 1;
  padding: 13px 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.auth-tab:hover { color: var(--green-600); background: var(--white); }
.auth-tab.active {
  color: var(--green-700);
  border-bottom-color: var(--green-600);
  background: var(--white);
}

/* Forms wrapper */
.auth-forms { padding: 28px 32px 32px; }

.auth-form { display: none; }
.auth-form.active { display: block; }

/* Password show/hide wrapper */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--text-light);
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}
.pass-toggle:hover { color: var(--green-600); }

/* Auth submit buttons */
.btn-auth {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  font-family: var(--font-body);
}
.btn-auth:active { transform: scale(0.98); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-login {
  background: var(--green-600);
  color: var(--white);
}
.btn-login:hover:not(:disabled) { background: var(--green-700); }

.btn-register {
  background: var(--green-100);
  color: var(--green-700);
  border: 1.5px solid var(--green-300);
}
.btn-register:hover:not(:disabled) { background: var(--green-300); color: var(--green-900); }

/* Note / switch-tab link */
.auth-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 16px;
}
.auth-note a {
  color: var(--green-600);
  font-weight: 600;
  text-decoration: none;
}
.auth-note a:hover { text-decoration: underline; }

/* ── Header user badge + logout ─────────────────────────── */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.header-username {
  font-size: 0.85rem;
  color: var(--green-300);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  padding: 6px 14px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffaaaa;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  font-family: var(--font-body);
}
.btn-logout:hover {
  background: rgba(192,57,43,0.25);
  border-color: #ff6b6b;
  color: #fff;
}

@media (max-width: 640px) {
  .auth-forms { padding: 24px 20px 28px; }
  .auth-brand { padding: 24px 20px 20px; }
  .header-username { display: none; }
}

/* ── Guest banner ────────────────────────────────────────── */
.guest-banner {
  background: linear-gradient(90deg, var(--green-800) 0%, var(--green-600) 100%);
  padding: 13px 5%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guest-banner[hidden] { display: none; }
.guest-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.guest-banner-text {
  color: rgba(255,255,255,.92);
  font-size: .9rem;
  font-weight: 500;
}
.guest-banner-actions { display: flex; gap: 10px; }

.btn-banner-register {
  background: var(--white);
  color: var(--green-700);
  padding: 7px 18px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-banner-register:hover { background: var(--green-100); transform: translateY(-1px); }

.btn-banner-login {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.35);
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-banner-login:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: var(--white); }

/* ── Nav auth links (header) ─────────────────────────────── */
.nav-auth-links { display: flex; gap: 6px; align-items: center; margin-left: 4px; }

.nav-login-link {
  color: var(--green-300);
  font-size: .88rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
}
.nav-login-link:hover { background: var(--green-700); color: var(--white); }

.nav-register-link {
  background: var(--green-500);
  color: var(--white);
  font-size: .88rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  transition: background var(--transition);
}
.nav-register-link:hover { background: var(--green-400); }

@media (max-width: 640px) {
  .guest-banner-content { flex-direction: column; gap: 10px; text-align: center; }
  .nav-login-link { display: none; }
}
/* ── Skeleton loader ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.sk {
  background: linear-gradient(90deg, #e8f0eb 25%, #d0e4d8 50%, #e8f0eb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sk-img  { height: 210px; border-radius: 0; }
.sk-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.sk-title { height: 20px; width: 75%; }
.sk-line  { height: 14px; width: 90%; }
.sk-line.short { width: 55%; }
.sk-footer { display: flex; justify-content: space-between; margin-top: 6px; }
.sk-price { height: 22px; width: 35%; }
.sk-btn   { height: 34px; width: 30%; border-radius: 20px; }
/* ── CART ICON ───────────────────────────────────────────── */
.cart-icon-btn {
  position: relative;
  font-size: 1.4rem;
  padding: 6px 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background var(--transition);
  line-height: 1;
  margin-left: 4px;
}
.cart-icon-btn:hover { background: var(--green-700); }
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e74c3c;
  color: #fff;
  font-size: .65rem;
  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(--green-900);
}

/* ── CART MODAL ──────────────────────────────────────────── */
.cart-modal-box {
  max-width: 560px;
  width: min(560px, 95vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.cart-modal-box .modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--green-100);
  margin-bottom: 0;
  flex-shrink: 0;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 28px;
}
.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}
.cart-empty p { font-size: 1.1rem; font-weight: 600; margin: 12px 0 4px; color: var(--text-mid); }
.cart-empty span { font-size: .88rem; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--green-50);
}
.cart-item:last-child { border-bottom: none; }
.cart-item img {
  width: 60px; height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--green-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: .8rem; color: var(--text-light); margin-top: 2px; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cart-item-qty span { font-weight: 600; min-width: 20px; text-align: center; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--green-300); }
.cart-item-subtotal {
  font-size: .88rem;
  font-weight: 700;
  color: var(--green-700);
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}
.cart-item-remove {
  color: var(--text-light);
  font-size: .85rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.cart-item-remove:hover { background: #fde8e6; color: #c0392b; }

.cart-footer {
  padding: 16px 28px 24px;
  border-top: 2px solid var(--green-100);
  flex-shrink: 0;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--text-mid);
}
.cart-total-amount {
  font-size: 1.3rem;
  color: var(--green-700);
}
.cart-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ── BTN ADD TO CART ─────────────────────────────────────── */
.btn-add-cart {
  background: var(--green-600);
  color: var(--white);
  padding: 9px 16px;
  border-radius: 24px;
  font-size: .82rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-add-cart:hover { background: var(--green-700); transform: scale(1.04); }

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb {
  padding: 14px 5%;
  font-size: .88rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-bottom: 1px solid var(--green-100);
}
.breadcrumb a { color: var(--green-600); }
.breadcrumb a:hover { text-decoration: underline; }

/* ── PRODUCT DETAIL PAGE ─────────────────────────────────── */
.product-detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 5% 80px;
}

/* Skeleton */
.product-detail-skeleton {
  display: flex;
  gap: 48px;
}
.sk-detail-img {
  width: 480px;
  height: 400px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.sk-detail-body {
  flex: 1;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Detail wrap */
.product-detail-wrap {
  display: flex;
  gap: 52px;
  align-items: flex-start;
}

.product-detail-img-wrap {
  position: relative;
  flex-shrink: 0;
  width: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--green-100);
}
.product-detail-img-wrap img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}
.detail-badge-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
}

.product-detail-info {
  flex: 1;
  padding-top: 8px;
}

.detail-name {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.detail-origin {
  font-size: .88rem;
  color: var(--text-light);
}

.detail-desc {
  font-size: .97rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--green-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green-400);
}

.detail-price-row {
  margin-bottom: 20px;
}
.detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-700);
}

.detail-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.detail-qty-row label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-mid);
}
.detail-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-50);
  border-radius: 24px;
  padding: 4px 8px;
}
.detail-qty-ctrl span {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--green-900);
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.btn-add-cart-detail {
  background: var(--green-600);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  flex: 1;
}
.btn-add-cart-detail:hover { background: var(--green-700); transform: translateY(-2px); }

.btn-buy-now {
  background: var(--green-900);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  flex: 1;
}
.btn-buy-now:hover { background: var(--green-800); transform: translateY(-2px); }

.detail-info-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-info-tags span {
  font-size: .8rem;
  color: var(--green-700);
  background: var(--green-100);
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 500;
}

/* Card clickable */
.product-card { cursor: pointer; }

/* ── RESPONSIVE DETAIL ───────────────────────────────────── */
@media (max-width: 768px) {
  .product-detail-wrap { flex-direction: column; gap: 28px; }
  .product-detail-img-wrap { width: 100%; }
  .product-detail-img-wrap img { height: 280px; }
  .product-detail-skeleton { flex-direction: column; }
  .sk-detail-img { width: 100%; height: 260px; }
  .detail-name { font-size: 1.6rem; }
  .detail-price { font-size: 1.6rem; }
}
/* ── CHECKOUT MODAL ──────────────────────────────────────── */
.checkout-modal-box {
  max-width: 520px;
  width: 100%;
}
.co-body { padding: 0 28px; }
.co-summary {
  background: #f7fbf8;
  border: 1px solid #d4e5db;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: .88rem;
}
.co-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #e8f0eb;
  color: var(--text-mid);
}
.co-item:last-child { border-bottom: none; }
.co-total-row {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 2px solid #d4e5db !important;
  color: var(--green-900);
  font-size: .95rem;
}
.co-form .form-group {
  margin-bottom: 14px;
}
.co-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 6px;
}
.co-form input,
.co-form textarea {
  width: 100%;
  border: 1.5px solid #c8ddd0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .9rem;
  font-family: var(--font-body);
  transition: border-color .2s;
  box-sizing: border-box;
}
.co-form input:focus,
.co-form textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58,158,104,.12);
}
.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
}

/* ── ORDER STATUS BADGES ──────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending   { background: #fff3cd; color: #856404; }
.status-shipping  { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }

/* ── ORDER DETAIL ITEMS ───────────────────────────────────── */
.order-items-list {
  font-size: .82rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── STATUS SELECT ────────────────────────────────────────── */
.status-select {
  border: 1.5px solid #c8ddd0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: .82rem;
  font-family: var(--font-body);
  cursor: pointer;
  background: #fff;
  color: var(--green-900);
}
.status-select:focus { outline: none; border-color: var(--green-500); }

/* ── WELCOME MODAL ───────────────────────────────────────── */
@keyframes welcomeLeafFloat {
  0%   { transform: translateY(0) rotate(0deg)   scale(1);    opacity: .6; }
  50%  { transform: translateY(-22px) rotate(12deg) scale(1.1); opacity: 1; }
  100% { transform: translateY(0) rotate(0deg)   scale(1);    opacity: .6; }
}
@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(32px) scale(.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
@keyframes welcomeOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmerSlide {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.welcome-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(10, 30, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: welcomeOverlayIn .35s ease forwards;
}
.welcome-overlay.closing {
  animation: none;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

.welcome-box {
  background: var(--white);
  border-radius: 24px;
  width: min(520px, 100%);
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(10,30,18,.45);
  animation: welcomeFadeIn .5s .1s cubic-bezier(.34,1.56,.64,1) both;
  position: relative;
}

/* Top banner strip */
.welcome-banner {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  padding: 36px 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.welcome-leaves {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}
.welcome-leaf {
  font-size: 2rem;
  display: inline-block;
  animation: welcomeLeafFloat 3s ease-in-out infinite;
}
.welcome-leaf:nth-child(1) { animation-delay: 0s;    font-size: 2.4rem; }
.welcome-leaf:nth-child(2) { animation-delay: .6s;   font-size: 1.8rem; }
.welcome-leaf:nth-child(3) { animation-delay: 1.2s;  font-size: 2.2rem; }
.welcome-leaf:nth-child(4) { animation-delay: .3s;   font-size: 1.6rem; }
.welcome-leaf:nth-child(5) { animation-delay: .9s;   font-size: 2rem; }

.welcome-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 8px;
  position: relative;
}
.welcome-title em {
  font-style: normal;
  color: var(--green-300);
}
.welcome-subtitle {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  position: relative;
}

/* Body */
.welcome-body {
  padding: 28px 36px 32px;
}

.welcome-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.welcome-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--green-50);
  border-radius: 12px;
  border: 1px solid var(--green-100);
  transition: transform .2s, box-shadow .2s;
}
.welcome-feature:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46,125,82,.12); }
.welcome-feature-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.welcome-feature-text { flex: 1; }
.welcome-feature-text strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 2px;
}
.welcome-feature-text span {
  font-size: .75rem;
  color: var(--text-light);
  line-height: 1.4;
}

.welcome-cta-group {
  display: flex;
  gap: 10px;
}
.btn-welcome-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  background-size: 200% auto;
  color: var(--white);
  padding: 14px 20px;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-position .4s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(46,125,82,.35);
  font-family: var(--font-body);
}
.btn-welcome-primary:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,125,82,.45);
}
.btn-welcome-secondary {
  flex: 1;
  background: var(--white);
  color: var(--green-700);
  padding: 14px 20px;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid var(--green-300);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  font-family: var(--font-body);
}
.btn-welcome-secondary:hover {
  background: var(--green-50);
  border-color: var(--green-500);
  transform: translateY(-2px);
}

/* "Không hiện lại" checkbox */
.welcome-no-show {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: .8rem;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}
.welcome-no-show input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--green-500);
  cursor: pointer;
}

/* Close X */
.welcome-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.18);
  border: none; border-radius: 50%;
  color: var(--white);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  z-index: 2;
}
.welcome-close:hover { background: rgba(255,255,255,.32); transform: scale(1.1); }

@media (max-width: 480px) {
  .welcome-body { padding: 22px 24px 26px; }
  .welcome-banner { padding: 28px 24px 22px; }
  .welcome-features { grid-template-columns: 1fr; gap: 8px; }
  .welcome-title { font-size: 1.7rem; }
  .welcome-cta-group { flex-direction: column; }
}
/* ── FEATURED SECTIONS (Sale / Mới / Hot) ───────────────── */
#featured-sections {
  padding: 0 5% 16px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.featured-section {
  border-radius: 20px;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}

/* Themes */
.theme-sale {
  background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 100%);
  border: 1.5px solid #fcd5c4;
}
.theme-new {
  background: linear-gradient(135deg, #f0fff6 0%, #dff7ec 100%);
  border: 1.5px solid #b8ecd4;
}
.theme-hot {
  background: linear-gradient(135deg, #fffbf0 0%, #fff3cc 100%);
  border: 1.5px solid #fde8a0;
}

/* Decorative blobs */
.featured-section::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: .07;
}
.theme-sale::before  { background: #e8330a; }
.theme-new::before   { background: #2e7d52; }
.theme-hot::before   { background: #d4860a; }

/* Header row */
.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.featured-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.featured-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
}
.featured-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.theme-sale .featured-title { color: #b83212; }
.theme-new  .featured-title { color: var(--green-800); }
.theme-hot  .featured-title { color: #8a5a00; }
.featured-sub {
  font-size: .82rem;
  color: var(--text-light);
  margin-top: 2px;
}

.featured-see-all {
  font-size: .85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid currentColor;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.theme-sale .featured-see-all { color: #b83212; }
.theme-sale .featured-see-all:hover { background: #b83212; color: #fff; }
.theme-new  .featured-see-all { color: var(--green-700); }
.theme-new  .featured-see-all:hover { background: var(--green-700); color: #fff; }
.theme-hot  .featured-see-all { color: #8a5a00; }
.theme-hot  .featured-see-all:hover { background: #8a5a00; color: #fff; }

/* Scroll row */
.featured-scroll-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.15) transparent;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.featured-scroll-wrap::-webkit-scrollbar { height: 4px; }
.featured-scroll-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 2px; }

.featured-row {
  display: flex;
  gap: 14px;
  padding: 4px 2px 8px;
  width: max-content;
}

/* Featured card */
.featured-card {
  width: 200px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(13,43,29,.08);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(13,43,29,.16);
}

.fc-discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e8330a;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 2;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(232,51,10,.35);
}

.fc-img-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
}
.fc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.featured-card:hover .fc-img-wrap img { transform: scale(1.06); }

.fc-cert {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: rgba(255,255,255,.9);
  color: var(--green-700);
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.fc-body {
  padding: 12px 12px 10px;
}
.fc-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-origin {
  font-size: .72rem;
  color: var(--text-light);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.fc-prices {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.fc-price {
  font-size: .88rem;
  font-weight: 700;
  color: var(--green-700);
}
.fc-price-orig {
  font-size: .72rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.fc-price-sale {
  font-size: .92rem;
  font-weight: 700;
  color: #e8330a;
}

.btn-featured-cart {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
  border: 1.5px solid var(--green-300);
}
.btn-featured-cart:hover {
  background: var(--green-600);
  color: #fff;
  transform: scale(1.1);
  border-color: var(--green-600);
}

/* Responsive */
@media (max-width: 640px) {
  #featured-sections { padding: 0 4% 12px; }
  .featured-section { padding: 20px 16px 18px; border-radius: 16px; }
  .featured-title { font-size: 1.15rem; }
  .featured-card { width: 165px; }
  .fc-img-wrap { height: 108px; }
}