*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e8eaed;
  --border-hover: #c8cdd5;
  --text: #111318;
  --text-2: #5f6368;
  --text-3: #9aa0a6;
  --green: #1a9e45;
  --green-hover: #158538;
  --green-bg: #f0faf4;
  --green-border: #b7e4c7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1), 0 8px 32px rgba(0,0,0,0.06);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
}

/* ── HEADER ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.logo img { height: 28px; display: block; }
.header-sep { width: 1px; height: 20px; background: var(--border); }
.header-title { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.02em; }

/* ── LAYOUT ── */
.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 52px);
  overflow: hidden;
}

/* ── LEFT SIDEBAR ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* URL Input */
.url-input-wrap { position: relative; }
.url-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.url-input::placeholder { color: var(--text-3); }
.url-input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,158,69,0.1);
}
.url-input.has-value { border-color: var(--green-border); background: var(--green-bg); }
.url-input.error { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,0.1); }

.parsed-slug {
  display: none;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 8px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}
.parsed-slug.hidden { display: none; }
.parsed-slug-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* Generate btn */
.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-primary:hover { background: var(--green-hover); box-shadow: 0 4px 12px rgba(26,158,69,0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #c5d9cb; cursor: not-allowed; box-shadow: none; }

/* Preview btn */
.btn-preview {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-preview:hover { background: #f0fdf4; }

/* Divider */
.divider { height: 1px; background: var(--border); }

/* Lang picker */
.lang-picker { display: flex; gap: 6px; }
.lang-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lang-opt:hover { border-color: var(--border-hover); }
.lang-opt.active { border-color: var(--green); background: var(--green-bg); }
.lang-flag { font-size: 16px; line-height: 1; }
.lang-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.lang-opt.active .lang-label { color: var(--green); }

/* Theme picker */
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-opt {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.theme-opt:hover { border-color: var(--border-hover); }
.theme-opt.active { border-color: var(--green); background: var(--green-bg); }
.theme-preview-light {
  height: 44px;
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
}
.theme-preview-dark {
  height: 44px;
  background: #1a1f2e;
  border: 1px solid #2d3348;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
}
.tp-dot { width: 6px; height: 6px; border-radius: 50%; }
.tp-line { height: 4px; border-radius: 2px; }
.theme-opt-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-align: center; }
.theme-opt.active .theme-opt-label { color: var(--green); }

/* Toggle settings */
.toggles { display: flex; flex-direction: column; gap: 8px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.1s;
}
.toggle-row:hover { background: var(--bg); }
.toggle-label { font-size: 12px; font-weight: 500; color: var(--text); }
.toggle {
  width: 32px; height: 18px;
  background: var(--border);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on::after { transform: translateX(14px); }

/* Status */
.status {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
}
.status.show { display: flex; }
.status.loading { background: #eff6ff; color: #2563eb; }
.status.success { background: var(--green-bg); color: var(--green); }
.status.error { background: #fef2f2; color: #dc2626; }
.status-spin {
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MAIN AREA ── */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tabs */
.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 16px;
  gap: 0;
  flex-shrink: 0;
}
.tab {
  padding: 13px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.tab-live { color: #e53e3e !important; margin-left: auto; }
.tab-live svg { animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.main-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}
.main-body::-webkit-scrollbar { width: 6px; }
.main-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── EMPTY STATE ── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 12px;
  color: var(--text-3);
  text-align: center;
}
.empty-icon {
  width: 56px; height: 56px;
  background: var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 4px;
}
.empty h3 { font-size: 15px; font-weight: 600; color: var(--text-2); }
.empty p { font-size: 12px; max-width: 260px; line-height: 1.6; }

/* ── PREVIEW TAB ── */
.preview-grid {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.preview-col { display: flex; flex-direction: column; gap: 10px; }

.single-preview-wrap {
  padding: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  overflow-x: auto;
}
.single-preview-center { justify-content: center; }

/* Desktop preview frame */
.desktop-frame {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px 16px 20px;
  border: 1px solid var(--border);
  display: inline-block;
}
.desktop-frame-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}
.dfb-dot { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; }

/* Mobile preview frame */
.mobile-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  overflow-y: auto;
}
.mobile-frame {
  width: 320px;
  flex-shrink: 0;
  background: #18181b;
  border-radius: 40px;
  padding: 12px 10px 20px;
  border: 8px solid #27272a;
  box-shadow: 0 0 0 1px #3f3f46, 0 24px 60px rgba(0,0,0,0.45);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0 10px;
}
.mobile-camera {
  width: 10px; height: 10px;
  background: #3f3f46;
  border-radius: 50%;
}
.mobile-screen {
  background: #f7f8fa;
  border-radius: 24px;
  overflow-y: auto;
  max-height: 580px;
  padding: 12px;
}
.mobile-home-bar {
  width: 90px; height: 4px;
  background: #3f3f46;
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ── COMPACT CARD ── */
.wc-compact {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, sans-serif;
  width: 220px;
  min-width: 220px;
}
.wc-compact.w-light { background: #fff; border: 1px solid #e8eaed; }
.wc-compact.w-dark  { background: #242938; border: 1px solid #2d3348; }
.wc-compact-img-wrap {
  width: 100%; height: 120px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.wc-compact-img { max-width: 100%; max-height: 120px; object-fit: contain; }
.wc-compact-name {
  font-size: 13px; font-weight: 700; line-height: 1.4;
  color: #111318; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.wc-compact.w-dark .wc-compact-name { color: #f1f3f4; }
.wc-compact-avail {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #5f6368; margin-bottom: 6px;
}
.wc-compact.w-dark .wc-compact-avail { color: #9aa0a6; }
.wc-compact-price {
  font-size: 14px; font-weight: 700; color: #1a9e45;
  margin-bottom: 8px; flex: 1;
}
.wc-compact.w-dark .wc-compact-price { color: #4ade80; }
.wc-compact-price small { font-size: 11px; font-weight: 400; }
.wc-compact-btn {
  width: 100%; padding: 9px 4px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: inherit;
  transition: opacity .15s;
}
.wc-compact-btn:hover { opacity: .88; }

/* ── WIDGET LIGHT THEME ── */
.w-light {
  --wc-bg: #ffffff;
  --wc-border: #e8eaed;
  --wc-text: #111318;
  --wc-text2: #5f6368;
  --wc-text3: #9aa0a6;
  --wc-green: #1a9e45;
  --wc-green-bg: #f0faf4;
  --wc-btn: #1a9e45;
  --wc-btn-text: #ffffff;
  --wc-price: #1a9e45;
}

/* ── WIDGET DARK THEME ── */
.w-dark {
  --wc-bg: #1a1f2e;
  --wc-border: #2d3348;
  --wc-text: #f1f5f9;
  --wc-text2: #94a3b8;
  --wc-text3: #64748b;
  --wc-green: #4ade80;
  --wc-green-bg: #14261e;
  --wc-btn: #4ade80;
  --wc-btn-text: #0d1f14;
  --wc-price: #4ade80;
}

/* ── WIDGET CARD ── */
.widget-card {
  background: var(--wc-bg);
  border: 1px solid var(--wc-border);
  border-radius: 16px;
  padding: 16px;
  font-family: 'Inter', sans-serif;
  animation: widgetIn 0.3s cubic-bezier(0.34,1.4,0.64,1);
  max-width: 320px;
}
.widget-card.mobile { max-width: 260px; padding: 12px; }
@keyframes widgetIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Badge — top right */
.wc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  width: fit-content;
}
.wc-badge.rx    { background: #2563eb; color: #fff; }
.wc-badge.no-rx { background: #e8f5e9; color: #1a9e45; }
.wc-badge.mobile { font-size: 9px; padding: 3px 7px; }

/* Image — large centered */
.wc-img-wrap {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.wc-img-wrap.mobile { height: 110px; margin-bottom: 8px; }
.wc-img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}
.wc-img.mobile { max-height: 110px; }

/* Name */
.wc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--wc-text);
  line-height: 1.3;
  margin-bottom: 6px;
}
.wc-name.mobile { font-size: 13px; }

/* Meta rows */
.wc-meta-row {
  font-size: 12px;
  color: var(--wc-text3);
  margin-bottom: 3px;
}
.wc-meta-row.mobile { font-size: 11px; }
.wc-meta-link { color: var(--wc-green); text-decoration: none; }

.wc-divider { height: 1px; background: var(--wc-border); margin: 10px 0; }

/* Availability */
.wc-avail {
  font-size: 12px; color: var(--wc-text3);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 8px;
}
.wc-avail-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wc-green); flex-shrink: 0; }

/* Price row */
.wc-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wc-price-label { font-size: 12px; color: var(--wc-text3); }
.wc-price { font-size: 18px; font-weight: 700; color: var(--wc-price); }
.wc-price small { font-size: 12px; font-weight: 400; }
.wc-price.mobile { font-size: 15px; }

/* Button */
.wc-btn {
  width: 100%;
  padding: 13px;
  background: var(--wc-btn);
  color: var(--wc-btn-text);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s;
}
.wc-btn.mobile { padding: 10px; font-size: 12px; }
.wc-btn:hover { opacity: 0.9; }

.wc-info-table { display: flex; flex-direction: column; gap: 0; margin: 2px 0; }
.wc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--wc-border);
}
.wc-info-row:last-child { border-bottom: none; }
.wc-info-label {
  font-size: 11px;
  color: var(--wc-text3);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.wc-info-val {
  font-size: 11px;
  font-weight: 500;
  color: var(--wc-text);
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
  max-width: 60%;
}

.design-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.design-label {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.color-picker {
  width: 36px;
  height: 28px;
  border: none;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}
.design-range {
  flex: 1;
  accent-color: var(--green);
  cursor: pointer;
}

  margin-top: 10px;
  text-align: center;
  font-size: 9px;
  color: var(--wc-text3);
  font-family: 'JetBrains Mono', monospace;
}
.wc-footer strong { color: var(--wc-green); }
.wc-footer.mobile { font-size: 8px; margin-top: 8px; }

/* ── CODE TAB ── */
.code-tab { display: none; }
.code-tab.active { display: block; }
.code-section { margin-bottom: 24px; }
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.code-title { font-size: 12px; font-weight: 600; color: var(--text); }
.code-desc { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.btn-copy {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.btn-copy:hover { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.btn-copy.done { border-color: var(--green); color: var(--green); background: var(--green-bg); }

.code-block {
  background: #0d1117;
  border-radius: 10px;
  overflow: hidden;
}
.code-block-inner {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.8;
  color: #e6edf3;
  white-space: pre;
}
.code-block-inner::-webkit-scrollbar { height: 4px; }
.code-block-inner::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
.ct { color: #ff7b72; }  /* tag */
.ca { color: #79c0ff; }  /* attr */
.cv { color: #a5d6ff; }  /* value */
.cs { color: #a5d6ff; }  /* string */
.cm { color: #8b949e; font-style: italic; }  /* comment */
.ck { color: #ff7b72; }  /* key */
.cn { color: #79c0ff; }  /* number */
.cf { color: #d2a8ff; }  /* function */

/* Empty code state */
.code-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 10px;
  color: var(--text-3);
  text-align: center;
}
.code-empty h3 { font-size: 14px; font-weight: 600; color: var(--text-2); }
.code-empty p { font-size: 12px; max-width: 240px; }

/* ── MODAL ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.15s ease; }
.modal.dark {
  background: #1a1f2e;
  color: #f1f3f4;
}
.modal.dark .modal-head { border-color: #2d3348; }
.modal.dark .modal-head-title { color: #f1f3f4; }
.modal.dark .modal-head-sub { color: #6b7280; }
.modal.dark .modal-close { background: #242938; color: #9aa0a6; }
.modal.dark .modal-close:hover { background: #2d3348; }
.modal.dark .modal-tabs-row { border-color: #2d3348; }
.modal.dark .modal-tab { color: #6b7280; }
.modal.dark .modal-body { background: #1a1f2e; }
.modal.dark .modal-footer { border-color: #2d3348; }
.modal.dark .modal-load-more { background: #242938; border-color: #2d3348; color: #9aa0a6; }
.modal.dark .pharm-card { border-color: #2d3348; background: #242938; }
.modal.dark .pharm-card:hover { border-color: #3d4a6b; }
.modal.dark .pharm-label-tag { color: #6b7280; }
.modal.dark .pharm-name { color: #f1f3f4; }
.modal.dark .pharm-from { color: #6b7280; }
.modal.dark .pharm-meta-item { color: #6b7280; }
.modal.dark .pharm-meta-item b { color: #9aa0a6; }
.modal.dark .pharm-btn { background: #374151; color: #f1f3f4; }
.modal.dark .pharm-btn:hover { background: #4b5563; }
.modal.dark .pharm-phones-dropdown { background: #1a1f2e; border-color: #2d3348; }
.modal.dark .pharm-btn-find { color: #60a5fa; border-color: #3b5998; }
.modal.dark .pharm-btn-find:hover { background: #1e3a5f; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalUp 0.22s cubic-bezier(0.34,1.3,0.64,1);
}
@keyframes modalUp { from { transform: translateY(20px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-shrink: 0;
}
.modal-head-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-head-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.modal-close {
  width: 28px; height: 28px;
  border-radius: 50%; border: none;
  background: var(--bg); color: var(--text-2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }
.modal-tabs-row {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-tab {
  padding: 10px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--text-3);
  border: none; background: none;
  cursor: pointer; font-family: 'Inter', sans-serif;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.modal-tab.active { color: var(--green); border-bottom-color: var(--green); }
.modal-body {
  overflow-y: auto; flex: 1; padding: 14px 20px 20px;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-load-more {
  width: 100%; padding: 9px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 9px; font-size: 12px; font-weight: 600;
  color: var(--text-2); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.modal-load-more:hover { border-color: var(--green); color: var(--green); }
.modal-load-more:disabled { opacity: 0.5; cursor: not-allowed; }
.pharm-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  padding: 8px 0 6px; margin-top: 4px;
}
.pharm-section-label:first-child { margin-top: 0; padding-top: 0; }

/* Pharmacy card in modal */
.pharm-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.pharm-card:hover { border-color: var(--green-border); }
.pharm-card-row1 {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 10px;
}
.pharm-label-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 3px; }
.pharm-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.25; }
.pharm-price-right { text-align: right; flex-shrink: 0; }
.pharm-from { font-size: 9px; color: var(--text-3); }
.pharm-price-val { font-size: 15px; font-weight: 700; color: var(--green); }
.pharm-price-val small { font-size: 10px; }
.pharm-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.pharm-meta-item { font-size: 11px; color: var(--text-3); display: flex; gap: 5px; align-items: flex-start; }
.pharm-meta-item svg { flex-shrink: 0; margin-top: 1px; }
.pharm-meta-item b { display: block; font-size: 10px; color: var(--text-2); font-weight: 600; margin-bottom: 1px; }
.pharm-btn {
  width: 100%; padding: 9px; background: var(--text);
  color: #fff; border: none; border-radius: 9px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background 0.15s;
}
.pharm-btn:hover { background: #1f2937; }
.pharm-btn.delivery { background: var(--green); }
.pharm-btn.delivery:hover { background: var(--green-hover); }
.pharm-no-btn {
  width: 100%; padding: 9px; text-align: center;
  font-size: 12px; color: var(--text-3);
  border: 1.5px dashed var(--border); border-radius: 9px;
}
.pharm-btn-find {
  display: block; width: 100%; padding: 9px; text-align: center;
  font-size: 12px; font-weight: 600; color: #1a73e8;
  border: 1.5px solid #1a73e8; border-radius: 9px;
  text-decoration: none; transition: all 0.15s; box-sizing: border-box;
}
.pharm-btn-find:hover { background: #e8f0fe; }
.pharm-btn-row { display: flex; gap: 8px; }
.pharm-btn-row .pharm-btn-find { flex: 1; }
.pharm-btn-phone {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 12px; font-size: 12px; font-weight: 600;
  color: var(--text-2); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 9px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  white-space: nowrap; transition: all 0.15s; flex-shrink: 0;
}
.pharm-btn-phone:hover { border-color: var(--green); color: var(--green); }
.pharm-btn-phone.open { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.pharm-phones-dropdown {
  margin-top: 8px; padding: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 9px; display: flex; flex-direction: column; gap: 4px;
}
.pharm-phone-item {
  font-size: 12px; font-weight: 500; color: var(--green);
  text-decoration: none; padding: 5px 8px; border-radius: 6px;
  transition: background 0.15s;
}
.pharm-phone-item:hover { background: var(--green-bg); }
.pharm-phones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pharm-phone {
  font-size: 11px; color: var(--green); text-decoration: none;
  background: var(--green-bg); border-radius: 6px; padding: 3px 8px;
}
.pharm-phone:hover { text-decoration: underline; }

/* Widget type picker */
.wtype-picker { display: flex; flex-direction: column; gap: 6px; }
.wtype-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
}
.wtype-opt:hover { border-color: var(--border-hover); background: #fff; }
.wtype-opt.active { border-color: var(--green); background: var(--green-bg); }
.wtype-icon { font-size: 18px; flex-shrink: 0; }
.wtype-name { font-size: 12px; font-weight: 600; color: var(--text); }
.wtype-opt.active .wtype-name { color: var(--green); }
.wtype-desc { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ── Group widget desktop ── */
.wg-desktop {
  font-family: 'Inter', sans-serif;
  background: var(--wc-bg);
}
.wg-desktop.w-dark { background: #1a1f2e; border-radius: 14px; padding: 16px; }
.wg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 12px;
}
.wg-card {
  background: var(--wc-bg);
  border: 1px solid var(--wc-border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.wg-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* Image area */
.wg-card-img-wrap {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.wg-card-img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

/* Badge */
.wg-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  width: fit-content;
}
.wg-card-badge.rx     { background: #eff6ff; color: #2563eb; }
.wg-card-badge.no-rx  { background: #eff6ff; color: #2563eb; }

/* Text */
.wg-card-name     { font-size: 14px; font-weight: 700; color: var(--wc-text); line-height: 1.4; margin-bottom: 6px; }
.wg-card-meta-row { font-size: 12px; color: var(--wc-text3); margin-bottom: 3px; line-height: 1.4; }
.wg-card-link     { color: #2563eb; cursor: pointer; }
.wg-card-link:hover { text-decoration: underline; }

/* Divider */
.wg-card-divider { border: none; border-top: 1px solid var(--wc-border); margin: 8px 0; }

/* Availability */
.wg-card-avail {
  font-size: 11px; color: var(--wc-text3);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.wg-card-avail-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wc-green); flex-shrink: 0; }

/* Price */
.wg-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wg-card-price-label { font-size: 12px; color: var(--wc-text3); }
.wg-card-price       { font-size: 16px; font-weight: 700; color: var(--wc-price); }
.wg-card-price small { font-size: 11px; font-weight: 400; }

/* Button */
.wg-card-btn {
  width: 100%;
  padding: 11px;
  background: #f5c800;
  color: #111;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.15s;
  margin-top: auto;
}
.wg-card-btn:hover { opacity: 0.85; }

/* Group widget - mobile */
.wg-mobile {
  font-family: 'Inter', sans-serif;
}
.wg-mobile.w-dark { background: #1a1f2e; border-radius: 14px; padding: 10px; }
.wg-mobile .wg-title { font-size: 11px; margin-bottom: 10px; }
.wg-list { display: flex; flex-direction: column; gap: 7px; }
.wg-list-item {
  background: var(--wc-bg);
  border: 1px solid var(--wc-border);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wg-list-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.wg-list-img {
  width: 40px; height: 40px;
  object-fit: contain; flex-shrink: 0;
  background: var(--wc-green-bg); border-radius: 6px; padding: 2px;
}
.wg-list-img-ph {
  width: 40px; height: 40px;
  background: var(--wc-green-bg); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.wg-list-info { flex: 1; min-width: 0; }
.wg-list-name { font-size: 10px; font-weight: 600; color: var(--wc-text); line-height: 1.3; }
.wg-list-meta { font-size: 9px; color: var(--wc-text3); margin-top: 2px; }
.wg-list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wg-list-price { font-size: 11px; font-weight: 700; color: var(--wc-price); }
.wg-list-price small { font-size: 8px; font-weight: 400; }
.wg-list-btn {
  padding: 5px 10px;
  background: var(--yellow, #f5c800);
  color: #111; border: none; border-radius: 6px;
  font-size: 9px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}


.skel {
  background: linear-gradient(90deg, #f1f5f9 25%, #e8edf2 50%, #f1f5f9 75%);
  background-size: 300% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
/* Group exclude panel */
.exclude-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; background: #f8f9fb;
  border: 1px solid #e8eaed; border-radius: 8px;
  font-size: 12px; color: #333; cursor: pointer;
  transition: all 0.15s; user-select: none;
}
.exclude-item.excluded {
  background: #fff0f0; border-color: #fca5a5; color: #999;
  text-decoration: line-through;
}
.exclude-item input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; accent-color: #1a9e45; }

/* Group slider */
.aw-slider-wrap { position: relative; overflow: hidden; }
.aw-slider-track { display: flex; gap: 16px; transition: transform 0.3s ease; }
.aw-slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; border: 1px solid #e8eaed;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; font-size: 14px;
  transition: opacity 0.15s;
}
.aw-slider-nav:hover { background: #f5f5f5; }
.aw-slider-nav.disabled { opacity: 0.3; pointer-events: none; }
.aw-slider-prev { left: -16px; }
.aw-slider-next { right: -16px; }
.aw-slider-dots { display: flex; justify-content: center; gap: 5px; margin-top: 12px; }
.aw-slider-dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd; transition: background 0.2s; }
.aw-slider-dot.active { background: #1a9e45; }