/* Galaxy Plus e-commerce — shared stylesheet
   Palette: brand green #3C9F40 / #1F6B24 / #8ED957, near-black #1B1B18, off-white #FAFAF7 */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --text: #1B1B18;
  --text-secondary: #6B6B66;
  --border: #E4E4DE;
  --brand: #3C9F40;
  --brand-dark: #1F6B24;
  --brand-light: #8ED957;
  --brand-tint: #EAF3DE;
  --danger: #C0392B;
  --danger-tint: #FBEAEA;
  --warning: #B5760B;
  --warning-tint: #FCEFDA;
  --accent-purple: #7C5CE0;
  --accent-purple-tint: #EFEAFB;
  --accent-teal: #1B9C85;
  --accent-teal-tint: #E3F5F1;
  --accent-orange: #D97706;
  --accent-orange-tint: #FDF0DE;
  --radius: 10px;
  --footer-bg: #1B1B18;
}

/* ---------- Dark mode — same variable names, dark-appropriate values ---------- */
[data-theme="dark"] {
  --bg: #14150F;
  --surface: #1E201A;
  --text: #F0F0EA;
  --text-secondary: #A3A69C;
  --border: #33362C;
  --brand: #5FBE63;
  --brand-dark: #4C9A50;
  --brand-light: #8ED957;
  --brand-tint: #22301F;
  --danger: #E5766A;
  --danger-tint: #3A211E;
  --warning: #E0A83F;
  --warning-tint: #3A2E17;
  --accent-purple: #A48CF0;
  --accent-purple-tint: #2A2440;
  --accent-teal: #4FC9AE;
  --accent-teal-tint: #17332E;
  --accent-orange: #F0A94E;
  --accent-orange-tint: #3A2A14;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] img:not(.brand-logo-img):not(.theme-toggle-icon) { opacity: 0.92; }
[data-theme="dark"] .hero-banner,
[data-theme="dark"] .dash-hero { filter: brightness(0.92); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; transition: color 0.18s ease; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600; line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ---------- Top utility strip ---------- */
.top-strip { background: var(--brand-dark); color: #E8F3E0; font-size: 12.5px; }
.top-strip-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; }
.top-strip a { color: #fff; font-weight: 600; }
.top-strip a:hover { text-decoration: underline; }

/* ---------- Storefront header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; color: var(--text); flex-shrink: 0; font-family: 'Poppins', sans-serif; }
.brand-mark {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 21px;
  transition: filter 0.2s ease;
}
.brand:hover .brand-mark { filter: brightness(1.15); }

.search-bar { flex: 1; display: flex; max-width: 640px; position: relative; }
.search-suggestions {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(27,27,24,0.12); z-index: 50; overflow: hidden;
  max-height: 400px; overflow-y: auto;
}
.search-suggestions.open { display: block; }
.search-suggestion-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover, .search-suggestion-item.active { background: var(--bg); text-decoration: none; }
.search-suggestion-thumb {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--brand-tint);
}
.search-suggestion-thumb-placeholder {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; background: var(--brand-tint);
  display: flex; align-items: center; justify-content: center; color: var(--brand-dark); font-size: 10px; font-weight: 600;
}
.search-suggestion-info { flex: 1; min-width: 0; }
.search-suggestion-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggestion-price { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; }
.search-suggestion-outofstock { font-size: 11px; color: var(--danger); margin-left: 6px; }
.search-bar input {
  flex: 1; margin: 0; border: 2px solid var(--brand); border-right: none;
  border-radius: 8px 0 0 8px; padding: 11px 16px; font-size: 14px;
  transition: box-shadow 0.2s ease;
}
.search-bar input:focus { outline: none; box-shadow: 0 0 0 3px rgba(60,159,64,0.15); }
.search-bar button {
  background: var(--brand); border: 2px solid var(--brand); border-radius: 0 8px 8px 0;
  padding: 0 18px; color: #fff; cursor: pointer; transition: background 0.18s ease, transform 0.12s ease;
}
.search-bar button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.search-bar button:active { transform: scale(0.94); }

.header-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.header-action-link {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap;
  transition: transform 0.18s ease, color 0.18s ease;
}
.header-action-link svg { color: var(--text); transition: color 0.18s ease; }
.header-action-link:hover { color: var(--brand-dark); text-decoration: none; transform: translateY(-2px); }
.header-action-link:hover svg { color: var(--brand-dark); }

.theme-toggle-btn {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease; flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--brand-tint); border-color: var(--brand); transform: rotate(15deg); }

/* ---------- Profile dropdown (storefront header) ---------- */
.profile-dropdown { position: relative; }
.profile-dropdown-trigger {
  display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 10px; transition: background 0.18s ease; font-family: inherit;
}
.profile-dropdown-trigger:hover { background: var(--bg); }
.profile-dropdown-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px;
}
.profile-dropdown-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.profile-dropdown-info strong { font-size: 13px; color: var(--text); max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-dropdown-info span { font-size: 11px; color: var(--text-secondary); }
.profile-dropdown-trigger svg { color: var(--text-secondary); flex-shrink: 0; }
.profile-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(27,27,24,0.12); z-index: 60; overflow: hidden; padding: 6px;
}
.profile-dropdown-menu.open { display: block; }
.profile-dropdown-menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--text); font-weight: 500; transition: background 0.15s ease;
}
.profile-dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.profile-dropdown-menu a svg { color: var(--text-secondary); flex-shrink: 0; }
.profile-dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.profile-dropdown-logout { color: var(--danger) !important; }
.profile-dropdown-logout svg { color: var(--danger) !important; }
@media (max-width: 860px) { .profile-dropdown-info { display: none; } }

.category-strip { background: var(--brand-dark); }
.category-strip-inner { display: flex; gap: 4px; padding: 0 20px; overflow-x: auto; }
.category-strip-inner a {
  color: #E8F3E0; font-size: 13.5px; font-weight: 500; padding: 10px 14px; white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.category-strip-inner a:hover, .category-strip-inner a.active { background: rgba(255,255,255,0.15); color: #fff; text-decoration: none; }

.page-body { padding: 0 0 64px; min-height: 60vh; }
.page-body > .container { padding-top: 24px; }

/* ---------- Hero banner ---------- */
.hero-banner {
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-light) 100%);
  background-size: 200% 200%;
  animation: heroGradientShift 10s ease infinite, fadeInUp 0.6s ease;
  border-radius: 16px; padding: 40px; margin-bottom: 28px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-banner-text { max-width: 480px; }
.hero-banner h1 { font-size: 30px; margin-bottom: 10px; font-family: 'Poppins', sans-serif; }
.hero-banner p { font-size: 15px; opacity: 0.92; margin-bottom: 22px; }
.hero-banner .btn-primary { background: #fff; color: var(--brand-dark); }
.hero-banner .btn-primary:hover { background: #F0F0F0; }

/* ---------- Category icon strip ---------- */
.category-icons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-bottom: 32px;
}
.category-icon-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: fadeInUp 0.5s ease backwards;
}
.category-icon-card:nth-child(1) { animation-delay: 0.05s; }
.category-icon-card:nth-child(2) { animation-delay: 0.1s; }
.category-icon-card:nth-child(3) { animation-delay: 0.15s; }
.category-icon-card:nth-child(4) { animation-delay: 0.2s; }
.category-icon-card:nth-child(5) { animation-delay: 0.25s; }
.category-icon-card:hover {
  border-color: var(--brand); text-decoration: none; transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(31,107,36,0.12);
}
.category-icon { color: var(--brand-dark); transition: transform 0.2s ease; }
.category-icon-card:hover .category-icon { transform: scale(1.1); }
.category-icon img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; transition: transform 0.2s ease; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { font-size: 19px; margin: 0; }
.result-count { font-size: 13px; color: var(--text-secondary); }

.site-footer { background: var(--footer-bg); color: #C7C7C2; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 40px 20px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; font-family: 'Poppins', sans-serif; }
.footer-col a { display: block; color: #C7C7C2; font-size: 13.5px; margin-bottom: 10px; transition: color 0.18s ease, padding-left 0.18s ease; }
.footer-col a:hover { color: #fff; text-decoration: none; padding-left: 4px; }
.footer-about { font-size: 13.5px; line-height: 1.6; color: #A8A8A2; }
.footer-bottom { border-top: 1px solid #3A3A35; padding: 16px 0; }
.footer-bottom p { color: #8B8B85; font-size: 12.5px; margin: 0; text-align: center; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; animation: fadeInUp 0.35s ease; }
.alert-success { background: var(--brand-tint); color: var(--brand-dark); }
.alert-error   { background: var(--danger-tint); color: var(--danger); }
.alert-warning { background: var(--warning-tint); color: var(--warning); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.18s ease, opacity 0.18s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark)); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,107,36,0.25); }
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-secondary { background: transparent; color: var(--brand-dark); border: 1.5px solid var(--brand); }
.btn-secondary:hover { background: var(--brand-tint); transform: translateY(-2px); }
.btn-secondary:active { transform: translateY(0) scale(0.97); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-danger:active { transform: translateY(0) scale(0.97); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; margin-bottom: 16px; background: var(--surface); color: var(--text);
  font-family: inherit; transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(60,159,64,0.12); }
textarea { min-height: 100px; resize: vertical; }
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px; max-width: 440px; margin: 0 auto; animation: fadeInUp 0.5s ease;
}
.form-card.wide { max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Product grid ---------- */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 28px; }
.hero p { color: var(--text-secondary); }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  animation: fadeInUp 0.4s ease backwards;
}
.product-card:hover { box-shadow: 0 12px 28px rgba(27,27,24,0.1); transform: translateY(-4px); border-color: var(--brand-light); }
.product-card:nth-child(1) { animation-delay: 0.03s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.09s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.15s; }
.product-card:nth-child(6) { animation-delay: 0.18s; }
.product-thumb {
  height: 160px; background: var(--brand-tint); display: flex; align-items: center;
  justify-content: center; color: var(--brand-dark); font-size: 13px; font-weight: 600;
  overflow: hidden; position: relative;
}
.product-thumb img, .product-detail-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.08); }
.thumb-placeholder { padding: 0 12px; text-align: center; }
.product-badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700;
  padding: 4px 11px; border-radius: 20px; letter-spacing: 0.02em; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.badge-new { background: var(--brand-dark); color: #fff; animation: gentlePulse 2s ease-in-out infinite; }
.badge-low { background: #fff; color: var(--warning); border: 1px solid var(--warning); }
.badge-outofstock { background: var(--text); color: #fff; }
.badge-sale { background: var(--danger); color: #fff; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price-original { font-size: 13px; color: var(--text-secondary); text-decoration: line-through; }
.price-sale { color: var(--danger) !important; margin-top: 0 !important; }
.coupon-row { margin-top: 14px; }
.product-thumb:has(.badge-outofstock) img { opacity: 0.55; }
.product-info { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-info h3 { font-size: 15px; margin: 0; }
.product-cat { font-size: 12px; color: var(--text-secondary); }
.product-price { font-size: 16px; font-weight: 700; color: var(--brand-dark); margin-top: auto; font-family: 'Poppins', sans-serif; }
.product-actions { padding: 0 16px 16px; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar a {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); font-size: 13px; color: var(--text);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.filter-bar a:hover { border-color: var(--brand); text-decoration: none; }
.filter-bar a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; animation: fadeIn 0.4s ease; }
.product-detail-thumb {
  aspect-ratio: 1; background: var(--brand-tint); border-radius: 14px; display: flex;
  align-items: center; justify-content: center; color: var(--brand-dark); font-weight: 600;
  overflow: hidden;
}
.product-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-gallery-thumb-btn {
  width: 56px; height: 56px; border-radius: 8px; border: 2px solid transparent; padding: 0;
  overflow: hidden; cursor: pointer; background: var(--brand-tint); flex-shrink: 0; transition: border-color 0.15s ease;
}
.product-gallery-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumb-btn.active { border-color: var(--brand-dark); }
.product-gallery-thumb-btn:hover { border-color: var(--brand); }
.product-detail h1 { font-size: 24px; }
.product-detail .price { font-size: 22px; font-weight: 700; color: var(--brand-dark); margin: 12px 0; font-family: 'Poppins', sans-serif; }
.price-detail-row { display: flex; align-items: baseline; gap: 10px; }
.price-detail-row .price-sale { color: var(--danger); }
.stock-line { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.product-description-rich { font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.product-description-rich img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.product-description-rich ul, .product-description-rich ol { padding-left: 22px; margin: 8px 0; }
.product-description-rich p { margin: 0 0 10px; }

/* ---------- Cart / tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
table.data-table th, table.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px;
}
table.data-table tbody tr { transition: background 0.15s ease; }
table.data-table tbody tr:hover { background: var(--bg); }
table.data-table th { color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.orders-mobile-list { display: none; }
.order-view-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) {
  .order-view-grid { grid-template-columns: 1fr; }
}
.cart-total-row { text-align: right; font-size: 16px; font-weight: 700; padding: 16px; font-family: 'Poppins', sans-serif; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; transition: transform 0.15s ease; }
.badge-active, .badge-delivered, .badge-active-role { background: var(--brand-tint); color: var(--brand-dark); }
.badge-pending, .badge-processing { background: var(--warning-tint); color: var(--warning); }
.badge-cancelled, .badge-inactive, .badge-suspended { background: var(--danger-tint); color: var(--danger); }
.badge-shipped { background: #E6F1FB; color: #0C447C; }
.badge-role-admin { background: #E6F1FB; color: #0C447C; }
.badge-role-super_admin { background: #EEEDFE; color: #3C3489; }
.badge-role-user { background: var(--border); color: var(--text-secondary); }

/* ---------- Favorites ---------- */
.favorite-btn {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.favorite-btn:hover { border-color: var(--danger); color: var(--danger); transform: scale(1.08); }
.favorite-btn.active { background: var(--danger); border-color: var(--danger); color: #fff; animation: gentlePulse 0.4s ease; }
.card-favorite-form { position: absolute; top: 10px; right: 10px; z-index: 2; }
.card-favorite-btn { width: 34px; height: 34px; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.product-card { position: relative; }

.brand-logo-img { max-height: 34px; display: block; }
.brand-panel .brand-logo-img { max-height: 30px; }

/* ---------- Product highlights ---------- */
.highlight-list { margin: 4px 0 16px; padding-left: 20px; font-size: 14px; }
.highlight-list li { margin-bottom: 4px; color: var(--text); }

/* ---------- Courier selection (checkout) ---------- */
.courier-option {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}
.courier-option:hover { border-color: var(--brand); transform: translateX(2px); }
.courier-option.selected { border-color: var(--brand); background: var(--brand-tint); }
.courier-option.cheapest { border-color: var(--brand-light); }
.courier-option input[type="radio"] { width: auto; margin: 0; }
.courier-name { flex: 1; font-weight: 600; }
.cheapest-badge {
  display: inline-block; background: var(--brand-dark); color: #fff; font-size: 10px;
  font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle;
}
.courier-charge { font-weight: 700; color: var(--brand-dark); }

/* ---------- Checkout layout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.checkout-form-card { margin: 0; }
.order-summary-card { margin: 0; }
.order-summary-row {
  display: flex; justify-content: space-between; gap: 12px; font-size: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.order-summary-row:last-of-type { border-bottom: none; }
.order-summary-label { flex: 1; min-width: 0; }
.order-summary-value { flex-shrink: 0; white-space: nowrap; }
.order-summary-total { font-weight: 700; padding-top: 12px; border-bottom: none; }
.courier-section-hidden { display: none; }
.courier-loading-hidden { display: none; }
.courier-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; gap: 20px; }
  .order-summary-row { font-size: 13px; }
  .order-summary-label { font-size: 13px; line-height: 1.4; }
}

/* ---------- Order tracking widget ---------- */
.tracking-frame-wrap {
  overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.tracking-frame-wrap iframe { display: block; }

/* ---------- Product page trust badges (payment methods / couriers) ---------- */
.trust-section { margin-top: 24px; }
.trust-section h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; text-transform: none; }
.trust-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.trust-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.trust-card svg { color: var(--brand-dark); flex-shrink: 0; }
.courier-logo-img { max-height: 24px; max-width: 60px; object-fit: contain; }

/* ---------- Share link / copyable code boxes ---------- */
.share-section { margin-top: 20px; }
.share-label, .tracking-number-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.share-copy-row, .tracking-number-copy-row { display: flex; gap: 8px; max-width: 480px; flex-wrap: wrap; }
.share-copy-row input, .tracking-number-copy-row input {
  flex: 1; margin: 0; font-size: 13px; background: var(--bg); color: var(--text-secondary); min-width: 140px;
}
.share-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 6px; background: #25D366; color: #fff !important;
  white-space: nowrap; flex-shrink: 0;
}
.share-whatsapp-btn:hover { background: #1EBE57; text-decoration: none !important; }
.tracking-number-box { margin-bottom: 16px; }
@media (max-width: 480px) {
  .share-copy-row, .tracking-number-copy-row { flex-direction: column; }
  .share-copy-row button, .share-copy-row a, .tracking-number-copy-row button { width: 100%; justify-content: center; }
}

/* ---------- Panel (dashboard) layout ---------- */
.panel-body { background: var(--bg); }
.panel-shell { display: flex; min-height: 100vh; }
.panel-sidebar {
  width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.brand-panel { margin-bottom: 4px; padding: 0 8px; }
.panel-role-badge {
  margin: 4px 8px 20px; font-size: 12px; color: var(--brand-dark); background: var(--brand-tint);
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-weight: 600;
}
.panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.panel-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.panel-nav-icon { display: flex; color: var(--text-secondary); flex-shrink: 0; transition: color 0.18s ease; }
.panel-nav-label { flex: 1; }
.panel-nav-chevron { flex-shrink: 0; color: var(--brand-dark); }
.panel-nav-link:hover { background: var(--bg); text-decoration: none; padding-left: 18px; }
.panel-nav-link.active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.panel-nav-link.active .panel-nav-icon { color: var(--brand-dark); }

.panel-sidebar-footer { display: flex; flex-direction: column; gap: 12px; font-size: 13px; padding: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.panel-profile-chip { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.panel-profile-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; flex-shrink: 0;
}
.panel-profile-info { min-width: 0; }
.panel-profile-info strong { display: block; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-profile-info span { font-size: 12px; color: var(--text-secondary); }
.panel-sidebar-footer-links { display: flex; justify-content: space-between; padding: 0 4px; }

.panel-main { flex: 1; min-width: 0; }
.panel-topbar {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-topbar h1 { font-size: 20px; margin: 0; font-family: 'Poppins', sans-serif; }
.panel-user { font-size: 14px; color: var(--text-secondary); }
.panel-content { padding: 32px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease; animation: fadeInUp 0.4s ease backwards;
}
.stat-card:nth-child(1) { animation-delay: 0.03s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.13s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(27,27,24,0.08); }
.stat-card .label { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; font-family: 'Poppins', sans-serif; }

.panel-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 24px; animation: fadeInUp 0.4s ease; }
.panel-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-section-header h2 { font-size: 16px; margin: 0; font-family: 'Poppins', sans-serif; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); animation: fadeIn 0.5s ease; }

@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .search-bar { order: 3; max-width: 100%; flex-basis: 100%; }
  .top-strip-inner { flex-direction: column; gap: 2px; text-align: center; padding: 6px 12px; }
  .hero-banner { padding: 36px 24px; }
  .hero-banner h1 { font-size: 24px; }

  /* ---------- Panel (dashboard) — horizontal tab nav instead of vertical sidebar dump ---------- */
  .panel-shell { flex-direction: column; }
  .panel-sidebar {
    position: sticky; top: 0; z-index: 25; width: 100%; height: auto;
    padding: 12px 16px 0; border-right: none; border-bottom: 1px solid var(--border);
  }
  .brand-panel { margin-bottom: 8px; padding: 0; }
  .panel-role-badge { margin: 0 0 10px; }
  .panel-nav {
    flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 10px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .panel-nav::-webkit-scrollbar { display: none; }
  .panel-nav-link {
    white-space: nowrap; padding: 8px 14px; flex-shrink: 0; font-size: 13px;
    background: var(--bg); border-radius: 20px;
  }
  .panel-nav-icon, .panel-nav-chevron { display: none; }
  .panel-nav-link:hover { padding-left: 14px; transform: none; }
  .panel-nav-link.active { background: var(--brand); color: #fff; }
  .panel-sidebar-footer {
    flex-direction: row; justify-content: space-between; border-top: none;
    padding: 0 0 10px; font-size: 12px;
  }
  .panel-profile-chip { display: none; }
  .panel-sidebar-footer-links { flex: 1; }
  .panel-main { flex: 1; min-width: 0; }
  .panel-topbar { padding: 14px 16px; }
  .panel-topbar h1 { font-size: 17px; }
  .panel-user { font-size: 12px; }
  .panel-content { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 20px; }
  .panel-section { padding: 16px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data-table { min-width: 480px; }
  .orders-table-desktop { display: none; }
  .orders-mobile-list { display: block; }
}

/* ---------- Mobile order cards (Order tracking / My orders) ---------- */
.order-mobile-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.order-mobile-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.order-mobile-card-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--text-secondary); }
.order-mobile-card-row span:last-child { color: var(--text); font-weight: 500; text-align: right; }
.order-mobile-card-btn { margin-top: 10px; }

/* =================================================================
   MOBILE EXPERIENCE (≤ 768px) — bottom nav, simplified chrome,
   larger touch targets, category photos front and center.
   ================================================================= */
@media (max-width: 768px) {
  /* Simplify the top chrome: bottom nav takes over primary navigation */
  .top-strip { display: none; }
  .desktop-only-actions { display: none; }
  .category-strip { display: none; }
  .header-inner { padding: 12px 16px; gap: 12px; }
  .brand-name { font-size: 15px; }
  .search-bar input { padding: 12px 14px; font-size: 16px; } /* 16px avoids iOS auto-zoom */

  /* Room for the fixed bottom nav so it never covers content */
  body { padding-bottom: 66px; }

  /* Category grid: big, tappable, photo-first */
  .category-icons {
    grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
  }
  .category-icon-card { padding: 14px 6px; border-radius: 14px; }
  .category-icon img { width: 52px; height: 52px; border-radius: 12px; }
  .category-icon svg { width: 30px; height: 30px; }
  .category-icon-card span:last-child { font-size: 12px; }

  /* Product grid: 2 columns, larger tap targets */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-thumb { height: 130px; }
  .product-info { padding: 12px; }
  .product-info h3 { font-size: 13.5px; }
  .product-price { font-size: 15px; }
  .product-actions { padding: 0 12px 12px; }
  .btn { padding: 12px 16px; font-size: 14px; } /* ≥44px tall — comfortable tap target */

  .hero-banner { padding: 28px 20px; border-radius: 12px; }
  .hero-banner h1 { font-size: 21px; }
  .hero-banner p { font-size: 13.5px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 16px; }
}

/* Fixed bottom navigation bar — mobile only */
.mobile-bottom-nav { display: none; }
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(27,27,24,0.06);
  }
  .mobile-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; font-size: 11px; font-weight: 600; color: var(--text-secondary);
    min-height: 44px; justify-content: center; transition: color 0.18s ease, transform 0.12s ease;
    background: none; border: none; cursor: pointer; font-family: inherit;
  }
  .mobile-nav-item:hover { text-decoration: none; }
  .mobile-nav-item:active { transform: scale(0.92); }
  .mobile-nav-item.active { color: var(--brand-dark); }
  .mobile-nav-icon-wrap { position: relative; }
  .mobile-nav-badge {
    position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 5px; line-height: 1.3;
    animation: gentlePulse 1.6s ease-in-out infinite;
  }
}

/* ---------- Categories slide-in drawer ---------- */
.categories-drawer-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 90;
  opacity: 0; transition: opacity 0.25s ease;
}
.categories-drawer-overlay.open { display: block; opacity: 1; }
.categories-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 82vw;
  background: var(--surface); z-index: 91; transform: translateX(-100%);
  transition: transform 0.28s ease; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.categories-drawer.open { transform: translateX(0); }
.categories-drawer-header {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}
.categories-drawer-header h3 { margin: 0; font-size: 16px; font-family: 'Poppins', sans-serif; }
.categories-drawer-header button {
  background: none; border: none; font-size: 26px; line-height: 1; color: var(--text-secondary); cursor: pointer; padding: 0 4px;
}
.categories-drawer-list { padding: 8px; }
.categories-drawer-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px;
  color: var(--text); font-size: 14.5px; font-weight: 500; transition: background 0.15s ease;
}
.categories-drawer-item:hover, .categories-drawer-item:active { background: var(--brand-tint); text-decoration: none; }
.categories-drawer-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.categories-drawer-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- PWA back button (shown only in standalone/installed app mode) ---------- */
.pwa-back-btn {
  background: var(--bg); border: none; border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; color: var(--text);
  cursor: pointer; flex-shrink: 0; transition: background 0.15s ease;
}
.pwa-back-btn:hover { background: var(--brand-tint); color: var(--brand-dark); }
.pwa-back-btn:active { transform: scale(0.92); }

/* ---------- App loading screen (Three.js animated splash) ---------- */
.app-loader {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: radial-gradient(ellipse at 50% 40%, #1F6B24 0%, #0D2410 60%, #051006 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
.app-loader.app-loader-hide { opacity: 0; pointer-events: none; }
#loader-canvas { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.app-loader-content { position: relative; z-index: 1; text-align: center; }
.app-loader-mark {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(135deg, #8ED957, #1F6B24); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 24px;
  animation: gentlePulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(142,217,87,0.4);
}
.app-loader-text {
  color: #F2F7EF; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.5px;
}

/* ---------- Custom scrollbar (WebKit browsers) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brand-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ================================================================
   Dashboard hero design (User + Admin overview pages)
   ================================================================ */
.dash-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 32px 36px;
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.dash-hero-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.dash-hero-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.16);
}
.dash-hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-light); }
.dash-hero-pill {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; background: rgba(124,92,224,0.35);
}
.dash-hero h1 { font-size: 28px; margin: 0 0 6px; font-family: 'Poppins', sans-serif; color: #fff; }
.dash-hero-sub { font-size: 13.5px; opacity: 0.92; margin-bottom: 18px; }
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero-btn {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 24px; background: rgba(255,255,255,0.18); color: #fff;
  transition: background 0.18s ease, transform 0.15s ease;
}
.dash-hero-btn:hover { background: rgba(255,255,255,0.3); text-decoration: none; transform: translateY(-1px); }
.dash-hero-btn-solid { background: #fff; color: var(--brand-dark) !important; }
.dash-hero-btn-solid:hover { background: #F0F0F0; }
.dash-hero-art { flex-shrink: 0; opacity: 0.9; }
@media (max-width: 760px) {
  .dash-hero { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .dash-hero-art { display: none; }
}

.dash-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--warning-tint); border: 1px solid #F0DDB0; border-radius: 14px; padding: 16px 20px; margin-bottom: 24px;
}
.dash-alert-icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--warning); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-alert-text strong { display: block; font-size: 14px; color: var(--text); }
.dash-alert-text span { font-size: 12.5px; color: var(--text-secondary); }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 480px) { .dash-quick-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 12.5px; font-weight: 600; text-align: center; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dash-quick-item:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(27,27,24,0.08); text-decoration: none; }
.dash-quick-icon {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.dash-quick-icon.c-teal { background: var(--accent-teal-tint); color: var(--accent-teal); }
.dash-quick-icon.c-purple { background: var(--accent-purple-tint); color: var(--accent-purple); }
.dash-quick-icon.c-orange { background: var(--accent-orange-tint); color: var(--accent-orange); }
.dash-quick-icon.c-green { background: var(--brand-tint); color: var(--brand-dark); }

.dash-cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, var(--accent-purple), #A78BFA); color: #fff;
  border-radius: 16px; padding: 20px 24px; margin: 20px 0; transition: transform 0.18s ease;
}
.dash-cta-banner:hover { transform: translateY(-2px); text-decoration: none; color: #fff; }
.dash-cta-banner-text strong { display: block; font-size: 15px; margin-bottom: 2px; }
.dash-cta-banner-text span { font-size: 12.5px; opacity: 0.9; }

.dash-progress-card { display: flex; align-items: center; gap: 18px; }
.dash-progress-ring { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.dash-progress-ring svg { transform: rotate(-90deg); }
.dash-progress-ring-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; font-family: 'Poppins', sans-serif; color: var(--brand-dark);
}
.dash-progress-stats { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.dash-progress-stat-row { display: flex; justify-content: space-between; font-size: 13px; }
.dash-progress-stat-row span:first-child { color: var(--text-secondary); }
.dash-progress-stat-row span:last-child { font-weight: 700; }

.dash-order-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 10px; transition: box-shadow 0.15s ease;
}
.dash-order-card:hover { box-shadow: 0 6px 16px rgba(27,27,24,0.06); }
.dash-order-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-order-info { flex: 1; min-width: 0; }
.dash-order-info strong { display: block; font-size: 13.5px; }
.dash-order-info span { font-size: 12px; color: var(--text-secondary); }

.dash-profile-chip { display: flex; align-items: center; gap: 10px; }
.dash-profile-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}

/* ================================================================
   Guest access gate — blurs content + prompts login after 30s
   ================================================================ */
body.access-gate-active .page-body,
body.access-gate-active .top-strip,
body.access-gate-active .category-strip {
  filter: blur(6px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease, opacity 0.4s ease;
}
.access-gate-overlay {
  display: none; position: fixed; inset: 0; background: rgba(20,30,20,0.35);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
body.access-gate-active .access-gate-overlay { display: flex; }
.access-gate-card {
  background: var(--surface); border-radius: 18px; padding: 32px 28px; max-width: 360px;
  width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: fadeInUp 0.4s ease;
}
.access-gate-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.access-gate-card h3 { font-size: 18px; margin-bottom: 8px; font-family: 'Poppins', sans-serif; }
.access-gate-card p { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 22px; }
.access-gate-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Floating WhatsApp chat widget ---------- */
.whatsapp-widget {
  position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,0.45); z-index: 80;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: whatsappPulse 2.5s ease-in-out infinite;
}
.whatsapp-widget:hover { transform: scale(1.08); box-shadow: 0 8px 26px rgba(37,211,102,0.55); }
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.4); }
  50% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 10px rgba(37,211,102,0); }
}
@media (max-width: 860px) {
  .whatsapp-widget { right: 14px; bottom: 78px; width: 50px; height: 50px; }
}

/* ================================================================
   Product page — Daraz-style delivery estimator widget
   ================================================================ */
.delivery-widget {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-top: 20px; background: var(--surface);
}
.delivery-widget-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.delivery-widget-row svg { color: var(--brand-dark); flex-shrink: 0; }
.delivery-widget-row span { font-size: 13.5px; font-weight: 600; flex: 1; }
.delivery-change-link {
  background: none; border: none; color: var(--brand-dark); font-weight: 700; font-size: 13px;
  cursor: pointer; padding: 2px 6px; flex: 0 0 auto;
}
.delivery-change-link:hover { text-decoration: underline; }
.delivery-location-picker { margin: 4px 0 12px; }
.delivery-location-picker select { margin-bottom: 0; }
.delivery-loading { font-size: 13px; color: var(--text-secondary); padding: 6px 0; }
.delivery-options-list { display: flex; flex-direction: column; gap: 6px; }
.delivery-option-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 13.5px;
}
.delivery-option-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.delivery-option-logo { height: 18px; max-width: 44px; object-fit: contain; }
.delivery-option-price { font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.delivery-cheapest-tag {
  background: var(--brand-dark); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; margin-left: 4px;
}
.delivery-option-empty { font-size: 13px; color: var(--text-secondary); padding: 8px 0; }

/* ---------- Hero "Top Products" floating cards ---------- */
.hero-top-products {
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; width: 260px;
}
.hero-product-card {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.96);
  border-radius: 12px; padding: 10px; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-product-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px rgba(0,0,0,0.24); text-decoration: none; }
.hero-product-thumb {
  width: 48px; height: 48px; border-radius: 8px; background: var(--brand-tint); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-product-thumb-placeholder { color: var(--brand-dark); font-weight: 700; font-size: 18px; font-family: 'Poppins', sans-serif; }
.hero-product-info { display: flex; flex-direction: column; min-width: 0; }
.hero-product-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-product-price { font-size: 13px; font-weight: 700; color: var(--brand-dark); font-family: 'Poppins', sans-serif; }
.hero-product-price-original { font-size: 11px; font-weight: 400; color: var(--text-secondary); text-decoration: line-through; margin-left: 6px; }
@media (max-width: 760px) {
  .hero-top-products { display: none; }
}

/* ================================================================
   PWA install full-screen splash (mobile only, iOS + Android) —
   blocks site content until installed or dismissed for this visit
   ================================================================ */
.pwa-install-splash {
  display: none; position: fixed; inset: 0; z-index: 300; background: rgba(20,30,20,0.55);
  align-items: center; justify-content: center; padding: 20px;
}
.pwa-install-splash.open { display: flex; }
body.pwa-splash-locked { overflow: hidden; }
.pwa-splash-card {
  background: var(--surface); border-radius: 20px; padding: 36px 28px; max-width: 380px;
  width: 100%; text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,0.3);
  animation: fadeInUp 0.4s ease;
}
.pwa-splash-icon { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 18px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.pwa-splash-icon img { width: 100%; height: 100%; object-fit: cover; }
.pwa-splash-card h2 { font-size: 21px; margin-bottom: 10px; font-family: 'Poppins', sans-serif; }
.pwa-splash-card p { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.pwa-splash-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; text-align: left; }
.pwa-splash-step { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; }
.pwa-splash-step svg { color: var(--brand-dark); display: inline; vertical-align: -3px; }
.pwa-splash-step-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pwa-splash-continue {
  display: block; width: 100%; background: none; border: none; margin-top: 14px;
  font-size: 13.5px; color: var(--text-secondary); cursor: pointer; text-decoration: underline;
}
.pwa-splash-continue:hover { color: var(--text); }

/* ---------- Product listing pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.pagination-link { font-weight: 600; color: var(--brand-dark); font-size: 14px; }
.pagination-status { font-size: 13px; color: var(--text-secondary); }

/* ---------- Product variant pill selector ---------- */
.variant-pill-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.variant-pill {
  padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all 0.15s ease;
}
.variant-pill:hover:not(:disabled) { border-color: var(--brand); }
.variant-pill.active { border-color: var(--brand-dark); background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.variant-pill.disabled, .variant-pill:disabled {
  opacity: 0.5; cursor: not-allowed; text-decoration: line-through; background: var(--bg);
}

/* ================================================================
   ADMIN / SUPER-ADMIN PANEL — MOBILE USABILITY PASS
   Every admin & super-admin screen reuses the same shared classes
   (.panel-section, table.data-table, .btn, .panel-section-header,
   .form-card, .filter-bar) so these rules apply automatically across
   every admin page — Products, Orders, Reports, Tracking, Categories,
   Couriers, Users, Settings, etc — with no changes needed on most
   individual pages.
   ================================================================ */
@media (max-width: 768px) {
  /* Stop iOS Safari from zooming the whole page in when an admin taps
     into a form field (product add/edit, settings, filters — any
     input/select/textarea). 16px is the minimum size iOS won't zoom for. */
  input, select, textarea { font-size: 16px; }

  /* Section header ("All products (12)" + "Add product" button, etc.)
     — stack instead of squeezing the button into a tiny sliver next to
     a long title. */
  .panel-section-header { flex-wrap: wrap; gap: 10px; }
  .panel-section-header h2 { flex: 1 1 100%; }
  .panel-section-header > a.btn, .panel-section-header > button.btn { width: 100%; text-align: center; }

  /* Standalone form cards (login/register, outside the panel) — don't
     let 32px of padding eat most of a small phone screen. */
  .form-card { padding: 22px 18px; }

  /* Admin's name in the top bar shouldn't push the page title around
     on a narrow screen. */
  .panel-user { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---------- Turn every admin data-table into a stack of cards ----------
     One row = one card; each cell becomes a label/value line, using the
     data-label attribute a page puts on its <td> ("Name", "Price"...).
     A page that doesn't set data-label still benefits — its rows just
     show plain stacked values instead of a cramped, side-scrolling table. */
  .panel-section table.data-table,
  .panel-section table.data-table tbody,
  .panel-section table.data-table tr,
  .panel-section table.data-table td {
    display: block;
  }
  .panel-section table.data-table { min-width: 0; }
  /* Hide the header row visually (its labels now live on each cell via
     data-label) but keep it for screen readers. */
  .panel-section table.data-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .panel-section table.data-table tbody tr {
    border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px;
    padding: 4px 14px; background: var(--surface);
  }
  .panel-section table.data-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed var(--border); text-align: right; font-size: 13.5px;
  }
  .panel-section table.data-table td:last-child { border-bottom: none; }
  .panel-section table.data-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-secondary);
    font-size: 12px; text-align: left; flex-shrink: 0;
  }
  .panel-section table.data-table td:empty::before { content: none; }

  /* Row-of-buttons cells (Edit / Deactivate / Delete, etc.) — let the
     buttons take the full width and wrap onto their own lines with
     bigger tap targets, instead of squeezing next to a label. */
  .panel-section table.data-table td.table-actions-cell {
    justify-content: flex-start; flex-wrap: wrap; padding-top: 12px; gap: 8px;
  }
  .panel-section table.data-table td.table-actions-cell::before { content: none; }
  .panel-section table.data-table td.table-actions-cell form { margin: 0; }
  .panel-section table.data-table .btn-sm { padding: 9px 16px; }

  /* Cells with multi-line content (name + email, etc.) read better
     stacked under their label than squeezed to the right. */
  .panel-section table.data-table td.table-cell-block {
    flex-direction: column; align-items: flex-start; text-align: left; gap: 4px;
  }
}

/* ---------- Gallery photo upload row (product-form.php) ---------- */
.gallery-upload-form { display: flex; gap: 10px; align-items: center; }
@media (max-width: 768px) {
  .gallery-upload-form { flex-direction: column; align-items: stretch; }
  .gallery-upload-form .btn { width: 100%; }
}

/* ---------- List search + category filter (products.php, etc.) ---------- */
.list-filter-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.list-filter-form input[type="text"] { flex: 2; min-width: 160px; margin: 0; }
.list-filter-form select { flex: 1; min-width: 140px; margin: 0; }
.list-filter-form .btn, .list-filter-form a.btn { flex-shrink: 0; margin: 0; }
@media (max-width: 768px) {
  .list-filter-form { flex-direction: column; align-items: stretch; }
  .list-filter-form input, .list-filter-form select, .list-filter-form .btn { width: 100%; }
}

/* ---------- Sticky "Save changes" bar — keeps the save action within
   reach on a long edit form without scrolling all the way down.
   Mobile only; the normal in-form Save/Cancel buttons still work on
   desktop. ---------- */
.mobile-save-bar { display: none; }
.mobile-save-bar-spacer { display: none; }
@media (max-width: 768px) {
  .mobile-save-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(27,27,24,0.08);
  }
  .mobile-save-bar .btn { flex: 1; text-align: center; margin: 0; }
  .mobile-save-bar-spacer { display: block; height: 74px; }
}

/* ---------- Product variant rows (name/price/stock/weight) ---------- */
.variant-row {
  grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
  align-items: center; margin-bottom: 10px; gap: 10px;
}
@media (max-width: 860px) {
  .variant-row { grid-template-columns: 1fr; }
}

/* ---------- Color options rows (swatch/name/price/stock) — a separate
   list from the plain Variants above, each color its own price+stock ---------- */
.color-row {
  grid-template-columns: auto 1.6fr 1fr 1fr auto;
  align-items: center; margin-bottom: 10px; gap: 10px;
}
@media (max-width: 860px) {
  .color-row { grid-template-columns: 1fr; }
}
/* Native color input, styled as a round swatch instead of the default square. */
input[type="color"].color-swatch-input {
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  margin: 0; cursor: pointer; overflow: hidden; background: none;
}
input[type="color"].color-swatch-input::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
input[type="color"].color-swatch-input::-webkit-color-swatch { border: none; border-radius: 50%; }
input[type="color"].color-swatch-input::-moz-color-swatch { border: none; border-radius: 50%; }
/* ---------- Quick Site Tour (first-login walkthrough) ---------- */
body.site-tour-active { overflow: hidden; }
.site-tour-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 21, 15, 0.6);
  pointer-events: none;
}
.site-tour-spotlight {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(20, 21, 15, 0.6);
  border: 2px solid var(--brand-light);
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
}
.site-tour-card {
  position: fixed;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  padding: 18px 20px;
  pointer-events: auto;
  transition: top 0.25s ease, left 0.25s ease;
}
.site-tour-step-count {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: 6px;
}
.site-tour-card h3 { margin: 0 0 6px; font-size: 17px; }
.site-tour-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.site-tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.site-tour-skip {
  background: none; border: none; color: var(--text-secondary); font-size: 13px;
  cursor: pointer; padding: 6px 4px;
}
.site-tour-skip:hover { color: var(--text); }
.site-tour-next {
  background: var(--brand); color: #fff; border: none; border-radius: 8px;
  padding: 9px 20px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.site-tour-next:hover { background: var(--brand-dark); }
@media (max-width: 480px) {
  .site-tour-card { padding: 14px 16px; }
  .site-tour-card h3 { font-size: 15.5px; }
}
/* ---------- Academy article body (rendered rich-text content) ---------- */
.academy-article-body { font-size: 15.5px; line-height: 1.75; color: var(--text); }
.academy-article-body h2 { font-size: 22px; margin: 32px 0 12px; }
.academy-article-body h3 { font-size: 18px; margin: 24px 0 10px; }
.academy-article-body p { margin: 0 0 16px; }
.academy-article-body img {
  max-width: 100%; height: auto; border-radius: var(--radius);
  margin: 16px 0; display: block;
}
.academy-article-body ul, .academy-article-body ol { margin: 0 0 16px; padding-left: 24px; }
.academy-article-body li { margin-bottom: 6px; }
.academy-article-body a { text-decoration: underline; }

/* ---------- Show FULL product images (no cropping) ----------
   Product photos used object-fit: cover, which crops anything that isn't the
   same shape as its box. "contain" scales the whole picture to fit inside the
   box instead, so nothing is cut off. Same layout/sizes as before. */
.product-thumb,
.product-detail-thumb,
.product-gallery-thumb-btn,
.hero-product-thumb { background: #fff; }
.product-thumb img,
.product-detail-thumb img,
.product-gallery-thumb-btn img,
.hero-product-thumb img,
.search-suggestion-thumb { object-fit: contain !important; background: #fff; }
.product-card:hover .product-thumb img { transform: scale(1.03); }
/* Admin lists (products / categories thumbnails) */
.data-table td img[src*="/assets/uploads/"] { object-fit: contain !important; background: #fff; }