/* ==========================================================================
   Khoshpoosh (خوش پوش) — Bespoke Luxury Design System (v2 — Post-Audit)
   ========================================================================== */

:root,
[data-theme="light"] {
  --bg: #FCFBF8;
  --surface: #FFFFFF;
  --surface-2: #F6F2E9;
  --surface-glass: rgba(255, 255, 255, 0.90);
  --ink: #171512;
  --ink-2: #4A443B;
  --mute: #7A7164;
  --gold: #B8860B;
  --gold-bright: #D4AF37;
  --gold-soft: rgba(184, 134, 11, 0.12);
  --gold-grad: linear-gradient(135deg, #C99A2E 0%, #E7C86E 50%, #A97914 100%);
  --border: rgba(184, 134, 11, 0.22);
  --shadow: 0 10px 30px rgba(23, 21, 18, 0.08);
  --shadow-gold: 0 8px 24px rgba(184, 134, 11, 0.24);
  --success: #166534;
  --success-bg: rgba(22, 101, 52, 0.10);
  --danger: #B91C1C;
  --danger-bg: rgba(185, 28, 28, 0.10);
  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #08080A;
  --surface: #121216;
  --surface-2: #1B1A1F;
  --surface-glass: rgba(14, 14, 18, 0.90);
  --ink: #F8F5EE;
  --ink-2: #D5CEBF;
  --mute: #9A9282;
  --gold: #D4AF37;
  --gold-bright: #F1D37A;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --gold-grad: linear-gradient(135deg, #D4AF37 0%, #F5DC8B 50%, #B3881E 100%);
  --border: rgba(212, 175, 55, 0.25);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 8px 28px rgba(212, 175, 55, 0.28);
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.14);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}
html[dir="ltr"] body { font-family: 'Plus Jakarta Sans', 'Vazirmatn', system-ui, sans-serif; }
.hidden { display: none !important; }

.live-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.live-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.28) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.live-btn:hover::after { transform: translateX(120%); }
.live-btn:active { transform: scale(0.94); }

/* Header */
.kp-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.kp-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 4px 6px; border-radius: 12px; }
.kp-monogram {
  width: 38px; height: 38px; border-radius: 12px; background: var(--gold-grad); color: #111;
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-gold); flex-shrink: 0;
}
.kp-monogram.small { width: 32px; height: 32px; font-size: 16px; }
.kp-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.kp-logo-text strong { font-size: 17px; font-weight: 800; }
.kp-logo-text small { font-size: 10.5px; color: var(--gold); font-weight: 600; }
.kp-header-actions { display: flex; align-items: center; gap: 7px; }
.kp-icon-btn, .kp-pill-btn {
  height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.kp-icon-btn { width: 38px; }
.kp-pill-btn { padding: 0 11px; font-size: 12px; color: var(--gold); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
.kp-badge {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--gold-grad); color: #111; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.kp-main { max-width: 1180px; margin: 0 auto; padding: 14px 14px 96px; min-height: calc(100vh - 160px); }
.view-animate { animation: viewSlideIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes viewSlideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Home Hero Banner + 3 Iconic Categories + Showcases + Trust Strip */
.home-hero-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.home-hero-banner h1 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; line-height: 1.3; }
.home-hero-banner p { font-size: 13.5px; color: var(--ink-2); max-width: 62ch; }
.home-search-wrap { display: flex; gap: 8px; }

.kp-input, .kp-select, .kp-textarea {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 13.5px; outline: none;
}
.kp-input:focus, .kp-select:focus, .kp-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

.cat-hero-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .cat-hero-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.cat-hero-card {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 290px;
  border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end; text-align: start; background: #141418;
}
@media (min-width: 768px) { .cat-hero-card { min-height: 430px; } }
.cat-hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.cat-hero-card:hover img { transform: scale(1.06); }
.cat-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,0.06) 25%, rgba(10,10,12,0.85) 100%); }
.cat-hero-content { position: relative; z-index: 2; padding: 20px; color: #FFFDF8; }
.cat-hero-kicker {
  display: inline-block; font-size: 11px; font-weight: 700; color: #F3D57C;
  background: rgba(15, 14, 12, 0.7); border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.cat-hero-content h2 { font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 5px; }
.cat-hero-content p { font-size: 13px; color: rgba(255, 251, 240, 0.88); margin-bottom: 12px; }
.cat-hero-cta {
  display: inline-flex; align-items: center; gap: 8px; background: var(--gold-grad);
  color: #12100C; font-weight: 800; font-size: 13px; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-gold);
}

.home-section { margin-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.section-head h2 { font-size: 19px; font-weight: 800; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust-item strong { font-size: 13.5px; color: var(--gold); }
.trust-item small { font-size: 12px; color: var(--ink-2); }

/* Category Page, Filters, Sort & 2-Column Mobile Grid */
.subpage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.kp-back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px;
}
.sort-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; scrollbar-width: none; }
.sort-bar::-webkit-scrollbar { display: none; }
.sort-pill {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 12.5px;
}
.sort-pill.active { background: var(--gold-grad); color: #111; border-color: transparent; box-shadow: var(--shadow-gold); }

.filter-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
@media (min-width: 768px) { .filter-bar { grid-template-columns: repeat(4, 1fr); } }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.product-thumb-wrap { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; }
.product-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s ease; }
.product-card:hover .product-thumb-wrap img { transform: scale(1.06); }
.discount-tag {
  position: absolute; top: 8px; inset-inline-start: 8px; background: var(--gold-grad); color: #111;
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.clicks-tag {
  position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(12, 12, 15, 0.75); color: #F3D57C;
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.product-info { padding: 11px 10px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-info h3 { font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.price-main { font-size: 14.5px; font-weight: 800; color: var(--gold); }
.price-old { font-size: 11.5px; color: var(--mute); text-decoration: line-through; }

/* PDP */
.pdp-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .pdp-layout { grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; } }
.gallery-stage { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow); touch-action: pan-y; }
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(212, 175, 55, 0.45); background: rgba(14, 14, 18, 0.68); color: #FFF; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.gallery-prev { inset-inline-start: 10px; }
.gallery-next { inset-inline-end: 10px; }
.gallery-zoom-btn { position: absolute; bottom: 12px; inset-inline-end: 12px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(212, 175, 55, 0.55); background: rgba(14, 14, 18, 0.78); color: #F3D57C; font-size: 12px; font-weight: 700; }
.gallery-counter { position: absolute; bottom: 12px; inset-inline-start: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(14, 14, 18, 0.72); color: #FFF; font-size: 12px; font-weight: 700; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { width: 68px; height: 86px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; opacity: 0.68; }
.gallery-thumb.active { border-color: var(--gold); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp-panel { display: flex; flex-direction: column; gap: 15px; }
.pdp-title { font-size: 22px; font-weight: 800; line-height: 1.35; }
.pdp-desc { font-size: 14px; color: var(--ink-2); }

.size-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.size-chip {
  padding: 8px 13px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink); font-weight: 700; font-size: 13px; display: flex; flex-direction: column; align-items: center; min-width: 68px;
}
.size-chip small { font-size: 10px; font-weight: 600; opacity: 0.78; }
.size-chip.selected { background: var(--gold-grad); color: #111; border-color: transparent; box-shadow: var(--shadow-gold); }
.size-chip:disabled { opacity: 0.42; cursor: not-allowed; background: var(--surface-2); }

.savings-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 15px; box-shadow: var(--shadow); }
.savings-price-big { font-size: 24px; font-weight: 800; color: var(--gold); }
.savings-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: 12.5px; font-weight: 800; }
.discount-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 12.5px; font-weight: 800; }
.competitor-list { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.competitor-row { display: flex; justify-content: space-between; color: var(--ink-2); }
.competitor-row span:last-child { text-decoration: line-through; color: var(--mute); }

.kp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 15px; }
.kp-card h3 { font-size: 15px; font-weight: 800; color: var(--gold); margin-bottom: 10px; }
.spec-item { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.spec-item:last-child { border-bottom: none; padding-bottom: 0; }
.spec-item strong { display: block; font-size: 12px; color: var(--mute); margin-bottom: 2px; }

.pair-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.pair-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.pair-card img { width: 52px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.pair-card strong { font-size: 12px; display: block; line-height: 1.3; }
.pair-card span { font-size: 11.5px; color: var(--gold); font-weight: 700; }

.kp-primary-btn {
  width: 100%; padding: 13px 18px; border: none; border-radius: 15px; background: var(--gold-grad);
  color: #12100B; font-family: inherit; font-size: 15px; font-weight: 800; box-shadow: var(--shadow-gold);
}
.kp-secondary-btn {
  padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 13px;
}
.kp-danger-btn {
  padding: 7px 12px; border-radius: 10px; border: 1px solid var(--danger);
  background: var(--danger-bg); color: var(--danger); font-family: inherit; font-weight: 700; font-size: 12px;
}
.kp-success-btn {
  padding: 7px 12px; border-radius: 10px; border: 1px solid var(--success);
  background: var(--success-bg); color: var(--success); font-family: inherit; font-weight: 700; font-size: 12px;
}

/* Drawers — Explicitly RIGHT edge in RTL! */
.kp-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.56); backdrop-filter: blur(4px); z-index: 80; }
.kp-drawer {
  position: fixed; top: 0; bottom: 0; right: 0; left: auto;
  width: min(440px, 94vw); background: var(--bg); border-left: 1px solid var(--border);
  z-index: 90; display: flex; flex-direction: column; box-shadow: var(--shadow);
  animation: drawerSlideRight 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes drawerSlideRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.kp-drawer-head { padding: 15px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kp-drawer-head h2 { font-size: 16px; font-weight: 800; }
.kp-close-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 700; }
.kp-drawer-body { padding: 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 13px; }

/* Center Modal (Confirm Delete, Size Guide, Admin Edit) */
.kp-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 94vw);
  max-height: 88vh;
  background: var(--bg);
  border: 1px solid var(--gold);
  border-radius: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

/* AI Support Panel — Wider, Non-Clipping, Proper Flex Scroll & Typing Indicator */
.kp-fab {
  position: fixed; bottom: 18px; inset-inline-start: 16px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px;
  border: none; background: var(--gold-grad); color: #111; font-family: inherit; font-weight: 800; font-size: 13px; box-shadow: var(--shadow-gold);
}
.kp-fab-pulse { width: 8px; height: 8px; border-radius: 999px; background: #14532D; animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.45; } }

.kp-support-panel {
  position: fixed;
  bottom: 76px;
  inset-inline-start: 14px;
  width: min(440px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 104px));
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.kp-support-head { padding: 13px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.kp-support-head strong { display: block; font-size: 14px; color: var(--gold); }
.kp-support-head small { font-size: 11px; color: var(--mute); }
.kp-support-messages {
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-bubble {
  max-width: 90%;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.msg-bubble ul { padding-inline-start: 18px; margin: 4px 0; }
.msg-customer { align-self: flex-start; background: var(--gold-grad); color: #111; font-weight: 600; }
.msg-ai { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); }
.msg-admin { align-self: flex-end; background: var(--success-bg); border: 1px solid var(--success); color: var(--ink); }
.msg-role-tag { font-size: 10.5px; font-weight: 800; opacity: 0.82; display: block; margin-bottom: 3px; }
.typing-indicator { font-style: italic; opacity: 0.85; animation: pulseTyping 1.2s infinite; }
@keyframes pulseTyping { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.kp-support-escalate-bar { padding: 7px 10px; border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }
.kp-escalate-btn { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--gold); background: var(--gold-soft); color: var(--gold); font-family: inherit; font-size: 12px; font-weight: 700; }
.kp-support-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.kp-support-form input { flex: 1; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-family: inherit; font-size: 13px; }
.kp-send-btn { width: 42px; border: none; border-radius: 12px; background: var(--gold-grad); color: #111; font-weight: 800; }

/* Zoom Modal */
.kp-zoom-modal { position: fixed; inset: 0; z-index: 120; background: rgba(5, 5, 7, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.kp-zoom-close { position: fixed; top: 16px; inset-inline-end: 16px; width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(212, 175, 55, 0.5); background: rgba(20, 20, 24, 0.85); color: #FFF; font-size: 18px; }
.kp-zoom-stage { max-width: 92vw; max-height: 82vh; overflow: auto; border-radius: 16px; }
.kp-zoom-stage img { max-width: 100%; max-height: 80vh; border-radius: 14px; transition: transform 0.3s ease; cursor: zoom-in; }
.kp-zoom-stage img.zoomed { transform: scale(1.9); cursor: zoom-out; }
.kp-zoom-hint { color: #F3D57C; font-size: 12.5px; margin-top: 12px; }

/* Blog Grid */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* Admin */
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 768px) { .admin-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.stat-card small { color: var(--mute); font-size: 12px; display: block; }
.stat-card strong { font-size: 20px; color: var(--gold); font-weight: 800; }

/* Size Guide Table */
.sg-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.sg-table th, .sg-table td { border-bottom: 1px solid var(--border); padding: 8px; text-align: center; }
.sg-table th { color: var(--gold); font-weight: 800; }

/* Footer & Toast */
.kp-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 14px 78px; }
.kp-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 18px; }
.kp-footer-brand { display: flex; align-items: center; gap: 10px; }
.kp-footer-brand p { font-size: 12px; color: var(--mute); }
.kp-footer-contact { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.kp-footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.kp-link-btn { background: none; border: none; color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.kp-link-btn:hover { color: var(--gold); }

.kp-toast { position: fixed; bottom: 22px; inset-inline-end: 16px; z-index: 130; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; border: 1px solid var(--gold); font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.kp-loader { display: flex; justify-content: center; padding: 60px 0; }
.kp-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--gold-soft); color: var(--gold); }
.badge-escalated { background: var(--danger-bg); color: var(--danger); }
.badge-answered { background: var(--success-bg); color: var(--success); }

/* Clickable Product Chips inside AI Support Chat */
.ai-product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  margin: 2px 1px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
  font-size: 12.5px;
  transition: transform 0.18s ease, background 0.18s ease;
}
.ai-product-link:hover {
  background: var(--gold-grad);
  color: #111;
  transform: translateY(-1px);
}

/* Edit Product Image Manager Grid */
.edit-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0;
}
.edit-img-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.edit-img-card.is-cover { border-color: var(--gold); }
.edit-img-card.marked-del { opacity: 0.3; border-color: var(--danger); }
.edit-img-card img { width: 100%; height: 88px; object-fit: cover; display: block; }
.edit-img-actions {
  display: flex;
  justify-content: space-between;
  padding: 4px;
  gap: 4px;
  background: var(--surface);
}
.edit-img-actions button {
  flex: 1;
  font-size: 10.5px;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
