/* Freshhouse Subscription Menu page */

.fh-sm-page {
  min-height: 100vh;
  background: hsl(210 40% 98%);
}

.fh-sm-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e6ede9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.fh-sm-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fh-sm-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #3f9367;
  text-decoration: none;
}
.fh-sm-back:hover { color: #2d6e4f; }
.fh-sm-nav-logo { height: 34px; width: auto; }
.fh-sm-nav-cta {
  background: hsl(var(--primary));
  color: #fff !important;
  border-radius: 100px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  transition: background 0.2s;
}
.fh-sm-nav-cta:hover {
  background: hsl(var(--primary-dark));
  color: #fff !important;
}

.fh-sm-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.fh-sm-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #111;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
}
.fh-sm-header p {
  margin: 6px 0 0;
  font-size: 16px;
  color: #888;
}

.fh-sm-selectors-wrap {
  background: #fff;
  border-bottom: 1px solid #e6ede9;
  margin-top: 24px;
}
.fh-sm-selectors {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fh-sm-week-tabs,
.fh-sm-plan-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.fh-sm-tab {
  padding: 9px 24px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  background: transparent;
  color: #3f9367;
  transition: all 0.15s;
}
.fh-sm-tab.is-active {
  background: #3f9367;
  color: #fff;
}

.fh-sm-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.fh-sm-day {
  margin-bottom: 36px;
}
.fh-sm-day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.fh-sm-day-name {
  font-size: 17px;
  font-weight: 700;
  color: #3f9367;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.fh-sm-day-line {
  flex: 1;
  height: 1px;
  background: #dde8e2;
}

.fh-sm-meals-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.fh-sm-meals-row::-webkit-scrollbar { display: none; }

.fh-sm-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e6ede9;
  box-shadow: 0 2px 10px rgba(63, 147, 103, 0.07);
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.fh-sm-card:hover {
  transform: translateY(-2px);
  border-color: #b6d9c5;
  box-shadow: 0 8px 24px rgba(63, 147, 103, 0.14);
}
.fh-sm-card-img-wrap {
  background: hsl(149 40% 96%);
  position: relative;
  height: 150px;
  overflow: hidden;
}
.fh-sm-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.fh-sm-card:hover .fh-sm-card-img-wrap img {
  transform: scale(1.04);
}
.fh-sm-card-img-wrap img[src*="logo-bottom"] {
  object-fit: contain;
  padding: 1.25rem;
  background: #f4f4f1;
}
.fh-sm-meal-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #3f9367;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
}
.fh-sm-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.fh-sm-card-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
}
.fh-sm-macros {
  display: flex;
  align-items: center;
}
.fh-sm-macro {
  flex: 1;
  text-align: center;
}
.fh-sm-macro + .fh-sm-macro {
  border-left: 1px solid #dde8e2;
}
.fh-sm-macro-label {
  font-size: 8px;
  font-weight: 800;
  color: #3f9367;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.fh-sm-macro-val {
  font-size: 14px;
  font-weight: 800;
  color: #111;
}
.fh-sm-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf3ef;
}
.fh-sm-cal-label {
  font-size: 8px;
  font-weight: 800;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1px;
}
.fh-sm-cal-val {
  font-size: 18px;
  font-weight: 800;
  color: #111;
  line-height: 1;
}
.fh-sm-cal-val span {
  font-size: 11px;
  font-weight: 500;
  color: #999;
}
.fh-sm-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid #edf3ef;
}
.fh-sm-allergen {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #666;
  background: #f3f3f1;
  border: 1px solid #e4e4e0;
  border-radius: 100px;
  padding: 2px 8px;
  white-space: nowrap;
}
.fh-sm-allergen img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.fh-sm-empty {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 24px;
  text-align: center;
  color: #888;
  font-size: 16px;
}

.fh-sm-week-nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.fh-sm-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid #e6ede9;
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(63, 147, 103, 0.1);
}
.fh-sm-week-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1.5px solid #d4e8dc;
  background: hsl(var(--primary-light));
  color: #3f9367;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.fh-sm-week-nav-btn:hover:not(:disabled) {
  background: #3f9367;
  border-color: #3f9367;
  color: #fff;
}
.fh-sm-week-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.fh-sm-week-nav-center {
  text-align: center;
  flex: 1;
  min-width: 0;
}
.fh-sm-week-nav-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 2px;
}
.fh-sm-week-nav-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
}
.fh-sm-week-nav-counter {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3f9367;
  margin-top: 2px;
}

.freshhouse-vibrant-theme[dir="rtl"] .fh-sm-week-nav-btn svg {
  transform: scaleX(-1);
}

/* ── Item detail modal ── */
.fh-sm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fh-sm-modal.is-open {
  display: flex;
}
.fh-sm-modal-dialog {
  background: #fff;
  border-radius: 28px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  max-height: 90vh;
}
.fh-sm-modal-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 90vh;
}
.fh-sm-modal-img-wrap {
  position: relative;
  background: hsl(149 40% 96%);
  min-height: 280px;
  overflow: hidden;
}
.fh-sm-modal-img-wrap img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.fh-sm-modal-img-wrap img[src*="logo-bottom"] {
  object-fit: contain;
  padding: 2.5rem;
  background: #f4f4f1;
}
.fh-sm-meal-badge--modal {
  top: 16px;
  left: 16px;
  font-size: 10px;
  padding: 5px 12px;
}
.fh-sm-modal-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fh-sm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.fh-sm-modal-title {
  margin: 0;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #111;
  font-family: 'Outfit', sans-serif;
  line-height: 1.25;
}
.fh-sm-modal-close {
  background: #f3f3f1;
  border: none;
  border-radius: 100px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.fh-sm-modal-desc {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.fh-sm-macros--modal {
  background: #f8fbf9;
  border: 1px solid #e6ede9;
  border-radius: 16px;
  padding: 16px 8px;
}
.fh-sm-macros--modal .fh-sm-macro-label {
  font-size: 10px;
}
.fh-sm-macros--modal .fh-sm-macro-val {
  font-size: 20px;
}
.fh-sm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf3ef;
}
.fh-sm-modal-footer .fh-sm-cal-label {
  font-size: 10px;
}
.fh-sm-modal-footer .fh-sm-cal-val {
  font-size: 28px;
}
.fh-sm-modal-footer .fh-sm-cal-val span {
  font-size: 14px;
}
.fh-sm-modal-footer svg {
  width: 72px;
  height: 72px;
}
.fh-sm-modal-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.fh-sm-modal-allergens .fh-sm-allergen {
  font-size: 11px;
  padding: 4px 10px;
}
.fh-sm-modal-allergens .fh-sm-allergens {
  border-top: none;
  padding-top: 0;
}

@media (max-width: 768px) {
  .fh-sm-selectors {
    flex-direction: column;
    align-items: stretch;
  }
  .fh-sm-week-tabs,
  .fh-sm-plan-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .fh-sm-week-tabs::-webkit-scrollbar,
  .fh-sm-plan-tabs::-webkit-scrollbar { display: none; }
  .fh-sm-card {
    min-width: 160px;
  }
  .fh-sm-week-nav {
    flex-direction: column;
    padding: 20px 16px;
    gap: 14px;
  }
  .fh-sm-week-nav-btn {
    width: 100%;
    justify-content: center;
  }
  .fh-sm-week-nav-btn span {
    display: inline;
  }
  .fh-sm-week-nav-center {
    order: -1;
  }
  .fh-sm-modal { padding: 12px; }
  .fh-sm-modal-dialog { border-radius: 20px; }
  .fh-sm-modal-img-wrap,
  .fh-sm-modal-img-wrap img {
    min-height: 220px;
  }
  .fh-sm-modal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .fh-sm-modal-allergens {
    justify-content: flex-start;
    width: 100%;
  }
}
