@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #fff5f8;
  --paper: #ffffff;
  --ink: #3d1d2e;
  --mute: #7a5266;
  --line: #f5d0e0;
  --brand: #db2777;
  --brand-dark: #9d174d;
  --cta: #e11d48;
  --cta-2: #f43f5e;
  --amber: #f59e0b;
  --gold: #fef08a;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --danger: #dc2626;
  --radius: 20px;
  --shadow: 0 14px 34px -10px rgba(157, 23, 77, 0.14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Prompt", "Leelawadee UI", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.page-sale { padding-bottom: 120px; }
.page-desk { background: var(--bg); }
.page-desk .wrap { max-width: 1220px; margin: 0 auto; padding: 16px 14px 40px; }

/* Sticky Top Flash Bar */
.top-promo {
  position: sticky;
  top: 0;
  z-index: 45;
  background: linear-gradient(90deg, #9d174d 0%, #db2777 50%, #f43f5e 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(157, 23, 77, 0.25);
}
.top-promo-in {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.top-promo-copy {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.top-promo-badge {
  background: var(--gold);
  color: #831843;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.top-promo-text { white-space: nowrap; }
.top-promo-text b { font-weight: 800; color: #fff; }
.top-promo-text.highlight {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(254, 240, 138, 0.55);
  padding: 2px 8px;
  border-radius: 999px;
}
.top-promo-text.highlight b { color: var(--gold); }
.top-promo-sep { opacity: 0.6; }
.top-promo-cta {
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

/* Single-Column Salepage Feed */
.salepage-feed {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 42px rgba(157, 23, 77, 0.09);
  padding-bottom: 24px;
}

/* Hero Showcase Grid */
.hero-showcase {
  background: #fdf2f8;
}
.hero-collage {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 4px;
  background: #fce7f3;
}
.hero-main-shot {
  margin: 0;
  position: relative;
  overflow: hidden;
}
.hero-main-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(157, 23, 77, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.hero-side-shots {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}
.side-shot {
  margin: 0;
  position: relative;
  overflow: hidden;
}
.side-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-shot span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
}
.hero-ribbon-bar {
  background: linear-gradient(90deg, #fce7f3 0%, #fef3c7 100%);
  color: #831843;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}

/* Hero Intro Block */
.hero-header {
  background: linear-gradient(180deg, #fff5f8 0%, #ffffff 100%);
  padding: 16px 16px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fce7f3;
  color: #be123c;
  border: 1px solid #fbcfe8;
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.hero-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--ink);
}
.hero-header p {
  margin: 0 0 14px;
  color: var(--mute);
  font-size: 14px;
}

/* 3-Tier Deal Cards */
.deal-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 12px;
}
.deal-card {
  border-radius: 16px;
  padding: 13px 8px 10px;
  background: #fffbfd;
  border: 2px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
}
.deal-card:hover {
  transform: translateY(-2px);
}
.deal-card.best {
  background: linear-gradient(145deg, #fff0f5 0%, #ffe4ee 100%);
  border-color: var(--brand);
  box-shadow: 0 8px 20px -6px rgba(219, 39, 119, 0.28);
}
.deal-card.vip {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
}
.deal-ribbon {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.deal-ribbon.vip-ribbon {
  background: linear-gradient(90deg, #d97706, #ea580c);
}
.deal-card small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--mute);
}
.deal-card.best small { color: #9d174d; }
.deal-card.vip small { color: #92400e; }
.deal-card strong {
  display: block;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
  margin: 4px 0 2px;
}
.deal-card.best strong { color: var(--brand); }
.deal-card.vip strong { color: #b45309; }
.deal-card span {
  font-size: 11.5px;
  color: var(--mute);
  display: block;
}
.deal-free {
  font-style: normal;
  display: inline-block;
  margin-top: 5px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.old {
  text-decoration: line-through;
  color: #a88b9c;
}

.service-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.service-item {
  background: #fff8fb;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

/* Stacked Product Images */
.photo-stream {
  display: flex;
  flex-direction: column;
}
.stream-card {
  margin: 0;
  background: #fff;
  border-bottom: 6px solid #fff0f5;
}
.stream-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 10px;
  background: #fff;
}
.stream-num {
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.stream-head b {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.stream-tag {
  background: #fce7f3;
  color: #9d174d;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.stream-img-wrap {
  position: relative;
}
.stream-card img {
  width: 100%;
  height: auto;
  display: block;
}
.stream-quick-pick {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(219, 39, 119, 0.94);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(157, 23, 77, 0.35);
}

/* Mid-stream Promo Break */
.promo-break {
  background: linear-gradient(135deg, #831843 0%, #be123c 100%);
  color: #fff;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.promo-break b {
  display: block;
  font-size: 15.5px;
  color: var(--gold);
}
.promo-break span {
  font-size: 12.5px;
  color: #fce7f3;
}

/* Full Pattern Catalog Grid */
.catalog-section {
  padding: 18px 14px;
  background: #fff9fb;
  border-top: 1px solid var(--line);
}
.catalog-head {
  text-align: center;
  margin-bottom: 12px;
}
.catalog-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
}
.catalog-head p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--mute);
}
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-tab {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.28);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pat-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pat-card.is-picked {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.22);
}
.pat-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.6;
  background: #fdf2f8;
  cursor: zoom-in;
  overflow: hidden;
  flex-shrink: 0;
}
.pat-img-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.pat-img-box:hover img {
  transform: scale(1.04);
}
.pat-code {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(61, 29, 46, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
.pat-hot {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: #e11d48;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}
.pat-hot.low {
  background: #d97706;
}
.pat-hot.soldout {
  background: #64748b;
}
.pat-stock-pill {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  color: #166534;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.pat-stock-pill.out {
  background: #fee2e2;
  color: #991b1b;
}
.pat-card.is-soldout,
.mini-pat.is-soldout {
  opacity: 0.58;
}
.pat-card.is-soldout .btn-pat-pick,
.mini-pat.is-soldout .btn-mini-add {
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
  cursor: not-allowed;
}
.mini-stock-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  color: #166534;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.mini-stock-tag.out {
  background: #fee2e2;
  color: #991b1b;
}
.pat-zoom-hint {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.pat-body {
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pat-cat-label {
  font-size: 10.5px;
  color: var(--mute);
  font-weight: 600;
}
.pat-title {
  font-size: 12.5px;
  line-height: 1.25;
  margin: 2px 0 7px;
  flex: 1;
}
.btn-pat-pick {
  width: 100%;
  background: #fdf2f8;
  color: var(--brand);
  border: 1.5px solid #f9a8d4;
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-pat-pick:hover,
.pat-card.is-picked .btn-pat-pick {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Quick Spec Grid */
.spec-wrap {
  padding: 16px 14px;
  background: #fff2f7;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spec-wrap h2 {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 800;
  text-align: center;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.spec-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
}
.spec-box small {
  display: block;
  font-size: 11.5px;
  color: var(--mute);
}
.spec-box b {
  font-size: 13.5px;
  color: var(--ink);
}

/* Checkout Section */
.checkout-section {
  padding: 18px 14px 24px;
  background: linear-gradient(180deg, #ffe4ee 0%, #ffffff 160px);
}
.order-card {
  background: #fff;
  border-radius: 20px;
  border: 2px solid #f9a8d4;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.order-card-head {
  background: linear-gradient(135deg, #be123c 0%, #db2777 55%, #f43f5e 100%);
  color: #fff;
  padding: 16px 18px;
  text-align: center;
}
.badge-live {
  display: inline-block;
  background: var(--gold);
  color: #831843;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.order-card-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
}
.order-card-head p {
  margin: 3px 0 0;
  font-size: 13px;
  opacity: 0.95;
}
.order-card-body {
  padding: 15px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--ink);
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pack-list {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}
.opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 15px;
  padding: 13px 14px;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.opt:hover { border-color: #f472b6; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-left { display: flex; align-items: center; gap: 10px; }
.radio-dot {
  width: 21px;
  height: 21px;
  border-radius: 999px;
  border: 2px solid #c08497;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.opt.on .radio-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 3.5px #fff;
}
.opt.on {
  border-color: var(--brand);
  background: #fff0f6;
  box-shadow: 0 6px 16px -6px rgba(219, 39, 119, 0.28);
}
.opt-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  display: block;
}
.opt-sub {
  font-size: 12px;
  color: var(--mute);
  display: block;
}
.opt-price { text-align: right; flex-shrink: 0; }
.opt-price .sum {
  font-size: 23px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  display: block;
}
.opt-price .per-unit {
  font-size: 11.5px;
  color: var(--ok);
  font-weight: 700;
}
.tag-best {
  position: absolute;
  top: -10px;
  right: 12px;
  background: linear-gradient(90deg, #db2777, #f43f5e);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 10px;
}
.tag-best.vip {
  background: linear-gradient(90deg, #d97706, #ea580c);
}

/* Mode Selector (Random vs Custom Pick) */
.mode-selector {
  margin-bottom: 16px;
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mode-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fffbfd;
  cursor: pointer;
  margin: 0;
  transition: all 0.15s;
}
.mode-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.mode-card b {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 2px;
}
.mode-card small {
  display: block;
  font-size: 11.5px;
  color: var(--mute);
  font-weight: 500;
  line-height: 1.3;
}
.mode-card.on {
  border-color: var(--brand);
  background: #fff0f6;
  box-shadow: 0 5px 14px -5px rgba(219, 39, 119, 0.26);
}
.mode-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 3px;
}
.mode-badge.pink {
  background: #fce7f3;
  color: #be123c;
}

/* Custom Picker Drawer inside Form */
.custom-picker-box {
  margin-top: 10px;
  border: 2px solid #f472b6;
  border-radius: 16px;
  padding: 12px;
  background: #fff8fb;
}
.picker-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.picker-status-bar b {
  display: block;
  font-size: 14.5px;
  color: #be123c;
}
.selected-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.slot-card {
  background: #fff;
  border: 1.5px dashed #f472b6;
  border-radius: 12px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  position: relative;
}
.slot-card.filled {
  border-style: solid;
  border-color: var(--brand);
  background: #fff0f6;
}
.slot-card img {
  width: 46px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #f9a8d4;
}
.slot-info {
  flex: 1;
  min-width: 0;
}
.slot-info b {
  display: block;
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-info small {
  display: block;
  font-size: 10.5px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-remove {
  background: #fee2e2;
  color: #dc2626;
  border: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.picker-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.picker-tab {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.picker-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.picker-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 410px;
  overflow-y: auto;
  padding-right: 4px;
}
.mini-pat {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mini-pat.has-qty {
  border-color: var(--brand);
  background: #fff0f6;
}
.mini-pat-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.4;
  background: #fdf2f8;
  overflow: hidden;
  flex-shrink: 0;
}
.mini-pat-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mini-code {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  background: rgba(61, 29, 46, 0.88);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 5px;
}
.mini-qty-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.mini-pat-name {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 7px 4px;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-pat-btns {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  padding: 0 6px 6px;
}
.btn-mini-sub,
.btn-mini-add {
  border: 0;
  border-radius: 7px;
  padding: 5px 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}
.btn-mini-sub {
  background: #fce7f3;
  color: #9d174d;
}
.btn-mini-add {
  background: var(--brand);
  color: #fff;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.field { margin: 0 0 11px; }
label {
  display: block;
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 700;
}
.req { color: var(--cta); }
input, textarea, select {
  width: 100%;
  background: #fffbfd;
  color: var(--ink);
  border: 1.5px solid #e5b8ce;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.15);
}
textarea { min-height: 70px; resize: vertical; }

/* Field Validation States */
.field-msg {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--mute);
}
.field-msg:empty { display: none; }
.field.has-err input,
.field.has-err textarea,
.field.has-err select {
  border-color: var(--danger);
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.field.has-err .field-msg,
.mode-selector.has-err .field-msg {
  color: var(--danger);
}
.field.is-valid input,
.field.is-valid textarea {
  border-color: var(--ok);
  background: #f0fdf4;
}
.field.is-valid .field-msg {
  color: var(--ok);
}
.err-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
}

.btn-fb-connect {
  width: 100%;
  background: #1877f2;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.chat-preview {
  width: 100%;
  min-height: 135px;
  background: #fff;
  border: 1px solid #f9a8d4;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.free-badge {
  color: var(--ok);
  background: var(--ok-soft);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12.5px;
}

.summary-box {
  background: #fff5f8;
  border: 1.5px dashed #f472b6;
  border-radius: 14px;
  padding: 11px 14px;
  margin: 10px 0 14px;
  font-size: 13.5px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--mute);
}
.summary-row b {
  text-align: right;
  color: var(--ink);
}
.summary-row.total {
  margin: 6px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}
.summary-row.total b {
  color: var(--cta);
  font-size: 21px;
}

.more { margin: 0 0 8px; color: var(--mute); }
.more summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.muted { color: var(--mute); font-size: 12.5px; }

.btn {
  background: linear-gradient(135deg, #db2777 0%, #f43f5e 100%);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px -6px rgba(219, 39, 119, 0.5);
}
.btn-submit-main {
  margin: 12px 0 6px;
  padding: 14px 14px;
  font-size: clamp(14.5px, 4vw, 17.5px);
  white-space: nowrap;
  background: linear-gradient(135deg, #db2777 0%, #e11d48 100%);
  box-shadow: 0 10px 24px -6px rgba(225, 29, 72, 0.52);
}
.btn.wide { width: 100%; }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.small {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: none;
  white-space: nowrap;
}

/* Lightbox Modal */
.lightbox-modal {
  border: 0;
  border-radius: 18px;
  padding: 12px;
  max-width: min(92vw, 480px);
  background: #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}
.lightbox-modal::backdrop {
  background: rgba(61, 29, 46, 0.65);
  backdrop-filter: blur(3px);
}
.lightbox-inner {
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(61, 29, 46, 0.85);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.lightbox-inner img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}
.lightbox-caption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Thank You & Admin Pattern Thumbnails */
.thankyou-patterns {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.thankyou-pat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 8px;
}
.ty-pat-item {
  background: #fff5f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  font-size: 11.5px;
}
.ty-pat-item img {
  width: 100%;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 4px;
}
.ty-pat-item small {
  display: block;
  font-size: 10.5px;
  color: var(--mute);
}
.admin-pat-summary {
  margin-top: 3px;
  font-size: 12px;
  color: #831843;
  background: #fdf2f8;
  border-radius: 7px;
  padding: 4px 7px;
}
.admin-pat-thumbs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.admin-thumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  font-size: 9.5px;
  font-weight: 700;
}
.admin-thumb img {
  width: 34px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

/* Sticky Bottom Bar */
.sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(74, 29, 51, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.sticky-in {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sticky img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 11px;
  border: 1.5px solid #f9a8d4;
}
.sticky .grow { flex: 1; min-width: 0; color: #fff; }
.sticky .grow b { font-size: 15px; display: block; line-height: 1.15; color: var(--gold); }
.sticky .muted { color: #fbcfe8; font-size: 12px; }
.sticky .btn { min-width: 132px; padding: 10px 15px; font-size: 15px; }

/* Shared Admin / Thankyou */
.card, .bill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 16px; margin: 0 0 14px; }
.card h2, .bill h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.flash { border-radius: 12px; padding: 11px 14px; margin: 0 0 12px; font-weight: 600; font-size: 13.5px; }
.flash.err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash.ok { background: var(--ok-soft); color: #166534; border: 1px solid #bbf7d0; }
.bill { padding: 16px; margin: 0 0 12px; }
.rows { display: grid; gap: 7px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; }
.rows .total { font-size: 18px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--cta); }
.row-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--mute);
  background: #fff5f8;
  font-weight: 700;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  background: #fce7f3;
  color: #be123c;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.status-new { background: #fef3c7; color: #b45309; }
.badge.status-confirmed { background: #e0f2fe; color: #0369a1; }
.badge.status-shipped { background: #dcfce7; color: #166534; }
.badge.status-cancelled { background: #f1f5f9; color: #64748b; }

.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bulk-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}
.bulk-check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  cursor: pointer;
}
.bulk-check input { width: 18px; height: 18px; margin: 0; }
.bulk-select { width: auto; padding: 6px 10px; font-size: 13px; border-radius: 9px; }

.orders-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ip-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #7a5266;
  background: #fdf2f8;
  border: 1px solid #f5d0e0;
  border-radius: 6px;
  padding: 1px 6px;
}
.ip-tag.blocked {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.track-inline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.track-inline input {
  width: 140px;
  padding: 6px 9px;
  font-size: 12.5px;
  border-radius: 8px;
}

.login { max-width: 390px; margin: 10vh auto; }
dialog { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .orders-table-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .orders-table,
  .orders-table tbody {
    display: block;
    width: 100%;
  }
  .orders-table thead { display: none; }
  .orders-table tr.order-row {
    display: block;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px -8px rgba(157, 23, 77, 0.12);
  }
  .orders-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    white-space: normal !important;
  }
  .orders-table td:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
  }
  .orders-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    color: var(--mute);
    flex: 0 0 105px;
  }
  .orders-table td.cell-actions {
    display: block;
    padding-top: 10px;
  }
  .orders-table td.cell-actions::before {
    display: block;
    margin-bottom: 6px;
  }
  .orders-table td.cell-actions .row-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .orders-table td.cell-actions .btn.small {
    width: 100%;
    padding: 8px 6px;
    font-size: 12.5px;
    text-align: center;
  }
  .track-inline { flex: 1; }
  .track-inline input { width: 100%; flex: 1; }
}

@media (max-width: 600px) {
  .hide-xs { display: none; }
  .deal-grid-3 { grid-template-columns: 1fr; gap: 10px; }
  .deal-card { flex-direction: row; align-items: center; padding: 11px 14px; text-align: left; }
  .deal-card strong { font-size: 24px; margin: 0; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .picker-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-grid { grid-template-columns: 1fr; }
  .service-bar { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .hero-header h1 { font-size: 21px; }
}
