:root {
  --brand: #fa8803;
  --brand-dark: #e07702;
  --brand-light: #fff4e6;
  --navy: #0D1B2A;
  --slate: #3D4A5C;
  --muted: #8E9BAD;
  --bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --border: #EFF2F6;
  --shadow-sm: 0 2px 12px rgba(13, 27, 42, 0.07);
  --shadow-md: 0 8px 32px rgba(13, 27, 42, 0.12);
  --shadow-lg: 0 20px 60px rgba(13, 27, 42, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeSpeed;
}

/* FOUC protection: keep hidden overlays/sheets locked off-screen with no animation until
   first paint settles. JS removes [data-fouc] once interactive so transitions resume. */
[data-fouc="locked"] {
  transform: translateY(120%) !important;
  visibility: hidden !important;
  transition: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

[data-fouc-bg="locked"] {
  opacity: 0 !important;
  transition: none !important;
  pointer-events: none !important;
}

/* ── App Shell ── */
#app {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ── Main App Screen ── */
#main-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Nav — 3-column app bar matching main.html */
.top-nav {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  background: linear-gradient(180deg, #fa8803 0%, rgba(255, 255, 255, 0.95) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
}

.app-bar-left {
  justify-self: start;
  display: flex;
  align-items: center;
}

.app-bar-center {
  justify-self: center;
  white-space: nowrap;
}

.app-bar-right {
  justify-self: end;
  display: flex;
  align-items: center;
}

.top-nav .post-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 99px;
  letter-spacing: .3px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(250, 136, 3,.32);
  transition: transform .15s, box-shadow .15s;
}

.top-nav .post-btn:active {
  transform: scale(.95);
  box-shadow: 0 2px 8px rgba(250, 136, 3,.22);
}

.top-nav .post-btn i {
  font-size: 13px;
}

@media (max-width: 415px) {
  .top-nav {
    padding: 0 8px;
    gap: 6px;
  }
}

/* Search Bar */
.search-wrap {
  padding: 12px 20px 8px;
  background: #fff;
}

.search-inner {
  display: flex;
  align-items: center;
  background: #F3F6FA;
  border-radius: 14px;
  padding: 10px 16px;
  gap: 10px;
}

.search-inner input {
  border: none;
  background: transparent;
  flex: 1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--navy);
  outline: none;
}

.search-inner input::placeholder {
  color: var(--muted);
}

.search-inner .si {
  color: var(--muted);
  font-size: 18px;
}

/* Category Pills */
.category-scroll {
  padding: 14px 20px 8px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #F3F6FA;
  border: 2px solid transparent;
  border-radius: 99px;
  padding: 9px 18px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}

.cat-pill.active {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand-dark);
}

.cat-pill .emoji {
  font-size: 16px;
}

/* Section header */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.section-hdr h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.section-hdr a {
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

/* Featured horizontal scroll */
.featured-scroll {
  display: flex;
  gap: 16px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
  display: none;
}

.feat-card {
  flex-shrink: 0;
  width: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  position: relative;
  background: #111;
  transition: transform .2s;
}

.feat-card:active {
  transform: scale(.97);
}

.feat-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  opacity: .82;
  display: block;
}

.feat-card .feat-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(13, 27, 42, .92) 60%, transparent);
  padding: 18px 14px 14px;
}

.feat-card .feat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 4px 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.feat-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.feat-card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .75);
}

.feat-card .meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 20px 16px;
  margin-bottom: 65px;
}

/* Pagination sentinel — sits under the grid; IntersectionObserver
   loads the next page when this scrolls into view. */
.rec-grid-sentinel,
.rec-grid-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px 90px;
  color: var(--muted);
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .2px;
}
.rec-grid-sentinel[hidden],
.rec-grid-end[hidden] { display: none; }
.rec-grid-end {
  padding-top: 8px;
  color: #B3BCC8;
  font-size: 12px;
}
.rec-loader-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #E2E8F0;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: recLoaderSpin .8s linear infinite;
}
@keyframes recLoaderSpin { to { transform: rotate(360deg); } }

.rec-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}

.rec-card:active {
  transform: scale(.97);
  box-shadow: var(--shadow-md);
}

.rec-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f0f0f0;
  overflow: hidden;
}

.rec-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.rec-card:hover .thumb img {
  transform: scale(1.05);
}

.rec-card .thumb .like-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, .92);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: all .2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.rec-card .thumb .like-btn.liked {
  color: #FF4D6D;
}

.rec-card .thumb .time-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(13, 27, 42, .75);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 9px;
  backdrop-filter: blur(4px);
}

.rec-card .info {
  padding: 10px 10px 12px;
}

.rec-card .info h5 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-card .info .stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rec-card .info .cal {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.rec-card .info .saves {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

@media (max-width: 767px) {

  /* --- Bottom Nav Styling --- */
  .bottom-nav {
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
    height: 65px;
    /* Fixed height for better touch targets */
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9990;
  }

  /* 3D bottom navigation. */

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #a0a0a0;
    /* Neutral gray for inactive text */
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    border: none;
  }

  /* Professional 3D bottom navigation. */

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888888;
    /* Professional neutral gray for inactive text */
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    border: none;
    overflow: hidden;
    /* Keeps ripple effects clean */
  }

  /* 1. Inactive state: 3D premium gold. */
  .bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* 🔥 MAKE BOLD: Adds a 0.5px stroke to physically thicken the icon */
    -webkit-text-stroke: 0.5px rgba(255, 140, 0, 0.5);

    /* Glossy Gold/Orange Gradient Fill */
    background: linear-gradient(135deg, #ffdf40 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* 3D Depth Shadows (Bottom extrusion + Top highlight) */
    filter: drop-shadow(0px 3px 2px rgba(255, 140, 0, 0.35)) drop-shadow(0px -1px 1px rgba(255, 255, 255, 0.9));
  }

  /* 2. Tactile "press" animation. */
  .bottom-nav-item:active i {
    /* Pushes the icon down into the screen */
    transform: scale(0.9) translateY(2px);
    /* Shrinks the shadow to mimic physical pressing */
    filter: drop-shadow(0px 1px 1px rgba(255, 140, 0, 0.5));
  }

  /* 3. Active state: 3D premium emerald. */
  .bottom-nav-item.active {
    color: #00a85a;
    /* Green label text */
    font-weight: 700;
    /* Bolder text when active */
  }

  .bottom-nav-item.active i {
    /* Glossy Emerald Green Gradient Fill */
    background: linear-gradient(135deg, #28c76f 0%, #00753e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* 🔥 MAKE BOLD: Thickens the active icon with a dark green stroke */
    -webkit-text-stroke: 0.5px rgba(0, 117, 62, 0.6);

    /* Deeper Green 3D Drop Shadow */
    filter: drop-shadow(0px 5px 4px rgba(0, 117, 62, 0.4)) drop-shadow(0px -1px 1px rgba(255, 255, 255, 0.9));

    /* Triggers the 3D Pop Keyframe */
    animation: iconPop3D 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  }

  /* 4. Active "pop" 3D keyframe animation. */
  @keyframes iconPop3D {
    0% {
      transform: translateY(0) scale(1);
    }

    50% {
      transform: translateY(-6px) scale(1.25);
    }

    100% {
      transform: translateY(-2px) scale(1.1);
    }

    /* Rests slightly lifted off screen */
  }
}

/* --- DESKTOP HEADER (Min Width 768px) --- */
@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

/* ── Offcanvas / Recipe List Panel ── */
.offcanvas-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 680px;
  height: 100vh;
  background: #ffffff;
  z-index: 500;
  transition: right .35s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 32px rgba(13, 27, 42, .10);
}

.offcanvas-panel.open {
  right: 0;
}

/* Header */
.oc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 16px;
  background: #ffffff;
  border-bottom: 1px solid #EFF2F6;
}

.oc-back {
  background: #F3F6FA;
  border: none;
  cursor: pointer;
  color: var(--navy);
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}

.oc-back:hover {
  background: #e8eef6;
}

.oc-back:active {
  transform: scale(.92);
}

.oc-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  line-height: 1.2;
}

.oc-filter-btn {
  background: #F3F6FA;
  border: none;
  cursor: pointer;
  color: var(--slate);
  font-size: 17px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.oc-filter-btn:hover {
  background: #e8eef6;
}

/* Body */
.oc-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 80px;
  background: #ffffff;
  scrollbar-width: none;
}

.oc-body::-webkit-scrollbar {
  display: none;
}

/* Recipe cards */
.oc-recipe-card {
  display: flex;
  gap: 14px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background .18s;
  border-bottom: 1px solid #EFF2F6;
}

.oc-recipe-card:hover {
  background: #F8FAFB;
}

.oc-recipe-card:active {
  background: #EFF2F6;
}

.oc-recipe-card .oc-thumb {
  width: 96px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #F3F6FA;
}

.oc-recipe-card .oc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.oc-recipe-card .oc-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.oc-recipe-card h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oc-recipe-card .oc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.oc-recipe-card .oc-cal {
  margin-top: auto;
  font-size: 11px;
  color: var(--brand);
  font-weight: 700;
}

.oc-recipe-card .oc-heart {
  align-self: center;
  color: #CBD5E1;
  font-size: 16px;
  margin-left: auto;
  flex-shrink: 0;
  transition: color .2s;
}

.oc-recipe-card:hover .oc-heart {
  color: #FDA4AF;
}

/* Ad banner */
.oc-ad-banner {
  margin: 4px 16px 10px;
  background: #F8FAFB;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #EFF2F6;
}

.oc-ad-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #FFF0E6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.oc-ad-text {
  flex: 1;
}

.oc-ad-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  display: block;
}

.oc-ad-text span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.oc-install-btn {
  background: #1A6EFF;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .2s;
}

.oc-install-btn:hover {
  filter: brightness(1.1);
}

/* ── Overlay bg ── */
.overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.overlay-bg.show {
  opacity: 1;
  pointer-events: all;
}

/* Recipe detail — full-screen redesign. */

.detail-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  visibility: hidden;
  width: 100%;
  max-width: 680px;
  height: 100%;
  height: 100dvh;
  z-index: 700;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  transition: transform .42s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear .42s;
}

/* On mobile the bottom-nav (z-index 9990, height 65px) sits above the overlay; trim the
   overlay's height so the CTA bar lands flush on top of the nav instead of being covered. */
@media (max-width: 767px) {
  .detail-overlay {
    height: calc(100% - 65px);
    height: calc(100dvh - 65px);
  }
}

.detail-overlay.open {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  transition: transform .42s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear 0s;
  will-change: transform;
}

/* ── Cinematic Hero ── */
.det-hero {
  position: relative;
  width: 100%;
  height: 32vh;
  min-height: 190px;
  flex-shrink: 0;
  overflow: hidden;
}

.det-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform 1s cubic-bezier(.25, .46, .45, .94);
}

.detail-overlay.open .det-hero-img {
  transform: scale(1);
}

/* Scrim fades to white at the bottom so content blends seamlessly */
.det-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(10, 13, 17, .42) 0%,
      transparent 30%,
      transparent 52%,
      rgba(255, 255, 255, .72) 80%,
      rgba(255, 255, 255, 1) 100%);
}

/* Subtle noise grain */
.det-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
}

/* Top bar floating over hero */
.det-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0;
}

.det-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 13, 17, .52);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  transition: background .2s, transform .15s;
}

.det-icon-btn:active {
  transform: scale(.9);
}

.det-icon-btn.saved {
  color: #FF4D6D;
  background: rgba(255, 77, 109, .18);
  border-color: rgba(255, 77, 109, .3);
}

.det-topbar-actions {
  display: flex;
  gap: 10px;
}

/* Category chip on hero */
.det-cat-chip {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(250, 136, 3,.18);
  border: 1px solid rgba(250, 136, 3,.4);
  backdrop-filter: blur(12px);
  color: #ffb347;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 5px 14px;
  white-space: nowrap;
}

/* Hero bottom content */
.det-hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 22px 22px;
}

.det-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.det-stars {
  color: #FFB800;
  font-size: 11px;
  letter-spacing: 1px;
}

.det-rating-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.det-rating-count {
  font-size: 11px;
  color: var(--muted);
}

.det-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.22;
  margin-bottom: 10px;
}

.det-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.det-tag {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(13, 27, 42, .1);
  backdrop-filter: blur(8px);
  color: var(--slate);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 99px;
  padding: 4px 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.det-tag i {
  font-size: 11px;
  color: var(--brand);
}

/* ── Stats Strip ── */
.det-stats-strip {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.det-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 5px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}

.det-stat:active {
  background: var(--brand-light);
}

.det-stat+.det-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}

.det-stat .stat-icon,
.det-stat .det-stat-icon {
  font-size: 13px;
  margin-bottom: 2px;
  color: var(--brand);
}

.det-stat .stat-val,
.det-stat .det-stat-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.det-stat .stat-lbl,
.det-stat .det-stat-lbl {
  font-size: 8px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 1px;
}

/* ── Quick Action Row ── */
.det-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Subtle dim while live-translation requests are in flight. */
.det-scroll-body.is-translating .ing-text,
.det-scroll-body.is-translating .step-text {
  opacity: .55;
  transition: opacity .15s;
}

.det-action-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #F3F6FA;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}

.det-action-pill i {
  font-size: 14px;
}

.det-action-pill:active {
  background: #e8eef6;
}

.det-action-pill.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 18px rgba(250, 136, 3,.3);
}

.det-action-pill.primary:active {
  background: var(--brand-dark);
}

.det-action-pill {
  position: relative;
  cursor: pointer;
}

/* Save pill: persistent "saved" indicator, distinct from .primary (the transient
   last-clicked highlight) so both can coexist without visual conflict. */
#savePill.saved {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(250, 136, 3,.32);
}
#savePill.saved:active {
  background: var(--brand-dark);
}
#savePill.saved .bi {
  color: #ffffff;
}
#savePill.is-pulsing .bi {
  animation: savePillPop .42s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes savePillPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Language dropdown — fixed to viewport so overflow:auto cannot clip it */
.lang-dropdown {
  position: fixed;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(13, 27, 42, .18), 0 2px 10px rgba(13, 27, 42, .08);
  border: 1px solid var(--border);
  min-width: 176px;
  z-index: 99999;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeUp .18s ease both;
}

.lang-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--caret-left, 50%);
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #fff;
  pointer-events: none;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: background .15s;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.lang-btn:hover {
  background: #F3F6FA;
}

.lang-btn:active {
  background: #e8eef6;
  transform: scale(.97);
}

.lang-btn.active {
  background: var(--brand-light, #fff4e6);
  color: var(--brand);
  font-weight: 700;
}

.lang-btn .lang-tick {
  color: var(--brand);
  font-size: 13px;
  opacity: 0;
  transition: opacity .15s;
}

.lang-btn.active .lang-tick {
  opacity: 1;
}

/* ── Scrollable body ── */
.det-scroll-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  background: #ffffff;
}

.det-scroll-body::-webkit-scrollbar {
  display: none;
}

/* ── Tab Bar ── */
.det-tabs {
  display: flex;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.det-tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color .2s;
  letter-spacing: .3px;
}

.det-tab.active {
  color: var(--navy);
}

.det-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: var(--brand);
  border-radius: 99px;
}

/* ── Tab Panels ── */
.det-panel {
  display: none;
}

.det-panel.active {
  display: block;
}

/* Ingredients panel */
.ing-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.ing-list-header h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.ing-count-badge {
  background: var(--brand-light);
  border: 1px solid rgba(250, 136, 3,.25);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
}

.ing-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.ing-row:active {
  background: var(--brand-light);
}

.ing-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F3F6FA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  flex-shrink: 0;
}

.ing-text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
  line-height: 1.4;
}

.ing-add {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 1.5px solid rgba(250, 136, 3,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}

.ing-add:active {
  background: rgba(250, 136, 3,.25);
  transform: scale(.9);
}

/* Steps panel */
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.step-header h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.step-count-badge {
  background: #F3F6FA;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border);
}

.step-row {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  position: relative;
}

.step-row+.step-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 34px;
  width: 1px;
  height: 16px;
  background: var(--border);
}

.step-num-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(250, 136, 3,.28);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  padding-top: 5px;
}

.step-text {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.65;
}

/* Nutrition panel */
.nutrition-panel {
  padding: 18px 20px 40px;
}

.nutrition-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}

.nut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.nut-card {
  background: #F8FAFB;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.nut-card .nut-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.nut-card .nut-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.nut-card .nut-unit {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.nut-card .nut-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.nut-bar-row {
  margin-bottom: 12px;
}

.nut-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--slate);
  font-weight: 500;
  margin-bottom: 5px;
}

.nut-bar-track {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.nut-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #ffd68a);
  transition: width 1s cubic-bezier(.4, 0, .2, 1);
}

/* Video Panel */
.video-panel {
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-panel-header {
  margin-bottom: 14px;
}

.video-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #FF0000, #CC0000);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 5px 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(255, 0, 0, .28);
}

.video-panel-badge i {
  font-size: 13px;
}

.video-panel-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

.video-embed-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  position: relative;
}

.video-embed-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.video-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.video-meta-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F3F6FA;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: background .2s;
}

.video-meta-chip:active {
  background: #e8eef6;
}

.video-meta-chip i {
  font-size: 13px;
  color: var(--brand);
}

/* Reviews bottom sheet (ambient backdrop + slide-up sheet) sits above the bottom-nav
   (z-index 9990) so it covers the viewport while open, restoring the nav on close. */
.rv-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9991;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.rv-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .28s ease, visibility 0s linear 0s;
}

.rv-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  visibility: hidden;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  max-height: 90dvh;
  z-index: 9992;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -20px 60px rgba(2, 6, 23, .25);
  display: flex;
  flex-direction: column;
  transition: transform .38s cubic-bezier(.32, .72, 0, 1),
              visibility 0s linear .38s;
  overscroll-behavior: contain;
}
.rv-sheet.open {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  transition: transform .38s cubic-bezier(.32, .72, 0, 1),
              visibility 0s linear 0s;
}

.rv-handle {
  width: 44px;
  height: 4px;
  background: #E2E8F0;
  border-radius: 99px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.rv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rv-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.rv-title {
  font: 800 17px/1.2 'Inter', system-ui, sans-serif;
  color: var(--navy);
  margin: 0;
}
.rv-sub {
  font: 600 11.5px/1 'Inter', system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: .2px;
}
.rv-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #F3F6FA;
  color: var(--slate);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.rv-close:active { background: #E2E8F0; transform: scale(.94); }

.rv-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
  scrollbar-width: none;
}
.rv-body::-webkit-scrollbar { display: none; }

/* ── Summary card ── */
.rv-summary {
  display: grid;
  grid-template-columns: minmax(96px, 30%) 1fr;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fff9f0 0%, #fff4e6 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 16px;
}
.rv-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-right: 12px;
  border-right: 1px dashed #CBD5E1;
}
.rv-score {
  font: 900 32px/1 'Inter', system-ui, sans-serif;
  color: var(--navy);
  letter-spacing: -1px;
}
.rv-score-stars {
  font-size: 13px;
  letter-spacing: 1px;
  color: #FBBF24;
}
.rv-score-stars .star-empty { color: #E2E8F0; }
.rv-score-count {
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  color: var(--muted);
  margin-top: 2px;
}
.rv-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.rv-bar-row {
  display: grid;
  grid-template-columns: 14px 1fr 28px;
  align-items: center;
  gap: 8px;
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  color: var(--slate);
}
.rv-bar-track {
  height: 6px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}
.rv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
  border-radius: 99px;
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.rv-bar-count { text-align: right; color: var(--muted); }

/* ── Composer card ── */
.rv-compose-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(2, 6, 23, .04);
}
.rv-compose-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rv-compose-prompt-text {
  font: 700 13.5px/1.3 'Inter', system-ui, sans-serif;
  color: var(--navy);
}
.rv-compose-prompt-text small {
  display: block;
  font: 500 11.5px/1 'Inter', system-ui, sans-serif;
  color: var(--muted);
  margin-top: 4px;
}
.rv-cta-write {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 10px 18px;
  font: 700 12.5px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(250, 136, 3,.28);
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.rv-cta-write:active { background: var(--brand-dark); transform: scale(.97); }

.rv-compose-form { display: flex; flex-direction: column; gap: 12px; }
.rv-compose-label {
  font: 700 11.5px/1 'Inter', system-ui, sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.rv-star-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 32px;
  line-height: 1;
  user-select: none;
}
.rv-star-picker .rv-star {
  cursor: pointer;
  color: #E2E8F0;
  transition: color .15s, transform .12s;
}
.rv-star-picker .rv-star.active { color: #FBBF24; }
.rv-star-picker .rv-star:active { transform: scale(1.15); }
.rv-star-hint {
  font: 600 12.5px/1 'Inter', system-ui, sans-serif;
  color: var(--navy);
  margin-left: 6px;
}
.rv-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: 500 13.5px/1.45 'Inter', system-ui, sans-serif;
  color: var(--navy);
  resize: vertical;
  background: #FAFBFC;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}
.rv-textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #ffffff;
}
.rv-compose-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.rv-btn {
  padding: 10px 18px;
  border-radius: 99px;
  font: 700 12.5px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s, opacity .15s;
}
.rv-btn-secondary {
  background: #F3F6FA;
  color: var(--slate);
}
.rv-btn-secondary:active { background: #E2E8F0; transform: scale(.97); }
.rv-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(250, 136, 3,.28);
}
.rv-btn-primary:active { background: var(--brand-dark); transform: scale(.97); }
.rv-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}
.rv-btn .rv-btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rvSpin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes rvSpin { to { transform: rotate(360deg); } }

/* ── Review list ── */
.rv-list { display: flex; flex-direction: column; gap: 12px; }
.rv-loading,
.rv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--muted);
  font: 600 13px/1.4 'Inter', system-ui, sans-serif;
  text-align: center;
}
.rv-empty i { font-size: 32px; color: #CBD5E1; }
.rv-empty p { margin: 0; }
.rv-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid #E2E8F0;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: rvSpin .8s linear infinite;
}

.rv-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  transition: border-color .15s;
}
.rv-item.is-mine {
  border-color: rgba(250, 136, 3,.35);
  background: linear-gradient(180deg, #fff9f0 0%, #ffffff 100%);
}
.rv-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fa8803, #e07702);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 14px/1 'Inter', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.rv-item-body { flex: 1; min-width: 0; }
.rv-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.rv-item-name {
  font: 700 13.5px/1 'Inter', system-ui, sans-serif;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv-mine-chip {
  font: 700 9.5px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 3px 7px;
  border-radius: 99px;
}
.rv-item-date {
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  color: var(--muted);
  white-space: nowrap;
}
.rv-item-stars {
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #FBBF24;
  margin-bottom: 6px;
}
.rv-item-stars .star-empty { color: #E2E8F0; }
.rv-item-comment {
  font: 500 13.5px/1.5 'Inter', system-ui, sans-serif;
  color: var(--slate);
  margin: 0;
  word-wrap: break-word;
}
.rv-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.rv-action-btn {
  background: transparent;
  border: none;
  padding: 4px 8px;
  font: 700 11px/1 'Inter', system-ui, sans-serif;
  color: var(--slate);
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rv-action-btn:active { background: #F3F6FA; }
.rv-action-btn.danger { color: #E11D48; }
.rv-action-btn.danger:active { background: #FEE2E2; }

/* FOUC suppression */
.rv-backdrop[data-fouc="locked"],
.rv-sheet[data-fouc="locked"] {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Opening entrance animation: staggered reveal of top nav/search/category chrome on load,
   plus cascading fade-up for recipe cards as each is inserted. */
@keyframes rbEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.top-nav        { animation: rbEnter .45s cubic-bezier(.22,.61,.36,1) both; }
.search-wrap     { animation: rbEnter .45s cubic-bezier(.22,.61,.36,1) .07s both; }
.category-scroll { animation: rbEnter .45s cubic-bezier(.22,.61,.36,1) .14s both; }
#recipeGrid > *  { animation: rbEnter .4s cubic-bezier(.22,.61,.36,1) both; }
#recipeGrid > *:nth-child(1) { animation-delay: .18s; }
#recipeGrid > *:nth-child(2) { animation-delay: .21s; }
#recipeGrid > *:nth-child(3) { animation-delay: .24s; }
#recipeGrid > *:nth-child(4) { animation-delay: .27s; }
#recipeGrid > *:nth-child(5) { animation-delay: .30s; }
#recipeGrid > *:nth-child(6) { animation-delay: .33s; }

@media (prefers-reduced-motion: reduce) {
  .top-nav, .search-wrap, .category-scroll, #recipeGrid > * { animation: none; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Post recipe dialog. */
.post-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, .72);
  backdrop-filter: blur(6px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.post-overlay-bg.show {
  opacity: 1;
  pointer-events: all;
}

.post-dialog {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  visibility: hidden;
  width: 100%;
  max-width: 680px;
  height: 100%;
  height: 100dvh;
  z-index: 950;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
  /* visibility delay matches slide duration so it hides only after close animation ends */
  transition: transform .44s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear .44s;
}

.post-dialog.open {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  /* on open: show immediately, promote layer only while animating */
  transition: transform .44s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear 0s;
  will-change: transform;
}

.pd-header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(249, 125, 9, 0.281) 0%, rgba(255, 255, 255, 1) 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pd-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F3F6FA;
  border: 1px solid var(--border);
  color: var(--slate);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}

.pd-close-btn:hover {
  background: #E8EDF4;
}

.pd-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pd-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(250, 136, 3,.15);
  border: 1px solid rgba(250, 136, 3,.3);
  color: #fa8803;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  border-radius: 99px;
  padding: 3px 10px;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.pd-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
  margin: 0;
}

.pd-submit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fa8803, #e07702);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 99px;
  letter-spacing: .3px;
  box-shadow: 0 4px 16px rgba(250, 136, 3,.35);
  transition: transform .15s, box-shadow .15s;
}

.pd-submit-btn:active {
  transform: scale(.95);
}

.pd-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.pd-body::-webkit-scrollbar {
  display: none;
}

/* Upload zone */
.pd-upload-zone {
  position: relative;
  width: 100%;
  height: 200px;
  background: #F3F6FA;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: background .2s;
}

.pd-upload-zone:active {
  background: #E8EDF4;
}

.pd-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  position: relative;
  transition: opacity .2s;
}

.pd-upload-icon-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(250, 136, 3,.12);
  border: 2px dashed rgba(250, 136, 3,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fa8803;
  animation: pulseRing 2.4s ease infinite;
}

@keyframes pulseRing {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(250, 136, 3,.3);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(250, 136, 3,0);
  }
}

.pd-upload-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.pd-upload-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.pd-image-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 1;
}

.pd-image-preview.visible {
  display: block;
}

.pd-upload-change {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 4;
  background: rgba(10, 13, 20, .8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pd-upload-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 13, 20, .68);
  border: 1.5px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
  transition: background .18s, transform .15s;
}

.pd-upload-clear:hover {
  background: rgba(239, 68, 68, .82);
  border-color: rgba(239, 68, 68, .5);
}

.pd-upload-clear:active {
  transform: scale(.88);
}

/* Form body */
.pd-form {
  padding: 20px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pd-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 9px;
}

.pd-required {
  color: #FF4D6D;
}

.pd-field-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pd-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.pd-section-label .pd-label {
  margin-bottom: 0;
}

.pd-add-row-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(250, 136, 3,.12);
  border: 1px solid rgba(250, 136, 3,.25);
  color: #fa8803;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .2s;
}

.pd-add-row-btn:active {
  background: rgba(250, 136, 3,.22);
}

.pd-add-row-btn i {
  font-size: 13px;
}

.pd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  isolation: isolate;
}

.pd-field-icon {
  position: absolute;
  inset-inline-start: 9px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(250, 136, 3, .16);
  border-radius: 10px;
  background: linear-gradient(145deg, #fff8ed, #ffecd4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 5px rgba(150, 80, 0, .06);
  font-size: 16px;
  line-height: 1;
  color: #b85b00;
  pointer-events: none;
  transition: background .2s, border-color .2s, box-shadow .2s, color .2s;
}

.pd-field-icon::before {
  display: block;
  line-height: 1;
}

.pd-field-icon.bi-youtube {
  color: #d62828;
  background: linear-gradient(145deg, #fff5f5, #ffe4e4);
  border-color: rgba(214, 40, 40, .16);
}

.pd-input-wrap:focus-within .pd-field-icon {
  border-color: rgba(250, 136, 3, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 3px rgba(250, 136, 3, .08);
}

.pd-input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #FFFFFF, #F6F8FB);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px 13px 52px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}

.pd-input::placeholder {
  color: var(--muted);
}

.pd-input:focus {
  border-color: rgba(250, 136, 3,.5);
  background: rgba(250, 136, 3,.04);
  box-shadow: 0 0 0 3px rgba(250, 136, 3,.1);
}

.pd-select {
  cursor: pointer;
}

.pd-select option {
  background: #FFFFFF;
  color: var(--navy);
}

.pd-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Category chips */
.pd-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pd-cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  appearance: none;
  background: linear-gradient(160deg, #FFFFFF, #F3F6FA);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 6px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--slate);
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}

.pd-cat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(250, 136, 3, .14);
  border-radius: 12px;
  background: linear-gradient(145deg, #fffaf2, #ffecd4);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(150, 80, 0, .06);
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.pd-cat-label {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pd-cat-chip:focus-visible {
  outline: 3px solid rgba(250, 136, 3, .5);
  outline-offset: 2px;
}

@media (hover: hover) {
  .pd-cat-chip:hover {
    border-color: rgba(250, 136, 3, .45);
    box-shadow: 0 4px 12px rgba(150, 80, 0, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-cat-chip {
    transition: none;
  }
}

.pd-cat-chip.active {
  background: rgba(250, 136, 3,.1);
  border-color: rgba(250, 136, 3,.5);
  color: var(--brand-dark);
}

/* Ingredients */
.pd-ing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pd-ing-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(250, 136, 3,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fa8803;
  flex-shrink: 0;
}

.pd-ing-input {
  flex: 1;
  background: #F3F6FA;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  color: var(--navy);
  outline: none;
  transition: border-color .2s;
}

.pd-ing-input::placeholder {
  color: var(--muted);
}

.pd-ing-input:focus {
  border-color: rgba(250, 136, 3,.45);
}

/* Ingredient suggest trigger button */
.pd-ing-suggest-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-light);
  border: 1.5px solid rgba(250, 136, 3,.3);
  color: var(--brand-dark);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}

.pd-ing-suggest-btn:hover {
  background: rgba(250, 136, 3,.2);
  border-color: rgba(250, 136, 3,.5);
}

.pd-ing-suggest-btn:active {
  transform: scale(.9);
}

.pd-ing-suggest-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.pd-ing-suggest-btn.has-selection {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(250, 136, 3,.35);
}

.pd-ing-suggest-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  background: #FF4D6D;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid #fff;
}

.pd-ing-suggest-btn.has-selection .pd-ing-suggest-count {
  display: flex;
}

/* Product suggest bottom sheet.
   Both layers sit ABOVE the mobile bottom-nav (z-index 9990), matching the
   reviews sheet (.rv-backdrop 9991 / .rv-sheet 9992) further down this file.
   At 1000/1050 they sat below it, and because the nav and the sheet's footer are
   both pinned to the bottom of the viewport they overlapped at EVERY height:
   elementFromPoint() over "Apply Selection" returned the nav, so the sheet's
   only confirming action could not be tapped on a phone — and since the recipe
   form refuses to submit until every ingredient has 3 linked products, that was
   a dead end for the whole form. The raised backdrop also stops the nav being
   tapped straight through the scrim and navigating away mid-selection. */
.sug-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, .55);
  backdrop-filter: blur(4px);
  z-index: 9991;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}

.sug-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.sug-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 680px;
  height: 58vh;
  max-height: 640px;
  min-height: 320px;
  z-index: 9992;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(13, 27, 42, .18);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  overflow: hidden;
  transition: transform .38s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear .38s;
}

.sug-sheet.open {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  transition: transform .38s cubic-bezier(.32, .72, 0, 1),
    visibility 0s linear 0s;
  will-change: transform;
}

.sug-handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  flex-shrink: 0;
}

.sug-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #DDE3EC;
}

.sug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 18px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.sug-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sug-header-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--brand);
  text-transform: uppercase;
}

.sug-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}

.sug-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F6FA;
  border: 1px solid var(--border);
  color: var(--slate);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}

.sug-close-btn:hover {
  background: #E8EDF4;
}

.sug-close-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.sug-search-wrap {
  position: relative;
  margin: 12px 16px 8px;
  flex-shrink: 0;
}

.sug-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.sug-search-input {
  width: 100%;
  background: #F3F6FA;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px 11px 38px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}

.sug-search-input:focus {
  border-color: rgba(250, 136, 3,.5);
  background: #fff;
}

.sug-search-input::placeholder {
  color: var(--muted);
}

.sug-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(33% - 7px), 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  scroll-snap-type: y proximity;
  scroll-padding-top: 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sug-grid::-webkit-scrollbar {
  width: 4px;
}

.sug-grid::-webkit-scrollbar-track {
  background: transparent;
}

.sug-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

.sug-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: block;
  cursor: pointer;
  position: relative;
  scroll-snap-align: start;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}

.sug-card:hover {
  border-color: rgba(250, 136, 3,.3);
  box-shadow: 0 4px 16px rgba(250, 136, 3,.1);
}

.sug-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.sug-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(250, 136, 3,.18), 0 4px 16px rgba(250, 136, 3,.15);
}

.sug-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}

.sug-card.selected .sug-card-badge {
  opacity: 1;
  transform: scale(1);
}

.sug-card-img-wrap {
  width: 100%;
  height: 110px;
  background: #F4F7FB;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.sug-card-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.sug-card-body {
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sug-card-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  /* Width-aware truncation, and the only truncation: _cardHtml() renders the
     full title (the `title` attribute carries it too). Without this the name was
     hard-clipped mid-letter — visible on a 108px card at 360px width. */
  text-overflow: ellipsis;
}

.sug-card-rating {
  font-size: 10px;
  font-weight: 700;
  color: #F59E0B;
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.sug-card-rating-val {
  color: var(--slate);
  font-weight: 500;
  font-size: 9.5px;
}

.sug-card-cat {
  font-size: 9px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-light);
  border-radius: 99px;
  padding: 2px 7px;
  display: inline-block;
  width: fit-content;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sug-card-add-btn {
  width: 100%;
  margin-top: 3px;
  background: var(--brand-light);
  border: 1.5px solid rgba(250, 136, 3,.35);
  color: var(--brand-dark);
  border-radius: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  padding: 5px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, color .2s, box-shadow .15s;
  line-height: 1;
}

.sug-card-add-btn:hover {
  background: rgba(250, 136, 3,.18);
  border-color: rgba(250, 136, 3,.6);
}

.sug-card.selected .sug-card-add-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(250, 136, 3,.28);
}

.sug-add-icon {
  display: block;
}

.sug-chk-icon {
  display: none;
}

.sug-card.selected .sug-add-icon {
  display: none;
}

.sug-card.selected .sug-chk-icon {
  display: block;
}

.sug-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
}

.sug-empty-icon {
  font-size: 30px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sug-empty-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.sug-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}

.sug-apply-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 24px rgba(250, 136, 3,.28);
  transition: transform .15s, box-shadow .15s;
}

.sug-apply-btn:active {
  transform: scale(.98);
  box-shadow: 0 3px 12px rgba(250, 136, 3,.2);
}

.sug-apply-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Skeleton loading cards */
@keyframes sugPulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .45
  }
}

.sug-skeleton {
  pointer-events: none;
  animation: sugPulse 1.4s ease-in-out infinite;
}

.sug-skel-img {
  width: 100%;
  height: 110px;
  background: #EFF2F6;
}

.sug-skel-line {
  background: #EFF2F6;
  border-radius: 5px;
  margin-bottom: 5px;
}

.sug-skel-nm {
  height: 10px;
  width: 90%;
}

.sug-skel-nm2 {
  height: 10px;
  width: 65%;
}

.sug-skel-ct {
  height: 8px;
  width: 55%;
}

.sug-skel-btn {
  height: 26px;
  width: 100%;
  border-radius: 8px;
  margin-top: 2px;
}

/* Infinite-scroll sentinel (invisible, triggers IntersectionObserver) */
.sug-sentinel {
  grid-column: 1 / -1;
  height: 1px;
}

/* Load-more animated dots */
.sug-load-more {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 0 6px;
}

.sug-load-more-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sug-load-more-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: sugDotPulse 1.2s ease-in-out infinite;
}

.sug-load-more-dots span:nth-child(2) {
  animation-delay: .2s;
}

.sug-load-more-dots span:nth-child(3) {
  animation-delay: .4s;
}

@keyframes sugDotPulse {

  0%,
  80%,
  100% {
    transform: scale(.65);
    opacity: .45;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Difficulty custom select. */
.pd-diff-select {
  position: relative;
  width: 100%;
}

/* Trigger button — visually matches .pd-input */
.pd-diff-trigger {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #FFFFFF, #F6F8FB);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px 13px 52px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition: border-color .22s, background .22s, box-shadow .22s, border-radius .22s;
  -webkit-appearance: none;
  appearance: none;
}

.pd-diff-trigger:focus {
  border-color: rgba(250, 136, 3,.5);
  background: rgba(250, 136, 3,.04);
  box-shadow: 0 0 0 3px rgba(250, 136, 3,.1);
}

.pd-diff-select.open .pd-diff-trigger {
  border-color: rgba(250, 136, 3,.5);
  background: rgba(250, 136, 3,.04);
  box-shadow: 0 0 0 3px rgba(250, 136, 3,.1);
  border-radius: 12px 12px 0 0;
  border-bottom-color: transparent;
}

/* Placeholder text */
.pd-diff-ph {
  color: var(--muted);
}

/* Chevron */
.pd-diff-caret {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), color .22s;
}

.pd-diff-caret::before {
  display: block;
  line-height: 1;
}

@media (max-width: 380px) {
  .pd-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-field-icon,
  .pd-diff-caret {
    transition: none;
  }
}

.pd-diff-select.open .pd-diff-caret {
  transform: rotate(180deg);
  color: var(--brand);
}

/* Dropdown panel (in-flow; expands below trigger) */
.pd-diff-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  border: 1.5px solid rgba(250, 136, 3,.28);
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(13, 27, 42, .12), 0 2px 8px rgba(250, 136, 3,.07);
  transition: max-height .28s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}

.pd-diff-select.open .pd-diff-panel {
  max-height: 260px;
  opacity: 1;
  pointer-events: all;
}

/* Options */
.pd-diff-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}

.pd-diff-opt:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.pd-diff-opt:hover {
  background: #F8FAFB;
}

.pd-diff-opt:active {
  background: var(--brand-light);
}

.pd-diff-opt.selected {
  background: var(--brand-light);
}

.pd-diff-opt:focus {
  outline: none;
  background: #F3F6FA;
}

/* Color dot */
.pd-diff-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Option text block */
.pd-diff-opt-body {
  flex: 1;
  min-width: 0;
}

.pd-diff-opt-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.pd-diff-opt-hint {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
}

/* Checkmark */
.pd-diff-tick {
  font-size: 15px;
  color: var(--brand);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(.45);
  transition: opacity .18s, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}

.pd-diff-opt.selected .pd-diff-tick {
  opacity: 1;
  transform: scale(1);
}


.pd-ing-del {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 77, 109, .1);
  border: 1px solid rgba(255, 77, 109, .2);
  color: #FF4D6D;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}

.pd-ing-del:hover {
  background: rgba(255, 77, 109, .2);
}

/* Steps */
.pd-step-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.pd-step-row .pd-ing-del {
  align-self: center;
}

.pd-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fa8803, #e07702);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 3px 10px rgba(250, 136, 3,.3);
}

.pd-step-input {
  flex: 1;
  background: #F3F6FA;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  color: var(--navy);
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color .2s;
}

.pd-step-input::placeholder {
  color: var(--muted);
}

.pd-step-input:focus {
  border-color: rgba(250, 136, 3,.45);
}

/* Notes textarea */
.pd-textarea-wrap {
  position: relative;
}

.pd-textarea {
  width: 100%;
  background: #F3F6FA;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--navy);
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .2s;
}

.pd-textarea::placeholder {
  color: var(--muted);
}

.pd-textarea:focus {
  border-color: rgba(250, 136, 3,.45);
}

/* Publish bar */
.pd-publish-bar {
  display: flex;
  align-items: center;
  margin-top: 8px;
  min-height: 50px;
  margin-bottom: 50px;
}

.pd-submit-btn {
  flex: 1;
  background: linear-gradient(135deg, #fa8803, #e07702);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(250, 136, 3,.35);
  transition: transform .15s, box-shadow .15s;
}

.pd-submit-btn:active {
  transform: scale(.98);
  box-shadow: 0 4px 16px rgba(250, 136, 3,.25);
}


/* ── Success Toast ── */
.success-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  z-index: 9999;
  transform: translateX(-50%) translateY(20px);
  background: #0D2B22;
  border: 1px solid rgba(250, 136, 3,.4);
  border-radius: 99px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fa8803;
  opacity: 0;
  pointer-events: none;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3), 0 0 0 1px rgba(250, 136, 3,.2);
  white-space: nowrap;
}

.success-toast.show {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── Validation Error Toast ── */
.error-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  z-index: 10000;
  transform: translateX(-50%) translateY(20px);
  background: #1E0A0A;
  border: 1px solid rgba(239, 68, 68, .45);
  border-radius: 99px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #EF4444;
  opacity: 0;
  pointer-events: none;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(239, 68, 68, .18);
  white-space: nowrap;
  max-width: 92vw;
}
.error-toast.show {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── Field invalid state ── */
.pd-input.pd-invalid,
.pd-ing-input.pd-invalid,
.pd-step-input.pd-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .18) !important;
}
.pd-cat-grid.pd-invalid {
  outline: 2px solid rgba(239, 68, 68, .7);
  outline-offset: 4px;
  border-radius: 12px;
}
#pdIngredientsList.pd-invalid,
#pdStepsList.pd-invalid {
  border-radius: 12px;
  outline: 2px solid rgba(239, 68, 68, .5);
  outline-offset: 4px;
}

@keyframes pdShake {
  0%, 100% { transform: translateX(0); }
  18%       { transform: translateX(-7px); }
  36%       { transform: translateX(7px); }
  54%       { transform: translateX(-4px); }
  72%       { transform: translateX(4px); }
}
.pd-shake { animation: pdShake .42s ease; }

/* ── Numeric-only rejection flash ── */
@keyframes pdNumReject {
  0%   { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.22); }
  100% { border-color: var(--border); box-shadow: none; }
}
.pd-numeric-reject {
  animation: pdNumReject .35s ease forwards;
}

/* ── Suggest button: insufficient suggestions state ── */
.pd-ing-suggest-btn.sug-warn {
  background: rgba(245, 158, 11, .15);
  border-color: rgba(245, 158, 11, .55);
  color: #D97706;
}
.pd-ing-suggest-btn.sug-warn .pd-ing-suggest-count {
  display: flex;
  background: #F59E0B;
}
.pd-ing-suggest-btn.sug-ok {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(250,136,3,.35);
}
.pd-ing-suggest-btn.sug-ok .pd-ing-suggest-count {
  display: flex;
  background: #fa8803;
}

/* ── Per-ingredient suggestion inline hint ── */
.pd-ing-sug-hint {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px 3px;
  border-radius: 6px;
  margin-top: 3px;
  display: block;
  pointer-events: none;
}
.pd-ing-sug-hint.warn  { color: #D97706; background: rgba(245,158,11,.1); }
.pd-ing-sug-hint.ok    { color: #c96a00; background: rgba(250,136,3,.1); }
.pd-ing-sug-hint.error { color: #EF4444; background: rgba(239,68,68,.08); }

/* ── FAB cart button (recipe-blog — fixed positioning, main_style.css not loaded) ── */
.fab-cart-btn {
  position: fixed;
  bottom: 70px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e08938 0%, #F97D09 100%);
  color: #fff;
  border: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(240,130,40,.45);
  z-index: 9500;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.175,.885,.32,1.275), box-shadow .2s;
  animation: rbFabIn .3s cubic-bezier(.175,.885,.32,1.275) both;
}
.fab-cart-btn:active { transform: scale(.9); box-shadow: 0 4px 10px rgba(240,130,40,.5); }
@keyframes rbFabIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Badge */
.fab-cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ff3b30;
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 50px;
  border: 2px solid #fff;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}

/* Animated gradient icon */
.colorful-basket {
  background: linear-gradient(135deg, #fff 0%, #ebedee 55%, #c3cfe2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: basketPulse 2s infinite ease-in-out;
}
@keyframes basketPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.14); }
}

/* Ingredient product suggestion panel. */

/* Active state for the + button */
.ing-add.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(250,136,3,.35);
}

/* Collapsible wrapper */
.ing-prod-collapse {
  overflow: hidden;
  max-height: 0;
  transition: max-height .32s cubic-bezier(.4,0,.2,1);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.ing-prod-collapse.open { max-height: 320px; }

/* Horizontal scroll strip */
.ing-prod-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  align-items: stretch;
}
.ing-prod-scroll::-webkit-scrollbar { display: none; }

/* Exactly 3 cards per visible row at every screen size */
.ip-col {
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

/* ── Product card (mirrors .product-card-design from main_style.css) ── */
.ip-card {
  position: relative;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 5px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.ip-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.07); border-color: #e2e8f0; }

/* Wishlist stub */
.ip-wl-btn {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  border: 1px solid #f1f5f9;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
  padding: 0;
  opacity: .5; cursor: default;
}

/* Discount / status badge */
.ip-badge {
  position: absolute; top: 0; left: 0;
  font-size: .58rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 6px; color: #fff;
  z-index: 10; border-radius: 11px 0 8px 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,.1);
  overflow: hidden;
}
.ip-badge::after {
  content: ''; position: absolute;
  top: -20%; left: -60%;
  width: 35%; height: 160%;
  background: linear-gradient(90deg,transparent 0%,rgba(255,255,255,.5) 50%,transparent 100%);
  transform: skewX(-18deg);
  animation: ipBadgeShine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ipBadgeShine {
  0%   { left:-60%;opacity:0; }
  8%   { opacity:1; }
  38%  { left:130%;opacity:.7; }
  39%,100% { left:130%;opacity:0; }
}
.ip-badge-red  { background: #ef4444; }
.ip-badge-sec  { background: #94a3b8; }
.ip-badge-success { background: #22c55e; }
.ip-badge-info { background: #3b82f6; }
.ip-badge-warning { background: #f59e0b; }
.ip-badge-primary { background: #00A859; }

/* Options overlay pill */
.ip-var-badge {
  position: absolute; bottom: 4px; right: 4px;
  z-index: 10; padding: 3px 6px;
  font-size: .58rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .3px;
  border-radius: 6px;
  background: rgba(255,255,255,.95);
  color: #00A859; border: 1px solid #bbf7d0;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* Image wrapper — square with product-image treatment */
.ip-img-wrap {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px; padding: 2px;
  overflow: hidden;
}
.ip-img-link {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.ip-img-wrap img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Product title */
.ip-title {
  font-size: .68rem; font-weight: 700;
  color: #0f172a; margin-bottom: 2px;
  line-height: 1.2; text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;`n            line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.4em;
}

/* Stars */
.ip-rating {
  display: flex; align-items: center; justify-content: center;
  gap: 1px; margin-bottom: 2px; font-size: 7px;
}
.ip-rating .bi-star-fill, .ip-rating .bi-star-half { color: #F59E0B; }
.ip-rating .bi-star { color: #e2e8f0; }
.ip-rc { color: #94a3b8; font-weight: 700; margin-left: 2px; font-size: 7px; }

/* Pricing */
.ip-price-wrap {
  display: flex; align-items: baseline;
  justify-content: center; gap: 4px;
  margin-bottom: 4px;
}
.ip-price-cur { font-size: .8rem; font-weight: 800; color: #0f172a; letter-spacing: -.2px; }
.ip-price-old { font-size: .6rem; font-weight: 500; color: #94a3b8; text-decoration: line-through; }

/* Add-to-cart button */
.ip-btn-add {
  width: 100%; border-radius: 999px; font-weight: 700;
  font-size: .68rem; padding: 4px 0;
  background: #fff; color: #00A859;
  border: 1.5px solid #00A859;
  cursor: pointer; transition: background .15s, color .15s;
}
.ip-btn-add:hover { background: #f0fdf4; }

/* Qty stepper */
.ip-qty-ctrl {
  width: 100%; height: 26px; border-radius: 999px;
  background: #00A859; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1px;
}
.ip-qty-btn {
  width: 24px; height: 24px;
  background: transparent; border: none;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; padding: 0;
  transition: background .12s;
  font-size: .7rem;
}
.ip-qty-btn:hover { background: rgba(255,255,255,.2); }
.ip-qty-val { font-size: .75rem; font-weight: 700; min-width: 16px; text-align: center; }

/* Out-of-stock / Options buttons */
.ip-btn-oos {
  width: 100%; border-radius: 999px; font-size: .68rem;
  font-weight: 700; padding: 4px 0;
  background: #f1f5f9; color: #94a3b8;
  border: 1px solid #e2e8f0; cursor: not-allowed;
}
.ip-btn-opts {
  display: block; width: 100%; border-radius: 999px;
  font-size: .68rem; font-weight: 700; padding: 4px 0;
  background: #f0fdf4; color: #00A859;
  border: 1.5px solid #bbf7d0;
  text-align: center; text-decoration: none;
  transition: background .15s;
}
.ip-btn-opts:hover { background: #dcfce7; }

/* ── Shimmer skeleton ── */
.ip-skel-card {
  background: #fff; border: 1px solid #f1f5f9;
  border-radius: 12px; padding: 6px; overflow: hidden;
}
.ip-skel-img {
  width: 100%; aspect-ratio: 1/1; border-radius: 7px;
  margin-bottom: 4px;
  background: linear-gradient(90deg,#f0f4f8 25%,#e2e8f0 50%,#f0f4f8 75%);
  background-size: 200% 100%;
  animation: ipShimmer 1.4s ease infinite;
}
.ip-skel-line {
  height: 10px; border-radius: 5px; margin-bottom: 5px;
  background: linear-gradient(90deg,#f0f4f8 25%,#e2e8f0 50%,#f0f4f8 75%);
  background-size: 200% 100%;
  animation: ipShimmer 1.4s ease infinite;
}
.ip-sl-w80 { width: 80%; margin-inline: auto; }
.ip-sl-w55 { width: 55%; margin-inline: auto; }
.ip-sl-w90 { width: 90%; }
@keyframes ipShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty / error state ── */
.ip-empty {
  flex: 0 0 100%; padding: 24px 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 6px;
}
.ip-empty-ic { font-size: 26px; opacity: .35; }
.ip-empty-msg { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ── Cart toast ── */
.ip-cart-toast {
  position: fixed; bottom: 76px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #0f172a; color: #fff;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 12px;
  white-space: nowrap; z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  max-width: calc(100vw - 32px);
  overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.ip-cart-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
