/* ==========================================================================
   หน้า SHOP (หน้าแรกของร้าน) + การ์ดสินค้า — ดีไซน์ตาม ref "CITY SHOP"
   โทนดำ + แดง (ตามธีมเว็บ) บนฉากเมืองยามค่ำ
   โหลดหลัง theme-fm5.css (ทับเฉพาะส่วนที่เกี่ยวข้อง)
   ========================================================================== */

.cc-app {
  /* สีหลักแดง (ชื่อตัวแปรยังเป็น orange จาก ref แรก) */
  --shop-orange: #0ea5ff;
  --shop-orange-2: #5cc8ff;
  --shop-orange-deep: #2563eb;
  --shop-purple: #8d3bd6;
  --shop-panel: rgba(18, 16, 20, 0.86);
  --shop-line: rgba(255, 255, 255, 0.09);
}

/* ---------- HERO ---------- */
.shop-page {
  position: relative;
}

.shop-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(360px, 52vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 6.5rem;
  text-align: center;
}

.shop-hero.is-compact {
  min-height: 280px;
  padding-bottom: 5.5rem;
}

.shop-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.shop-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  filter: saturate(1.25) brightness(1.15);
}

/* ท้องฟ้าพลบค่ำ โทนน้ำเงิน (ZERO CITY) + ไล่ดำลงขอบล่างให้ต่อกับพื้นหน้า */
.shop-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(14, 165, 255, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(6, 14, 32, 0.75) 0%, rgba(18, 45, 100, 0.45) 35%, rgba(14, 165, 255, 0.16) 58%, rgba(12, 12, 14, 0.75) 82%, #0c0c0e 100%),
    linear-gradient(90deg, rgba(12, 12, 14, 0.55), transparent 30%, transparent 70%, rgba(12, 12, 14, 0.55));
  mix-blend-mode: normal;
}

.shop-hero-inner {
  position: relative;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shop-eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.8rem, 1.4vw, 1.05rem);
  letter-spacing: 0.55em;
  padding-left: 0.55em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.4rem;
}

.shop-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18em;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.shop-title-main {
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

.shop-title-accent {
  position: relative;
  background: linear-gradient(180deg, var(--shop-orange-2), var(--shop-orange-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* ตัวเอียงล้นกล่องข้อความ — background-clip:text จะตัดส่วนที่ล้น ("P" ขาด) จึงต้องเผื่อขอบ */
  padding: 0.08em 0.22em 0.08em 0.06em;
  margin: -0.08em -0.16em -0.08em 0;
  transform: skewX(-6deg) rotate(-3deg);
  filter: drop-shadow(0 4px 18px rgba(14, 165, 255, 0.45));
}

.shop-title-crown {
  position: absolute;
  top: -0.55em;
  right: 0.05em;
  width: 0.5em;
  height: 0.5em;
  color: var(--shop-orange-2);
  transform: rotate(12deg);
  filter: drop-shadow(0 0 10px rgba(14, 165, 255, 0.7));
}

.shop-title-cat {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-family: var(--font-heading);
  font-style: normal;
  color: #fff;
  text-transform: none;
}

.shop-tagline {
  margin: 0.9rem 0 0;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.shop-rule {
  display: block;
  width: 72px;
  height: 3px;
  margin: 1.1rem 0 1.4rem;
  border-radius: 2px;
  background: var(--shop-orange);
  box-shadow: 0 0 12px rgba(14, 165, 255, 0.6);
}

.shop-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.shop-perk {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem 0.7rem 0.8rem;
  text-align: left;
  background: rgba(14, 12, 18, 0.62);
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.shop-perk-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  color: var(--shop-orange);
  border: 1.5px solid rgba(14, 165, 255, 0.6);
  box-shadow: inset 0 0 12px rgba(14, 165, 255, 0.18);
}

.shop-perk strong {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.shop-perk small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-2);
}

/* ---------- แถบหมวดหมู่ (ทับขอบล่างของ hero) ---------- */
.shop-body {
  position: relative;
  z-index: 2;
  padding-top: 0;
}

.shop-cats {
  display: flex;
  gap: 0.6rem;
  margin-top: -3.6rem;
  margin-bottom: 1.6rem;
  /* จอคอม: ขึ้นแถวใหม่แทนการเลื่อนข้าง (ปุ่มท้าย ๆ เคยโดนตัดขอบ) — มือถือกลับเป็นเลื่อนข้างด้านล่าง */
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.shop-cats::-webkit-scrollbar {
  display: none;
}

.shop-cat {
  flex: 1 0 auto;
  min-width: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 58px;
  padding: 0 1.1rem;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
  background: var(--shop-panel);
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.shop-cat svg {
  color: rgba(255, 255, 255, 0.85);
  flex: none;
}

.shop-cat:hover {
  border-color: rgba(14, 165, 255, 0.5);
  background: rgba(30, 20, 22, 0.92);
}

.shop-cat.active {
  border: 1.5px solid var(--shop-orange);
  background: linear-gradient(180deg, rgba(14, 165, 255, 0.14), rgba(14, 165, 255, 0.03)), var(--shop-panel);
  box-shadow: 0 0 0 1px rgba(14, 165, 255, 0.15), 0 0 22px rgba(14, 165, 255, 0.18);
}

.shop-cat.active svg {
  color: var(--shop-orange);
}

.shop-cat.is-empty:not(.active) {
  color: var(--text-2);
}

.shop-cat:focus-visible,
.shop-sec-more:focus-visible,
.shop-cart-btn:focus-visible,
.shop-card-link:focus-visible {
  outline: 2px solid var(--shop-orange);
  outline-offset: 2px;
}

/* ---------- หัวข้อส่วน ---------- */
.shop-sec {
  margin-top: 1.4rem;
  scroll-margin-top: calc(var(--cc-topbar-h, 60px) + 16px);
}

.shop-sec-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.shop-sec-title {
  margin: 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--shop-orange);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}

.shop-sec-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.shop-sec-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.shop-sec-more svg {
  color: var(--shop-orange);
  transition: transform 0.15s ease;
}

.shop-sec-more:hover svg {
  transform: translateX(3px);
}

.shop-sec-count {
  font-size: 0.85rem;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- กริด + การ์ดสินค้า ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.cc-card.shop-card {
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #1b1a1f, #141317);
  border: 1px solid var(--shop-line);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cc-card.shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 255, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 24px rgba(14, 165, 255, 0.08);
  background: linear-gradient(180deg, #1f1d22, #161519);
}

.shop-card .cc-card-img {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 0;
}

/* ภาพจางลงกลืนกับตัวการ์ด */
.shop-card .cc-card-img::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, #1a191e);
  pointer-events: none;
}

.shop-card .cc-img-placeholder {
  color: var(--shop-orange);
  background:
    radial-gradient(circle at 50% 45%, rgba(14, 165, 255, 0.2), transparent 60%),
    radial-gradient(circle at 80% 10%, rgba(18, 45, 100, 0.35), transparent 55%),
    #1d1b21 !important; /* theme-fm5.css ใส่ !important ไว้ที่ .cc-card-img */
}

.shop-card .cc-img-placeholder svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 14px rgba(14, 165, 255, 0.5));
}

.shop-card-tags {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  display: flex;
  gap: 0.35rem;
  z-index: 2;
  pointer-events: none;
}

.shop-tag {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(180deg, var(--shop-orange-2), var(--shop-orange));
}

.shop-tag-sale {
  color: #fff;
  background: linear-gradient(180deg, #38b6ff, #2563eb);
}

.shop-card .cc-card-body {
  gap: 0.25rem;
  padding: 0.35rem 1rem 1rem;
}

.shop-card .cc-card-title {
  font-size: 1.08rem;
  font-weight: 600;
}

/* ลิงก์ยืดเต็มการ์ด — คลิกตรงไหนก็เข้าหน้าสินค้า ยกเว้นปุ่มตะกร้า */
.shop-card-link {
  color: inherit;
}

.shop-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.shop-card .cc-card-desc {
  font-size: 0.82rem;
}

.shop-card .cc-card-foot {
  align-items: center;
  padding-top: 0.6rem;
}

.shop-card .cc-price strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.shop-card .cc-price-old {
  font-size: 0.78rem;
}

.shop-cart-btn {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, var(--shop-orange-2), var(--shop-orange));
  box-shadow: 0 4px 14px rgba(14, 165, 255, 0.28);
  transition: filter 0.15s ease, transform 0.1s ease;
}

.shop-cart-btn:hover {
  filter: brightness(1.08);
}

.shop-cart-btn:active {
  transform: scale(0.94);
}

/* ---------- มือถือ ---------- */
@media (max-width: 700px) {
  .shop-hero {
    min-height: 0;
    padding: 2.4rem 1rem 5.5rem;
  }

  .shop-eyebrow {
    letter-spacing: 0.4em;
  }

  /* มือถือ: 3 ช่องเรียงแถวเดียว ไอคอนบน ข้อความล่าง (ซ่อนคำอธิบายรอง) */
  .shop-perks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.45rem;
  }

  .shop-perk {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.65rem 0.35rem;
    text-align: center;
  }

  .shop-perk strong {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .shop-perk small {
    display: none;
  }

  .shop-perk-ic {
    width: 34px;
    height: 34px;
  }

  .shop-cats {
    flex-wrap: nowrap;
    margin-top: -3rem;
    margin-left: calc(-1 * max(16px, var(--cc-safe-left, 0px)));
    margin-right: calc(-1 * max(16px, var(--cc-safe-right, 0px)));
    padding: 2px max(16px, var(--cc-safe-left, 0px));
  }

  .shop-cat {
    flex: 0 0 auto;
    min-width: 0;
    height: 50px;
    padding: 0 0.95rem;
    font-size: 0.88rem;
  }

  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .shop-card .cc-card-body {
    padding: 0.3rem 0.7rem 0.75rem;
  }

  .shop-card .cc-card-title {
    font-size: 0.95rem;
  }

  .shop-card .cc-price strong {
    font-size: 1.05rem;
  }

  .shop-cart-btn {
    width: 40px;
    height: 32px;
  }

  .shop-sec-more {
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   หน้าเติมเหรียญ (#/topup) — เลย์เอาต์ตาม ref: หัวข้อ + การ์ดยอดเงินมุมขวา,
   รายการช่องทาง (ซ้าย) + แผงรายละเอียด (ขวา), ประวัติล่าสุดเต็มกว้างด้านล่าง
   ========================================================================== */
.tu-page {
  padding-top: 1.4rem;
}

.tu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.tu-head .cc-back {
  margin-bottom: 0.5rem;
}

.tu-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #fff;
}

.tu-sub {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--text-2);
}

.tu-balance {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
  padding: 0.75rem 1.2rem 0.75rem 0.9rem;
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
}

.tu-balance[hidden] {
  display: none;
}

.tu-balance-ic {
  color: var(--shop-orange);
  display: grid;
}

.tu-balance-txt small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-2);
}

.tu-balance-txt strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.tu-h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.tu-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tu-methods {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tu-method {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tu-method:hover {
  border-color: rgba(14, 165, 255, 0.35);
}

.tu-method.active {
  border: 1.5px solid var(--shop-orange);
  background: linear-gradient(90deg, rgba(14, 165, 255, 0.1), rgba(14, 165, 255, 0.02)), #141417;
}

.tu-method:focus-visible,
.tu-tab:focus-visible {
  outline: 2px solid var(--shop-orange);
  outline-offset: 2px;
}

.tu-method-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 9px;
  color: var(--shop-orange);
  background: rgba(14, 165, 255, 0.1);
  border: 1px solid rgba(14, 165, 255, 0.35);
}

.tu-method-txt {
  min-width: 0;
}

.tu-method-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.tu-method-txt small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.tu-dot.is-ok {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.tu-badge {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  color: var(--shop-orange-2);
  background: rgba(14, 165, 255, 0.12);
  border: 1px solid rgba(14, 165, 255, 0.3);
}

.tu-panel {
  min-height: 230px;
  padding: 1.3rem;
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
}

.tu-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tu-pane-h {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.tu-pane-h:first-child {
  margin-top: 0;
}

.tu-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-3);
}

.tu-pane .cc-packages {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.tu-pane .cc-package:not(:disabled):hover {
  border-color: var(--shop-orange);
}

/* สถานะกลางแผง (ยังไม่ผูก / โหลดไม่ได้ / ไม่มีแพ็กเกจ) — แบบ ref "unavailable" */
.tu-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 190px;
  text-align: center;
}

.tu-state-ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}

.tu-state strong {
  color: #fff;
  font-weight: 600;
}

.tu-state p {
  margin: 0 0 0.6rem;
  max-width: 380px;
  font-size: 0.9rem;
  color: var(--text-2);
}

/* ---------- ประวัติล่าสุด ---------- */
.tu-recent {
  margin-top: 1.4rem;
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
  overflow: hidden;
}

.tu-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.3rem;
  border-bottom: 1px solid var(--shop-line);
}

.tu-recent-head h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.tu-recent-head h2 svg {
  color: var(--text-2);
}

.tu-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.tu-tab {
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-2);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.tu-tab.active {
  color: #fff;
  background: var(--shop-orange);
}

.tu-recent-body {
  min-height: 200px;
  padding: 0.5rem 1.3rem 1rem;
}

.tu-recent-body .cc-empty,
.tu-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 190px;
  text-align: center;
  color: var(--text-3);
}

.tu-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.tu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tu-list li + li {
  border-top: 1px solid var(--shop-line);
}

.tu-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  color: inherit;
}

.tu-row:hover .tu-row-main strong {
  color: var(--shop-orange-2);
}

.tu-row-ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  color: var(--shop-orange);
  background: rgba(14, 165, 255, 0.1);
}

.tu-row-main {
  flex: 1;
  min-width: 0;
}

.tu-row-main strong {
  display: block;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tu-row-main small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-3);
}

.tu-row-end {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.tu-row-end strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

@media (max-width: 820px) {
  .tu-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tu-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tu-method-txt small {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .tu-head {
    flex-direction: column;
    gap: 0.8rem;
  }

  .tu-balance {
    width: 100%;
  }

  .tu-methods {
    grid-template-columns: minmax(0, 1fr);
  }

  .tu-panel {
    padding: 1rem;
  }

  .tu-recent-head,
  .tu-recent-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tu-row-end {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
}

/* ==========================================================================
   คำสั่งซื้อของฉัน (#/orders) — รายการแบบตาราง/ลิสต์ แถวละหนึ่งคำสั่งซื้อ
   จอคอม: คอลัมน์ คำสั่งซื้อ | สินค้า | วันที่ | ยอดรวม | สถานะ | ปุ่ม
   มือถือ: แถวละ 2 บรรทัด (รหัส+ยอด / สินค้า+สถานะ)
   ========================================================================== */
.ol-page {
  padding-top: 1.4rem;
}

.ol-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.ol-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #fff;
}

.ol-sub {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.ol-count {
  flex: none;
  font-size: 0.85rem;
  color: var(--text-3);
}

.ol-filters {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.ol-filters::-webkit-scrollbar {
  display: none;
}

.ol-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text-2);
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ol-filter em {
  font-style: normal;
  font-size: 0.74rem;
  min-width: 1.4em;
  padding: 0.05rem 0.4rem;
  text-align: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
}

.ol-filter:hover {
  color: #fff;
  border-color: rgba(14, 165, 255, 0.35);
}

.ol-filter.active {
  color: #fff;
  border-color: var(--shop-orange);
  background: rgba(14, 165, 255, 0.1);
}

.ol-filter.active em {
  background: var(--shop-orange);
  color: #fff;
}

.ol-filter:focus-visible,
.ol-act:focus-visible,
.ol-row-link:focus-visible {
  outline: 2px solid var(--shop-orange);
  outline-offset: 2px;
}

.ol-table {
  background: #141417;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
  overflow: hidden;
}

.ol-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ol-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(0, 2.2fr) 150px 110px minmax(150px, 1.1fr) 150px;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
}

.ol-list .ol-row {
  border-top: 1px solid var(--shop-line);
  transition: background-color 0.12s ease;
}

.ol-list .ol-row:first-child {
  border-top: 0;
}

.ol-list .ol-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* แถบสีซ้ายของแถวที่ต้องทำอะไรต่อ */
.ol-row.is-pending::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fab219;
}

.ol-row-head {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--shop-line);
}

.ol-row-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ol-c {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ol-c small {
  font-size: 0.76rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ol-c-code strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.ol-items {
  color: var(--text-1);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ol-c-date {
  font-size: 0.84rem;
  color: var(--text-2);
}

.ol-c-total {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.ol-c-status {
  align-items: flex-start;
}

.ol-hint.is-red {
  color: #5cc8ff;
}

.ol-c-act {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.ol-chev {
  color: var(--text-3);
}

.ol-row:hover .ol-chev {
  color: #fff;
}

.ol-act {
  position: relative;
  z-index: 2;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--shop-orange);
  border: 1px solid var(--shop-orange);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.ol-act:hover {
  filter: brightness(1.1);
}

.ol-act-ghost {
  color: var(--text-2);
  background: transparent;
  border-color: var(--shop-line);
  font-weight: 500;
}

.ol-act-ghost:hover {
  color: #fff;
  filter: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.ol-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: var(--text-3);
  text-align: center;
}

.ol-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.ol-more {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* จอกลาง: ซ่อนคอลัมน์วันที่ (ย้ายไปใต้รหัส) */
@media (max-width: 1000px) {
  .ol-row {
    grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr) 100px minmax(130px, 1fr) auto;
  }

  .ol-c-date {
    display: none;
  }
}

/* มือถือ: แถวละ 2 บรรทัด */
@media (max-width: 640px) {
  .ol-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .ol-row-head {
    display: none;
  }

  .ol-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'code total'
      'items status'
      'act act';
    gap: 0.35rem 0.8rem;
    padding: 0.85rem 1rem;
  }

  .ol-c-code {
    grid-area: code;
  }

  .ol-c-items {
    grid-area: items;
  }

  .ol-c-total {
    grid-area: total;
    text-align: right;
  }

  .ol-c-status {
    grid-area: status;
    align-items: flex-end;
  }

  .ol-c-act {
    grid-area: act;
  }

  /* แถวที่ไม่มีปุ่ม: ไม่ต้องมีบรรทัดที่สาม */
  .ol-c-act:has(> .ol-chev) {
    display: none;
  }

  .ol-c-act .ol-act {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
  }
}

/* ==========================================================================
   เมนูบนมือถือ/แท็บเล็ต (< 900px): แถวที่สองใต้โลโก้ เลื่อนแนวนอนได้
   --cc-topbar-h = ความสูงรวมของแถบ (ใช้เป็นระยะ sticky/scroll ของส่วนอื่น)
   ========================================================================== */
@media (max-width: 899.98px) {
  :root {
    --cc-topbar-row-h: 56px;
    --cc-topnav-h: 44px;
    --cc-topbar-h: calc(var(--cc-topbar-row-h) + var(--cc-topnav-h));
  }

  .cc-topbar-row {
    height: auto;
    flex-wrap: wrap;
    row-gap: 0;
  }

  .cc-topbar-row > .cc-brand,
  .cc-topbar-actions {
    height: var(--cc-topbar-row-h);
  }

  .cc-topbar-row > .cc-brand {
    display: inline-flex;
    align-items: center;
  }

  .cc-topbar-nav {
    order: 3;
    flex: 0 0 calc(100% + 24px);
    display: flex;
    gap: 0.25rem;
    height: var(--cc-topnav-h);
    margin: 0 -12px;
    padding: 0 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-top: 1px solid var(--cc-radius-line);
  }

  .cc-topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .cc-topbar-nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 0.7rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .cc-topbar-nav a:first-child {
    padding-left: 0.2rem;
  }
}
