/* ═══════════════════════════════════════════════
   BROWSE PAGE — Occasion cards, Build Bag, Aisles
   ═══════════════════════════════════════════════ */

/* ── Page layout ── */
.browse-content {
  padding: 16px 16px 110px;
}

/* ── Section headers ── */
.browse-section-head {
  margin: 4px 0 14px;
}

.browse-section-head--mid {
  margin-top: 36px;
}

.browse-eyebrow {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.browse-section-head h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 26px;
  letter-spacing: -1.6px;
  line-height: .96;
  text-transform: uppercase;
  color: var(--ink);
}

/* ── Occasion Stack ── */
.occasion-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Hero occasion card */
.occasion-hero {
  position: relative;
  width: 100%;
  min-height: 230px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: 0 14px 32px rgba(38, 36, 24, .18);
}

[dir="rtl"] .occasion-hero {
  text-align: right;
}

.occasion-hero:active { transform: scale(.985); }
.occasion-hero:hover  { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(38, 36, 24, .24); }

.occasion-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
}

.occasion-hero:hover .occasion-hero-img {
  transform: scale(1.04);
}

/* Only a light vignette at very bottom to anchor text — image stays visible */
.occasion-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 6, 4, .58) 100%);
}

.occasion-hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px;
  height: 100%;
  min-height: 230px;
  justify-content: flex-end;
  color: white;
}

[dir="rtl"] .occasion-hero-body {
  align-items: flex-end;
}

.occasion-badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.occasion-hero-body h3 {
  margin: 2px 0 0;
  font-family: "Outfit", sans-serif;
  font-size: 30px;
  letter-spacing: -1.5px;
  line-height: .95;
  text-transform: uppercase;
}

.occasion-hero-body p {
  margin: 2px 0 0;
  max-width: 220px;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  line-height: 1.4;
}

.occasion-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(5, 4, 2, .16);
}

.occasion-cta,
.occasion-browse-cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: background .2s ease;
  border: 1px solid rgba(255, 255, 255, .24);
}

.occasion-hero:hover .occasion-browse-cta {
  background: rgba(255, 255, 255, .26);
}

/* Actions row: browse ghost pill + green order button */
.occasion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Green WhatsApp order button — hero size */
.occasion-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #25D366;
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.occasion-order-btn:hover {
  background: #1ebe59;
  transform: scale(1.04);
}

/* Compact order button for small cards */
.occasion-order-btn--sm {
  margin-top: 5px;
  padding: 5px 10px;
  font-size: 10px;
  background: #25D366;
}

/* Pair of smaller cards */
.occasion-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.occasion-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border: 0;
  border-radius: 22px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 22px rgba(38, 36, 24, .14);
  text-align: left;
}

[dir="rtl"] .occasion-card { text-align: right; }

.occasion-card:active { transform: scale(.97); }
.occasion-card:hover  { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(38, 36, 24, .2); }

.occasion-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}

.occasion-card:hover .occasion-card-img { transform: scale(1.06); }

/* Full uniform dark scrim over the whole image */
.occasion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 2, .52);
  pointer-events: none;
  z-index: 1;
}

.occasion-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px 12px;
  background: transparent;
  color: white;
}

[dir="rtl"] .occasion-card-body { align-items: flex-end; }

.occasion-card-body .occasion-badge {
  font-size: 8px;
  padding: 3px 7px;
}

.occasion-card--gather  .occasion-card-body .occasion-badge { background: var(--green); color: white; }
.occasion-card--tea     .occasion-card-body .occasion-badge { background: var(--orange); color: white; }
.occasion-card--coffee  .occasion-card-body .occasion-badge { background: #c8a06a; color: var(--ink); }
.occasion-card--party   .occasion-card-body .occasion-badge { background: var(--red); color: white; }
.occasion-card--fitness .occasion-card-body .occasion-badge { background: var(--green); color: white; }

.occasion-badge--dark {
  background: var(--ink) !important;
  color: var(--yellow) !important;
}

/* Shorter hero variant for secondary wide cards */
.occasion-hero--short {
  min-height: 178px;
}

.occasion-hero--short .occasion-hero-body {
  min-height: 178px;
}

.occasion-hero--short .occasion-hero-body h3 {
  font-size: 24px;
}

.occasion-card-body strong {
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  letter-spacing: -.8px;
  line-height: 1;
  text-transform: uppercase;
}

.occasion-card-body small {
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
}

.occasion-card-body .occasion-price {
  padding: 4px 8px;
  font-size: 10px;
}

/* ── Build Your Bag ── */
.build-card {
  position: relative;
  width: 100%;
  min-height: 196px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 14px 32px rgba(38, 36, 24, .18);
  transition: transform .22s ease, box-shadow .22s ease;
}

[dir="rtl"] .build-card { text-align: right; }

.build-card:active { transform: scale(.985); }
.build-card:hover  { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(38, 36, 24, .24); }

.build-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
}

.build-card:hover .build-card-img { transform: scale(1.04); }

.build-card-overlay {
  position: absolute;
  inset: 0;
  /* Light tinted vignette — keeps image visible, anchors text */
  background: linear-gradient(180deg, transparent 30%, rgba(18, 62, 30, .72) 100%);
}

.build-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px;
  min-height: 196px;
  justify-content: flex-end;
  color: white;
}

[dir="rtl"] .build-card-body { align-items: flex-end; }

.build-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.build-step {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, .76);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.build-sep {
  color: rgba(255, 255, 255, .38);
  font-size: 11px;
}

.build-card-body h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 30px;
  letter-spacing: -1.5px;
  line-height: .95;
  text-transform: uppercase;
}

.build-card-body p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  line-height: 1.35;
}

.build-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  transition: background .2s ease, transform .2s ease;
}

.build-cta b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-size: 14px;
  line-height: 1;
}

.build-card:hover .build-cta {
  background: #f8d660;
  transform: scale(1.03);
}

/* ── Aisle Grid ── */
.aisle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.aisle-tile {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  border: 0;
  border-radius: 22px;
  cursor: pointer;
  background: #efe5d3;
  box-shadow: 0 8px 20px rgba(38, 36, 24, .12);
  transition: transform .2s ease, box-shadow .2s ease;
  text-align: left;
  color: var(--ink);
}

[dir="rtl"] .aisle-tile { text-align: right; }

.aisle-tile:active { transform: scale(.97); }
.aisle-tile:hover  { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(38, 36, 24, .18); }

.aisle-tile-img {
  position: absolute;
  inset: 0 0 32px;
  width: 100%;
  height: calc(100% - 32px);
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}

.aisle-tile:hover .aisle-tile-img { transform: scale(1.06); }

.aisle-tile-fade {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(180deg, transparent, #efe5d3);
  pointer-events: none;
}

/* When active, fade matches active background */
.aisle-tile.active .aisle-tile-fade {
  background: linear-gradient(180deg, transparent, #263d2a);
}

.aisle-tile-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 7px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.aisle-tile-name {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
}

.aisle-tile-count {
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

/* Active aisle tile */
.aisle-tile.active {
  background: #263d2a;
  box-shadow: 0 12px 24px rgba(28, 58, 35, .24);
}

.aisle-tile.active .aisle-tile-name {
  color: #fffaf0;
}

.aisle-tile.active .aisle-tile-count {
  color: rgba(255, 250, 240, .62);
}

/* Featured (big) tile — spans full width */
.aisle-tile--featured {
  grid-column: 1 / -1;
  min-height: 120px;
  display: flex;
  align-items: stretch;
}

.aisle-tile--featured .aisle-tile-img {
  inset: 0 0 40px;
  height: calc(100% - 40px);
}

.aisle-tile--featured .aisle-tile-body {
  padding: 9px 14px 12px;
}

.aisle-tile--featured .aisle-tile-name {
  font-size: 14px;
}

/* ── Cart hint in browse ── */
.browse-cart-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* ── Kurdish RTL adjustments ── */
:root[lang="ckb"] .browse-section-head h2,
:root[lang="ckb"] .occasion-hero-body h3,
:root[lang="ckb"] .occasion-card-body strong,
:root[lang="ckb"] .build-card-body h3 {
  font-family: "Vazirmatn", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.12;
}

:root[lang="ckb"] .browse-eyebrow,
:root[lang="ckb"] .occasion-badge,
:root[lang="ckb"] .build-step,
:root[lang="ckb"] .build-cta,
:root[lang="ckb"] .occasion-cta {
  letter-spacing: 0;
  text-transform: none;
}

:root[lang="ckb"] .aisle-tile-name {
  font-family: "Vazirmatn", sans-serif;
}

/* ── Entrance animations ── */
.occasion-hero,
.occasion-card,
.build-card,
.aisle-tile {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .42s ease, transform .42s ease, box-shadow .22s ease;
}

.browse-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of aisle-grid */
.aisle-grid .aisle-tile:nth-child(1)  { transition-delay: .04s; }
.aisle-grid .aisle-tile:nth-child(2)  { transition-delay: .08s; }
.aisle-grid .aisle-tile:nth-child(3)  { transition-delay: .12s; }
.aisle-grid .aisle-tile:nth-child(4)  { transition-delay: .16s; }
.aisle-grid .aisle-tile:nth-child(5)  { transition-delay: .20s; }
.aisle-grid .aisle-tile:nth-child(6)  { transition-delay: .24s; }
.aisle-grid .aisle-tile:nth-child(7)  { transition-delay: .28s; }
.aisle-grid .aisle-tile:nth-child(8)  { transition-delay: .32s; }
.aisle-grid .aisle-tile:nth-child(9)  { transition-delay: .36s; }
.aisle-grid .aisle-tile:nth-child(10) { transition-delay: .40s; }

/* Pair stagger */
.occasion-pair .occasion-card:first-child { transition-delay: .06s; }
.occasion-pair .occasion-card:last-child  { transition-delay: .12s; }

/* ── Offer sheet ── */
.offer-sheet-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 16px;
  margin: 4px 0 12px;
  display: block;
}

.offer-sheet-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.offer-package-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(165, 72, 56, .14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 249, 239, .98), rgba(250, 239, 221, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.offer-package-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offer-package-copy span,
.offer-qty-block > span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.offer-package-copy strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
}

.offer-package-copy .offer-package-price {
  color: var(--red);
  font-size: 17px;
}

.offer-package-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(165, 72, 56, .12);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.offer-qty-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(222, 214, 199, .95);
  border-radius: 18px;
  background: rgba(255, 252, 245, .92);
}

.offer-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.offer-qty-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease;
}

.offer-qty-btn:active {
  transform: scale(.94);
}

.offer-qty-value {
  min-width: 28px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.offer-note {
  margin: 0 0 16px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ── Category product list ── */
.cat-product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 60vh;
}

.cat-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #f0e8d8);
  cursor: pointer;
  transition: background .15s ease;
}

.cat-product-row:last-child { border-bottom: none; }

.cat-product-row:active { background: var(--surface, #fffaf2); }

.cat-product-row-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #efe8d8;
}

.cat-product-row-info {
  flex: 1;
  min-width: 0;
}

.cat-product-row-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-product-row-price {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cat-product-row-add {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: white;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease, background .15s ease;
}

.cat-product-row-add:active { transform: scale(.9); }

/* ── Quick-add amount area ── */
.quick-amount-area {
  padding: 12px 0;
}

.quick-amount-area .budget-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.quick-amount-area .budget-chip {
  flex: 1;
  min-width: 56px;
  padding: 9px 4px;
  border-radius: 12px;
  border: 2px solid var(--border, #e8e0d0);
  background: var(--surface, #fffaf2);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .18s ease;
  font-family: "Manrope", sans-serif;
  text-align: center;
}

.quick-amount-area .budget-chip.active {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.quick-amount-area input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--border, #e8e0d0);
  font-size: 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  background: var(--surface, #fffaf2);
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color .18s ease;
}

.quick-amount-area input[type="number"]:focus { border-color: var(--red); }

/* ══════════════════════════════════════════════════
   RESPONSIVE: Browse page — compact phones (≤ 360px)
   ══════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .browse-content { padding-inline: 12px; }

  .browse-section-head h2 { font-size: 22px; letter-spacing: -1.2px; }

  .occasion-hero { min-height: 198px; }
  .occasion-hero-body { min-height: 198px; }
  .occasion-hero-body h3 { font-size: 24px; letter-spacing: -1.2px; }
  .occasion-hero-body p  { font-size: 11px; }
  .occasion-hero--short { min-height: 158px; }
  .occasion-hero--short .occasion-hero-body { min-height: 158px; }
  .occasion-hero--short .occasion-hero-body h3 { font-size: 20px; }

  .occasion-card { min-height: 142px; }
  .occasion-card-body strong { font-size: 14px; }

  .build-card-body h3 { font-size: 24px; }

  .aisle-tile { min-height: 126px; }
  .aisle-tile-name { font-size: 11px; }
  .aisle-tile-count { font-size: 8px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE: Browse page — mid phones (361px–390px)
   ══════════════════════════════════════════════════ */
@media (min-width: 361px) and (max-width: 390px) {
  .browse-section-head h2 { font-size: 24px; }
  .occasion-hero { min-height: 210px; }
  .occasion-hero-body { min-height: 210px; }
  .occasion-hero-body h3 { font-size: 27px; }
  .aisle-tile { min-height: 136px; }
}
