/* ============================================================================
   COREOPS STORE — WARM PAPER NEOBRUTALISM + DYNAMIC MODULE COLOR THEMING
   Tối ưu đồng thời cho PC (1440px) & Điện thoại (360px - 430px)
   ============================================================================ */

:root {
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --paper: #f4ebe0;
  --sheet: #faf3e9;
  --card: #fbf7f1;
  --card-alt: #f6eee3;
  --line: #ddd3c5;
  --line-strong: #c6bbac;
  --ink: #1d1b18;
  --ink-2: #34302b;
  --muted: #6b655d;

  /* Default Module Theme: ALL (Emerald / Mint Green) */
  --accent: #cfe3b2;
  --accent-mid: #b2d491;
  --accent-soft: #e8efd9;
  --accent-border: #bfd1a2;
  --accent-strong: #27793a;
  --grid-stroke: #a8916f;

  /* Per-module fixed badge tokens */
  --mod-blue: #c8e2fc;
  --mod-blue-soft: #e7f2fd;
  --mod-blue-ink: #1b5ca8;

  --mod-teal: #bceee3;
  --mod-teal-soft: #e3f8f3;
  --mod-teal-ink: #0f766e;

  --mod-purple: #e5d8f8;
  --mod-purple-soft: #f2ebfc;
  --mod-purple-ink: #6435b8;

  --mod-orange: #fbdcb9;
  --mod-orange-soft: #fdf1e2;
  --mod-orange-ink: #b84f14;

  /* Direct CTA colors */
  --zalo-bg: #c6e0ff;
  --zalo-hover: #b2d4ff;
  --tele-bg: #c6effa;
  --tele-hover: #afe7f7;
}

/* MODULE DYNAMIC THEMES */
:root[data-module="blue"] {
  --accent: #c5e0fb;
  --accent-mid: #9dc8f6;
  --accent-soft: #e6f2fd;
  --accent-border: #accdf2;
  --accent-strong: #1b5ca8;
  --grid-stroke: #6f94be;
}

:root[data-module="teal"] {
  --accent: #bceee3;
  --accent-mid: #8cdfcd;
  --accent-soft: #e3f8f3;
  --accent-border: #9eddd0;
  --accent-strong: #0f766e;
  --grid-stroke: #5aa39a;
}

:root[data-module="purple"] {
  --accent: #e4d5f8;
  --accent-mid: #ccb4f0;
  --accent-soft: #f1eafc;
  --accent-border: #cfbceb;
  --accent-strong: #6435b8;
  --grid-stroke: #8e76b5;
}

:root[data-module="orange"] {
  --accent: #fadab6;
  --accent-mid: #f2be85;
  --accent-soft: #fdf0df;
  --accent-border: #ebc59b;
  --accent-strong: #b84f14;
  --grid-stroke: #ba8b5e;
}

/* DARK THEME OVERRIDES */
:root[data-theme="dark"] {
  --paper: #1b1916;
  --sheet: #23201c;
  --card: #2a2621;
  --card-alt: #24201c;
  --line: #3b352e;
  --line-strong: #534b41;
  --ink: #f3eadc;
  --ink-2: #ded4c4;
  --muted: #a69c8e;
  --accent: #3d5229;
  --accent-mid: #4e6935;
  --accent-soft: #2a3621;
  --accent-border: #4b6138;
  --accent-strong: #9fd886;
  --mod-blue: #233f63;
  --mod-blue-soft: #1e2f47;
  --mod-blue-ink: #8bc1ff;
  --mod-teal: #1b4a46;
  --mod-teal-soft: #163634;
  --mod-teal-ink: #6ee7d4;
  --mod-purple: #3f2d59;
  --mod-purple-soft: #2f2342;
  --mod-purple-ink: #ccaef9;
  --mod-orange: #54341e;
  --mod-orange-soft: #3d2718;
  --mod-orange-ink: #f8b377;
  --zalo-bg: #224470;
  --zalo-hover: #2b548a;
  --tele-bg: #1e4b5c;
  --tele-hover: #275f73;
}

:root[data-theme="dark"][data-module="blue"] {
  --accent: #24456e;
  --accent-mid: #325e94;
  --accent-soft: #1d2f47;
  --accent-border: #365c8a;
  --accent-strong: #8cc2ff;
}

:root[data-theme="dark"][data-module="teal"] {
  --accent: #1d524c;
  --accent-mid: #287068;
  --accent-soft: #163834;
  --accent-border: #2c6e67;
  --accent-strong: #6ee7d4;
}

:root[data-theme="dark"][data-module="purple"] {
  --accent: #453166;
  --accent-mid: #5b4185;
  --accent-soft: #2f2345;
  --accent-border: #5a4282;
  --accent-strong: #d0b5fa;
}

:root[data-theme="dark"][data-module="orange"] {
  --accent: #5e381c;
  --accent-mid: #7d4c27;
  --accent-soft: #3d2616;
  --accent-border: #784b29;
  --accent-strong: #f9b578;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.is-hidden {
  display: none !important;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1.5px solid var(--line-strong);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.6px solid var(--ink);
  background: var(--accent);
  box-shadow: 1.5px 2px 0 var(--ink);
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.brand__text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand__mark {
  background: linear-gradient(transparent 55%, var(--accent-mid) 55%);
  padding: 0 3px;
  transition: background 0.2s ease;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1.3px solid var(--accent-border);
  color: var(--accent-strong);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
}

/* NEOBRUTALIST BUTTONS */
.btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: var(--card);
  border: 1.6px solid var(--ink);
  border-radius: 9px;
  padding: 0 13px;
  height: 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 1.5px 2.5px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translate(1.5px, 2px);
  box-shadow: none;
}

.btn--accent { background: var(--accent); }
.btn--zalo { background: var(--zalo-bg); }
.btn--zalo:hover { background: var(--zalo-hover); }
.btn--tele { background: var(--tele-bg); }
.btn--tele:hover { background: var(--tele-hover); }
.btn--ghost { background: var(--card); font-weight: 700; }
.btn--icon { width: 36px; padding: 0; }

/* HERO STOREFRONT BANNER */
.hero {
  margin-top: 16px;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 4px 0 var(--ink);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  border: 1.3px solid var(--ink);
  box-shadow: 1px 1.5px 0 var(--ink);
  margin-bottom: 12px;
  transition: background-color 0.2s ease;
}

.hero__title {
  font-size: clamp(20px, 2.5vw, 29px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero__desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 560px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.trust-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1.2px solid var(--line-strong);
  color: var(--ink-2);
}

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

.hero__visual {
  background: var(--card);
  border: 1.4px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  position: relative;
}

.hero-svg {
  width: 100%;
  height: 205px;
  display: block;
}

/* MODULE FILTER BAR */
.filter-section {
  position: sticky;
  top: 56px;
  z-index: 30;
  background: var(--paper);
  padding: 14px 0 12px;
  margin-top: 8px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.mod-tab {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.mod-tab:hover {
  border-color: var(--ink);
}

.mod-tab .mod-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.3px solid var(--ink);
}

.mod-tab[data-theme="green"] .mod-dot { background: #9fd28f; }
.mod-tab[data-theme="blue"] .mod-dot { background: #8dc1f7; }
.mod-tab[data-theme="teal"] .mod-dot { background: #74d9c6; }
.mod-tab[data-theme="purple"] .mod-dot { background: #c5a8f2; }
.mod-tab[data-theme="orange"] .mod-dot { background: #f5b97d; }

.mod-tab.active {
  background: var(--accent);
  color: var(--ink);
  border: 1.6px solid var(--ink);
  font-weight: 800;
  box-shadow: 2px 3px 0 var(--ink);
}

.mod-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
}

/* SERVICE STOREFRONT CATALOG GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.product-card {
  background: var(--card);
  border: 1.6px solid var(--ink);
  border-radius: 14px;
  box-shadow: 2.5px 3.5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.product-card:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 5px 0 var(--ink);
}

.product-card__strip {
  height: 7px;
  width: 100%;
  border-bottom: 1.4px solid var(--ink);
}

.product-card[data-card-theme="blue"] .product-card__strip { background: var(--mod-blue); }
.product-card[data-card-theme="teal"] .product-card__strip { background: var(--mod-teal); }
.product-card[data-card-theme="purple"] .product-card__strip { background: var(--mod-purple); }
.product-card[data-card-theme="orange"] .product-card__strip { background: var(--mod-orange); }
.product-card[data-card-theme="green"] .product-card__strip { background: #cfe3b2; }

.product-card__body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-module-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1.2px solid var(--ink);
}

.product-card[data-card-theme="blue"] .card-module-pill { background: var(--mod-blue-soft); color: var(--mod-blue-ink); }
.product-card[data-card-theme="teal"] .card-module-pill { background: var(--mod-teal-soft); color: var(--mod-teal-ink); }
.product-card[data-card-theme="purple"] .card-module-pill { background: var(--mod-purple-soft); color: var(--mod-purple-ink); }
.product-card[data-card-theme="orange"] .card-module-pill { background: var(--mod-orange-soft); color: var(--mod-orange-ink); }
.product-card[data-card-theme="green"] .card-module-pill { background: #e8efd9; color: #27793a; }

.card-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--card);
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-summary {
  font-size: 12.2px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* PRICE BLOCK */
.price-panel {
  background: var(--sheet);
  border: 1.3px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.price-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--accent-strong);
}

.product-card[data-card-theme="blue"] .price-num { color: var(--mod-blue-ink); }
.product-card[data-card-theme="teal"] .price-num { color: var(--mod-teal-ink); }
.product-card[data-card-theme="purple"] .price-num { color: var(--mod-purple-ink); }
.product-card[data-card-theme="orange"] .price-num { color: var(--mod-orange-ink); }

.price-unit {
  font-size: 11.5px;
  color: var(--muted);
}

.price-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--ink);
}

/* BULLET LIST */
.card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.card-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}

.check-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent);
  border: 1.3px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-card[data-card-theme="blue"] .check-dot { background: var(--mod-blue); }
.product-card[data-card-theme="teal"] .check-dot { background: var(--mod-teal); }
.product-card[data-card-theme="purple"] .check-dot { background: var(--mod-purple); }
.product-card[data-card-theme="orange"] .check-dot { background: var(--mod-orange); }

/* CARD FOOTER ACTIONS */
.card-footer {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-detail-link {
  width: 100%;
  height: 32px;
  font-size: 11.5px;
  background: var(--sheet);
  border: 1.2px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-2);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-detail-link:hover {
  border-style: solid;
  border-color: var(--ink);
  background: var(--accent-soft);
}

/* 3-STEP WORKFLOW SECTION */
.workflow {
  margin-top: 28px;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 4px 0 var(--ink);
  padding: 20px 22px;
}

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

.workflow__head h2 {
  font-size: 17px;
  font-weight: 800;
}

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

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-card {
  background: var(--card);
  border: 1.4px solid var(--line-strong);
  border-radius: 11px;
  padding: 14px;
}

.step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent);
  border: 1.3px solid var(--ink);
  margin-bottom: 8px;
}

.step-card h3 {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 5px;
}

.step-card p {
  font-size: 12px;
  color: var(--muted);
}

/* FOOTER & EMPTY STATE */
.site-footer {
  margin-top: 22px;
  padding: 12px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

/* DETAIL & COMPARISON MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.6);
  backdrop-filter: blur(3px);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 6px 0 var(--ink);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 20px;
}

.modal--wide {
  max-width: 680px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal__title {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.3;
}

.modal__summary {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
}

.compare-table th,
.compare-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.compare-table th:nth-child(2) { background: var(--card-alt); }
.compare-table th:nth-child(3) { background: var(--accent-soft); }
.compare-table td:nth-child(3) { font-weight: 700; }

.modal__note {
  background: var(--accent-soft);
  border: 1.3px solid var(--accent-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 14px;
}

/* MOBILE STICKY BOTTOM DOCK */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--paper);
  border-top: 1.6px solid var(--ink);
  padding: 10px 12px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

/* TOAST */
.toast {
  position: fixed;
  top: 66px;
  right: 16px;
  background: var(--ink);
  color: var(--card);
  border: 1.5px solid var(--accent);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.18s ease;
  max-width: calc(100vw - 32px);
}

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

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .hero__visual { min-height: 175px; }
  .hero-svg { height: 165px; }
  .workflow-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { padding-bottom: 84px; }
  .wrap { padding: 0 12px; }
  .status-badge, .topbar__cta-pc { display: none; }
  .catalog-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero__ctas { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero__ctas .btn { width: 100%; }
  .mobile-dock { display: grid; }
}
