/* ==========================================================================
   SÈVE Clean Beauty — Mobile-First Luxury Editorial Design System
   Inspired by Rhode, Glossier, Rare Beauty & Sephora Mobile UI
   ========================================================================== */

:root {
  --bg-desktop: #ebe5dd;
  --bg-page: #f8f5f1;
  --bg-surface: #ffffff;
  --bg-stone: #f1ece5;
  --bg-chip: #efeae2;
  --bg-warm-tint: #f4eee7;

  --border: #e6dfd7;
  --border-strong: #d3c9be;

  --ink-primary: #1f1b18;
  --ink-secondary: #5e544c;
  --ink-muted: #8a7f76;

  --accent-espresso: #3b2821;
  --accent-clay: #8a5649;
  --accent-sage: #4c6252;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-subtle: 0 2px 10px rgba(31, 27, 24, 0.04);
  --shadow-sheet: 0 -10px 34px rgba(31, 27, 24, 0.12);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 520px) {
  body {
    background: var(--bg-desktop);
    display: flex;
    justify-content: center;
    min-height: 100vh;
  }
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg-page);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 520px) {
  .app-shell {
    max-width: 436px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(31, 27, 24, 0.08);
  }
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* Announcement Bar */
.announcement-bar {
  background: var(--ink-primary);
  color: #f6f1eb;
  font-size: 11.5px;
  letter-spacing: 0.025em;
  text-align: center;
  padding: calc(7px + var(--safe-top)) 14px 7px;
  line-height: 1.3;
}

/* Sticky Minimalist Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 54px;
  padding: 0 14px;
  background: rgba(248, 245, 241, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wordmark {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.22em;
  padding: 4px 10px 4px 14px;
  color: var(--ink-primary);
  transition: opacity 0.16s ease;
}

.brand-wordmark:active {
  opacity: 0.55;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  position: relative;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: rgba(31, 27, 24, 0.05);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.bag-count-badge {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--ink-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 28px);
  outline: none;
}

.view-fade {
  animation: fadeUp 0.22s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bottom Tab Bar */
.bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 436px;
  height: calc(var(--tabbar-height) + var(--safe-bottom));
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: rgba(248, 245, 241, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 40;
}

.tab-item {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.tab-item svg {
  width: 21px;
  height: 21px;
}

.tab-item.active {
  color: var(--ink-primary);
}

.tab-icon-wrap {
  position: relative;
  display: inline-flex;
}

.tab-dot-badge {
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  padding: 0 3.5px;
  border-radius: var(--radius-pill);
  background: var(--accent-espresso);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   HOME / SHOP VIEW
   ========================================================================== */

.hero-card {
  margin: 14px 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--bg-stone);
  border: 1px solid var(--border);
  cursor: pointer;
}

.hero-image-wrap {
  aspect-ratio: 4 / 3.45;
  overflow: hidden;
  background: var(--bg-stone);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-card:hover .hero-image-wrap img {
  transform: scale(1.02);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(28, 22, 18, 0.72) 0%,
    rgba(28, 22, 18, 0.18) 46%,
    rgba(28, 22, 18, 0) 76%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #faf7f3;
}

.hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.88;
  margin-bottom: 4px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.06;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 13.5px;
  opacity: 0.92;
  margin: 0 0 14px;
  max-width: 280px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-pill-light {
  background: #faf7f3;
  color: var(--ink-primary);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, background 0.14s ease;
}

.btn-pill-light:active {
  transform: scale(0.97);
}

/* Horizontal Category Chips */
.chip-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 16px 6px;
  scrollbar-width: none;
}

.chip-scroller::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.16s ease;
}

.cat-chip.active {
  background: var(--ink-primary);
  color: #faf7f3;
  border-color: var(--ink-primary);
}

/* Section Heading */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* 2-Column Mobile Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:active {
  transform: scale(0.99);
}

.product-thumb-wrap {
  position: relative;
  aspect-ratio: 3 / 3.6;
  background: var(--bg-stone);
  overflow: hidden;
  cursor: pointer;
}

.product-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(248, 245, 241, 0.92);
  backdrop-filter: blur(6px);
  color: var(--ink-primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(31, 27, 24, 0.08);
}

.card-heart-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
}

.card-heart-btn svg {
  width: 15px;
  height: 15px;
}

.card-heart-btn.saved svg {
  fill: var(--accent-clay);
  stroke: var(--accent-clay);
}

.product-card-body {
  padding: 11px 11px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mini-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
}

.mini-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(31, 27, 24, 0.14);
}

.mini-swatch-more {
  font-size: 10.5px;
  color: var(--ink-muted);
}

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 3px;
  cursor: pointer;
}

.product-card-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0 0 8px;
  line-height: 1.3;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.stars-inline {
  color: var(--ink-primary);
  letter-spacing: 0.04em;
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 14px;
  font-weight: 600;
}

.quick-add-btn {
  border: 1px solid var(--ink-primary);
  background: transparent;
  color: var(--ink-primary);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.quick-add-btn:hover {
  background: var(--ink-primary);
  color: #fff;
}

/* Editorial Standards Strip */
.standards-strip {
  margin: 22px 16px 6px;
  padding: 16px;
  background: var(--bg-warm-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.standards-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 8px;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.standards-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.standards-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-clay);
  flex-shrink: 0;
}

/* ==========================================================================
   PRODUCT DETAIL PAGE (PDP)
   ========================================================================== */

.pdp-gallery {
  position: relative;
  background: var(--bg-stone);
  aspect-ratio: 4 / 4.4;
  overflow: hidden;
}

.pdp-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-top-actions {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdp-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(31, 27, 24, 0.08);
  background: rgba(248, 245, 241, 0.9);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
}

.pdp-circle-btn svg {
  width: 18px;
  height: 18px;
}

.pdp-circle-btn.saved svg {
  fill: var(--accent-clay);
  stroke: var(--accent-clay);
}

.pdp-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: rgba(248, 245, 241, 0.78);
  padding: 5px 9px;
  border-radius: var(--radius-pill);
}

.pdp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(31, 27, 24, 0.25);
}

.pdp-dot.active {
  background: var(--ink-primary);
  width: 16px;
  border-radius: 4px;
}

.pdp-section {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.pdp-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pdp-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 4px;
}

.pdp-price {
  font-size: 20px;
  font-weight: 600;
  padding-top: 4px;
}

.pdp-subtitle {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.pdp-rating-link {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.pdp-rating-link u {
  text-underline-offset: 3px;
}

.pdp-desc {
  font-size: 14px;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.55;
}

/* Tactile Shade Selector */
.shade-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.shade-label {
  font-size: 13.5px;
  font-weight: 600;
}

.shade-undertone {
  font-size: 12px;
  color: var(--ink-muted);
}

.shade-desc {
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin: 0 0 13px;
}

.shade-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.swatch-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 3px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.swatch-btn.active {
  border-color: var(--ink-primary);
  transform: scale(1.06);
}

.swatch-fill {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(31, 27, 24, 0.15);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

/* Quantity + Add to Bag Row */
.pdp-cta-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  height: 46px;
  padding: 0 4px;
}

.qty-stepper button {
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  font-size: 17px;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-stepper span {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary {
  background: var(--ink-primary);
  color: #faf7f3;
  border: none;
  border-radius: var(--radius-pill);
  height: 46px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-full {
  width: 100%;
  flex: 1;
}

.text-btn {
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 4px 6px;
}

/* Product Detail Accordions */
.accordion-list {
  border-bottom: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-item summary {
  list-style: none;
  padding: 15px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-plus {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}

.accordion-item[open] .accordion-plus {
  transform: rotate(45deg);
}

.accordion-body {
  padding: 0 16px 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.58;
}

/* ==========================================================================
   AUTHENTIC BEAUTY REVIEWS SECTION (Sephora / Glossier / Rare Beauty Pattern)
   ========================================================================== */

.reviews-section {
  padding: 20px 16px 12px;
}

.reviews-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.review-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}

.rating-big {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
}

.rating-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rating-bar-row {
  display: grid;
  grid-template-columns: 18px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-muted);
}

.rating-track {
  height: 5px;
  border-radius: 3px;
  background: var(--bg-stone);
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: var(--ink-primary);
  border-radius: 3px;
}

.review-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

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

.filter-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}

.filter-pill.active {
  background: var(--ink-primary);
  color: #fff;
  border-color: var(--ink-primary);
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
}

.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.review-author-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.review-author {
  font-size: 13.5px;
  font-weight: 600;
}

.verified-tag {
  font-size: 10.5px;
  color: var(--accent-sage);
  background: rgba(76, 98, 82, 0.09);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.review-date {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.review-stars {
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.review-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}

.review-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-secondary);
  background: var(--bg-warm-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
}

.meta-swatch-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(31, 27, 24, 0.2);
}

.review-body {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.56;
  margin: 0 0 12px;
  user-select: text;
  -webkit-user-select: text;
}

.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f0eae3;
}

.helpful-btn,
.copy-review-btn {
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}

.helpful-btn.voted {
  background: var(--ink-primary);
  color: #fff;
  border-color: var(--ink-primary);
}

.copy-review-btn svg,
.helpful-btn svg {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   BAG & CHECKOUT VIEW (Free Gift Progress + Promo + Gift Note)
   ========================================================================== */

.bag-page {
  padding: 16px;
}

.page-heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 14px;
}

/* Free Gift Progress Bar */
.gift-progress-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  margin-bottom: 14px;
}

.gift-progress-text {
  font-size: 13px;
  margin: 0 0 9px;
  color: var(--ink-primary);
}

.gift-progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-stone);
  overflow: hidden;
}

.gift-progress-fill {
  height: 100%;
  background: var(--accent-espresso);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.gift-unlocked-row {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gift-unlocked-row img {
  width: 40px;
  height: 46px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.gift-unlocked-info {
  flex: 1;
  font-size: 12.5px;
}

.gift-unlocked-info strong {
  display: block;
  font-size: 13px;
}

.gift-free-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-sage);
  background: rgba(76, 98, 82, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* Bag Line Items */
.bag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.bag-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
}

.bag-item-img {
  width: 70px;
  height: 86px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-stone);
}

.bag-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.bag-item-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}

.bag-item-shade {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.remove-item-btn {
  border: none;
  background: none;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}

.bag-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-mini {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  height: 30px;
}

.qty-mini button {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 15px;
}

.qty-mini span {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

/* Promo & Gift Note Cards */
.checkout-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 12px;
}

.checkout-card-title {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.promo-row {
  display: flex;
  gap: 8px;
}

.text-input,
.note-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.text-input:focus,
.note-textarea:focus {
  border-color: var(--ink-primary);
  background: var(--bg-surface);
}

.note-textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.48;
}

.promo-feedback {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-secondary);
}

.gift-note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.gift-note-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Calm SÈVE-styled Note Preview Box (RAM-only decrypted view blends seamlessly) */
.note-preview-box {
  margin-top: 12px;
  padding: 13px 14px;
  background: var(--bg-warm-tint);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.note-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.note-preview-text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-clear-link {
  border: none;
  background: none;
  font-size: 11.5px;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

/* Order Summary */
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin-bottom: 7px;
}

.summary-row.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

/* ==========================================================================
   EXPLORE, SAVED & ACCOUNT VIEWS
   ========================================================================== */

.page-pad {
  padding: 16px;
}

.empty-state {
  text-align: center;
  padding: 46px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 18px;
}

.alert-toggle-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 16px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toggle-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}

.toggle-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* iOS-style Switch */
.ios-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: #d8cfc6;
  transition: background 0.2s ease;
  cursor: pointer;
}

.ios-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.ios-switch input:checked + .ios-slider {
  background: var(--ink-primary);
}

.ios-switch input:checked + .ios-slider::before {
  transform: translateX(20px);
}

.push-status-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-stone);
  border: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SHEETS, MODALS & TOAST
   ========================================================================== */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31, 27, 24, 0.42);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.sheet-backdrop[hidden] {
  display: none;
}

.sheet-panel {
  width: 100%;
  max-width: 436px;
  background: var(--bg-page);
  box-shadow: var(--shadow-sheet);
  max-height: 88dvh;
  overflow-y: auto;
}

.sheet-top {
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  padding: calc(14px + var(--safe-top)) 16px 18px;
}

.sheet-bottom {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 10px 16px calc(22px + var(--safe-bottom));
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  margin: 0 auto 12px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sheet-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}

.search-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.search-bar-row svg {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
}

.search-bar-row input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  outline: none;
}

.search-results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  text-align: left;
}

.search-result-row img {
  width: 46px;
  height: 54px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.field-label input,
.field-label select,
.field-label textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink-primary);
}

.order-confirm-body {
  text-align: center;
  padding: 8px 6px 6px;
}

.order-confirm-body h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
}

.order-confirm-body p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 0 0 18px;
}

/* Toast Pill */
.toast-pill {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 14px);
  transform: translateX(-50%);
  z-index: 80;
  background: var(--ink-primary);
  color: #faf7f3;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 26px rgba(31, 27, 24, 0.22);
  max-width: 90%;
  text-align: center;
  animation: fadeUp 0.18s ease both;
}

.toast-pill[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
