/* ============================================
   PACKS.CSS — Raheq Bio
   Covers: packs.html page + index.html packs strip
   ============================================ */

/* ── Savings Strip ── */
.packs-savings-strip {
  background: linear-gradient(135deg, var(--olive), var(--olive-dark));
  padding: 14px 20px;
}

.savings-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.savings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.92rem;
  font-weight: 600;
}

.savings-item strong { color: var(--gold-light); font-size: 1rem; }
.savings-icon        { font-size: 1.1rem; }
.savings-sep         { color: rgba(255, 255, 255, 0.3); font-size: 1.2rem; }

/* ── Loading Skeletons ── */
.packs-loading { padding: 20px 0; }

.packs-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.pack-skeleton {
  height: 440px;
  border-radius: var(--radius-xl);
  background: var(--cream-dark);
  position: relative;
  overflow: hidden;
}

/* FIX: Shimmer keyframe name aligns with single canonical definition in animations.css */
.pack-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* ── Empty State ── */
.packs-empty {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* FIX: Removed duplicate .empty-state-icon — already defined in style.css.
   Only override what differs here (opacity). */
.packs-empty .empty-state-icon {
  opacity: 0.5;
  margin-bottom: 8px;
}

/* ── Packs Grid ── */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ── Pack Card ── */
.pack-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 2px solid rgba(212, 175, 55, 0.15);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.pack-card.visible {
  opacity: 1;
  transform: translateY(0);
  /* FIX: transition preserved so entrance animation completes smoothly */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* FIX: Removed !important from hover — it was overriding the entrance animation
   mid-flight. Now uses specificity naturally; visible state uses a short
   transition so hover still works after card has appeared. */
.pack-card.visible:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 175, 55, 0.4);
  z-index: 2;
  transition: var(--transition);
}

.pack-card--featured {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.18);
}

.pack-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--olive));
  z-index: 2;
}

/* ── Featured Ribbon ── */
/* FIX: Unified ribbon using inset-inline-end and logical rotation.
   RTL default: ribbon sits on the right shoulder.
   LTR (lang-fr): ribbon sits on the right shoulder (same visual convention). */
.pack-featured-ribbon {
  position: absolute;
  top: 18px;
  inset-inline-end: -32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--umber);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 44px;
  z-index: 3;
  box-shadow: var(--shadow-sm);
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
  /* FIX: direction-specific rotation handled by separate rules below */
}

/* RTL (default): ribbon rotates clockwise to sit on the top-right corner */
body[dir="rtl"] .pack-featured-ribbon {
  transform: rotate(45deg);
  transform-origin: center;
}

/* LTF: ribbon also sits top-right, same visual — no change needed */
body.lang-fr .pack-featured-ribbon {
  inset-inline-end: -32px;
  inset-inline-start: auto;
  transform: rotate(45deg);
  transform-origin: center;
}

.pack-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Card Visual ── */
.pack-card-visual {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pack-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pack-card.visible:hover .pack-card-img { transform: scale(1.15); }

.pack-card-placeholder {
  font-size: 3rem;
  letter-spacing: 8px;
  opacity: 0.75;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.25));
  transition: transform 0.4s ease;
}

.pack-card.visible:hover .pack-card-placeholder { transform: scale(1.1); }

/* ── Badges ── */
/* FIX: Replaced left/right with inset-inline-start; removed redundant body[dir] overrides */
.pack-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.3px;
  z-index: 2;
  white-space: nowrap;
}

/* FIX: Removed body[dir="rtl"] and body.lang-fr overrides — inset-inline-start handles both */

.pack-badge-gold  {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--umber);
}

.pack-badge-olive {
  background: linear-gradient(135deg, var(--olive), var(--olive-dark));
  color: white;
}

.pack-badge-umber {
  background: linear-gradient(135deg, var(--umber), var(--umber-light));
  color: var(--gold);
}

/* Savings tag on visual */
/* FIX: Replaced right/left with inset-inline-end; removed redundant body[dir] override */
.pack-savings-tag {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 14px;
  background: #e74c3c;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  font-family: 'Lato', sans-serif;
  z-index: 2;
}

/* FIX: Removed body[dir="rtl"] and body.lang-fr overrides — inset-inline-end handles both */

/* ── Card Body ── */
.pack-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.pack-card-name {
  font-family: 'Scheherazade New', serif;
  font-size: 1.25rem;
  color: var(--umber);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

body.lang-fr .pack-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

.pack-card-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Product Tags ── */
.pack-products-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pack-products-label {
  font-size: 0.78rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
}

.pack-products-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pack-product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-xl);
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--text-mid);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Price Row ── */
.pack-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
  margin-top: auto;
}

.pack-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pack-price {
  font-family: 'Lato', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.pack-price small {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 400;
}

.pack-original-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
  font-family: 'Lato', sans-serif;
}

/* ── Card Actions ── */
.pack-card-actions {
  display: flex;
  gap: 10px;
}

.pack-add-btn {
  flex: 1;
  justify-content: center;
  font-size: 0.92rem;
  padding: 11px 16px;
}

/* ============================================
   PACK DETAIL MODAL
   ============================================ */
.modal-pack {
  max-width: 860px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

/* FIX: Modal close uses inset-inline-end so it stays on the correct corner in both
   RTL (top-left visually = inline-start) and LTR (top-right = inline-end).
   Since packs modal is visually positioned at top-right in all layouts, we
   use inset-inline-end and remove the redundant body[dir]/lang-fr overrides. */
.modal-pack .modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 10;
  background: rgba(75, 54, 33, 0.15);
  border: none;
  color: var(--umber);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

/* FIX: Removed body[dir="rtl"] and body.lang-fr overrides — inset-inline-end handles both */

.modal-pack .modal-close:hover {
  background: rgba(75, 54, 33, 0.3);
}

.pack-modal-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  min-height: 500px;
}

/* ── Modal Visual Panel ── */
.pack-modal-visual {
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.pack-modal-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-modal-placeholder {
  font-size: 4.5rem;
  letter-spacing: 10px;
  filter: drop-shadow(0 6px 20px rgba(212, 175, 55, 0.3));
  animation: float 3s ease-in-out infinite;
  text-align: center;
  padding: 20px;
}

.pack-savings-big {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #e74c3c;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  font-family: 'Lato', sans-serif;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

/* ── Modal Info Panel ── */
.pack-modal-info {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  max-height: 80vh;
}

.pack-modal-name {
  font-family: 'Scheherazade New', serif;
  font-size: 1.7rem;
  color: var(--umber);
  line-height: 1.3;
  margin: 0;
}

body.lang-fr .pack-modal-name {
  font-family: 'Playfair Display', serif;
}

.pack-modal-desc {
  color: var(--text-mid);
  font-size: 0.96rem;
  line-height: 1.8;
  margin: 0;
}

/* ── Product Breakdown ── */
.pack-modal-products h4 {
  font-family: 'Scheherazade New', serif;
  font-size: 1rem;
  color: var(--umber);
  margin-bottom: 12px;
}

.pack-modal-product-list {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pack-modal-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-mid);
  padding: 4px 0;
}

.pmpr-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pmpr-icon { font-size: 1.1rem; }
.pmpr-name { font-weight: 600; color: var(--text-dark); }

.pmpr-price {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: var(--text-mid);
}

.pmpr-price small {
  font-size: 0.75rem;
  font-weight: 400;
}

.pack-modal-divider {
  height: 1px;
  background: rgba(212, 175, 55, 0.25);
  margin: 4px 0;
}

.pack-modal-total-row { font-weight: 600; color: var(--text-mid); }

.pmpr-original {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  text-decoration: line-through;
  color: var(--text-light);
}

.pack-modal-savings-row { font-weight: 700; }

.pmpr-saving {
  color: var(--olive);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
}

/* ── Modal Footer ── */
.pack-modal-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.pack-modal-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.pack-modal-price {
  font-family: 'Lato', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.pack-modal-price small {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-light);
}

.pack-modal-original {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--text-light);
  font-family: 'Lato', sans-serif;
}

.pack-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pack-modal-actions .btn {
  width: 100%;
  justify-content: center;
}

/* FIX: Removed duplicate .btn-whatsapp definition — fully defined in style.css.
   Any packs-specific WhatsApp button overrides belong here only if they
   visually differ from the global definition. Currently they do not. */

/* ============================================
   CUSTOM PACK CTA SECTION
   ============================================ */
.custom-pack-section { background: var(--cream-dark); }

.custom-pack-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 48px;
  border: 2px solid rgba(212, 175, 55, 0.2);
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}

.custom-pack-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
  flex-shrink: 0;
}

.custom-pack-text {
  flex: 1;
  min-width: 200px;
}

.custom-pack-text h3 {
  font-family: 'Scheherazade New', serif;
  font-size: 1.4rem;
  color: var(--umber);
  margin-bottom: 6px;
}

body.lang-fr .custom-pack-text h3 {
  font-family: 'Playfair Display', serif;
}

.custom-pack-text p {
  color: var(--text-light);
  font-size: 0.96rem;
  margin: 0;
}

/* ============================================
   INDEX.HTML — PACKS STRIP SECTION
   ============================================ */
.packs-strip-section {
  background: var(--cream-dark);
}

/* Skeleton grid for strip */
.packs-strip-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 0;
}

.strip-pack-skeleton {
  height: 280px;
  border-radius: var(--radius-xl);
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.strip-pack-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* Strip Grid */
.packs-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

/* ── Strip Pack Card ── */
.strip-pack-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(212, 175, 55, 0.15);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.strip-pack-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 175, 55, 0.35);
}

.strip-pack-card--featured {
  border-color: rgba(212, 175, 55, 0.4);
}

.strip-pack-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--olive));
  z-index: 2;
}

/* Strip card visual */
.strip-pack-visual {
  height: 140px;
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.strip-pack-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.strip-pack-card:hover .strip-pack-visual img { transform: scale(1.15); }

.strip-pack-placeholder {
  font-size: 2.8rem;
  letter-spacing: 6px;
  opacity: 0.75;
  filter: drop-shadow(0 3px 8px rgba(212, 175, 55, 0.2));
  transition: transform 0.4s ease;
}

.strip-pack-card:hover .strip-pack-placeholder { transform: scale(1.1); }

/* FIX: Savings tag uses inset-inline-start; removed body[dir="rtl"] override.
   Tag sits on the "start" side of the visual (right in RTL, left in LTR). */
.strip-pack-savings-tag {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  background: #e74c3c;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xl);
  font-family: 'Lato', sans-serif;
  z-index: 2;
}

/* FIX: Removed body[dir="rtl"] override — inset-inline-start handles both directions.
   NOTE: In the original the RTL override moved it to right:10px, which is
   inset-inline-end in LTR. To keep it at the visual "start" (right in RTL),
   inset-inline-start is the correct logical property. */

/* FIX: Added lang-fr restore — LTR mode should place tag at left (inline-start = left) */
body.lang-fr .strip-pack-savings-tag {
  inset-inline-start: 10px;
}

/* Strip card body */
.strip-pack-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.strip-pack-name {
  font-family: 'Scheherazade New', serif;
  font-size: 1.05rem;
  color: var(--umber);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

body.lang-fr .strip-pack-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.93rem;
}

.strip-pack-products {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.strip-pack-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--cream);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-xl);
  padding: 2px 8px;
  font-size: 0.72rem;
  color: var(--text-mid);
  font-weight: 600;
  white-space: nowrap;
}

.strip-pack-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, 0.22);
  margin-top: auto;
  gap: 8px;
}

.strip-pack-price {
  font-family: 'Lato', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.strip-pack-price small {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-light);
}

.strip-pack-original {
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: line-through;
  font-family: 'Lato', sans-serif;
  margin-top: 2px;
}

.strip-pack-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--umber);
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.28);
  flex-shrink: 0;
  line-height: 1;
}

.strip-pack-btn:hover {
  transform: scale(1.14) rotate(8deg);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.42);
}

/* CTA below strip grid */
.packs-strip-cta {
  text-align: center;
}

/* ============================================
   ADMIN — PACKS MANAGEMENT STYLES
   NOTE: These styles apply only within admin.html.
   Consider moving to admin.css if admin panel is
   ever split into a separate stylesheet.
   ============================================ */

/* Stats row */
.packs-admin-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.pack-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: var(--shadow-sm);
  flex: 1;
  min-width: 140px;
}

.psk-icon { font-size: 1.8rem; }

.pack-stat-card div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pack-stat-card strong {
  font-size: 1.5rem;
  font-family: 'Lato', sans-serif;
  color: var(--gold-dark);
  font-weight: 700;
}

.pack-stat-card small {
  font-size: 0.78rem;
  color: var(--text-light);
  font-family: 'Lato', sans-serif;
}

/* Table cells */
.pack-table-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pack-table-icon { font-size: 1.5rem; }

.pack-table-name strong {
  display: block;
  color: var(--umber);
  font-size: 0.95rem;
}

.pack-table-name small {
  display: block;
  color: var(--text-light);
  font-size: 0.78rem;
}

.pack-table-products {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}

.mini-product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-xl);
  padding: 2px 8px;
  font-size: 0.72rem;
  color: var(--text-mid);
  font-weight: 600;
  white-space: nowrap;
}

.pack-table-price strong {
  display: block;
  color: var(--gold-dark);
  font-size: 0.95rem;
}

.pack-table-price s {
  display: block;
  color: var(--text-light);
  font-size: 0.8rem;
}

.savings-chip {
  display: inline-block;
  background: rgba(107, 142, 35, 0.12);
  color: var(--olive);
  border: 1px solid rgba(107, 142, 35, 0.25);
  border-radius: var(--radius-xl);
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
}

.row-inactive { opacity: 0.55; }

/* ── Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: background 0.3s;
}

/* FIX: Thumb ::before must target .toggle-slider::before, not .toggle-slider-gold::before.
   The original used a broken adjacent sibling selector that never matched. */
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* Checked state — olive variant */
.toggle-switch input:checked + .toggle-slider {
  background: var(--olive);
}

/* FIX: Gold slider — separate element, same structure */
.toggle-slider-gold {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: background 0.3s;
}

.toggle-slider-gold::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* FIX: Gold slider checked state — now correctly targets the element */
.toggle-switch input:checked + .toggle-slider-gold {
  background: var(--gold-dark);
}

/* FIX: Thumb movement applies to both slider variants */
.toggle-switch input:checked + .toggle-slider::before,
.toggle-switch input:checked + .toggle-slider-gold::before {
  transform: translateX(20px);
}

/* ── Admin Pack Form Modal ── */
.modal-pack-form {
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
}

.pack-form-body { padding: 24px 28px; }

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

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

.form-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* Savings preview */
.savings-preview {
  padding: 12px 16px;
  background: var(--cream);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-light);
  height: 48px;
  display: flex;
  align-items: center;
}

/* ── Products Picker ── */
.pack-products-picker {
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--cream);
  margin-bottom: 12px;
}

.picker-cat-group {
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.picker-cat-group:last-child { border-bottom: none; }

.picker-cat-label {
  padding: 8px 14px;
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Lato', sans-serif;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.picker-cat-products {
  display: flex;
  flex-direction: column;
}

.picker-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.picker-product:last-child { border-bottom: none; }
.picker-product:hover      { background: rgba(212, 175, 55, 0.06); }
.picker-product.selected   { background: rgba(212, 175, 55, 0.12); }

.picker-product input[type="checkbox"] {
  accent-color: var(--gold-dark);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.picker-product-icon { font-size: 1.1rem; }

.picker-product-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 600;
}

.picker-product-price {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-dark);
}

/* Picker summary */
.pack-picker-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-mid);
  flex-wrap: wrap;
}

.pack-picker-summary strong {
  color: var(--gold-dark);
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
}

.picker-savings {
  color: var(--olive);
  font-weight: 700;
  font-size: 0.88rem;
  font-family: 'Lato', sans-serif;
}

/* Pack Form Actions */
.pack-form-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pack-form-actions .btn {
  min-width: 140px;
  justify-content: center;
}

/* ============================================
   RESPONSIVE — packs.css
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .modal-pack {
    overflow-y: auto;
  }

  .pack-modal-inner {
    grid-template-columns: 1fr;
  }

  .pack-modal-visual { min-height: 220px; }
  .pack-modal-info   { max-height: none; }

  .pack-form-body { padding: 20px; }

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .packs-admin-stats { gap: 10px; }
}

/* Mobile */
@media (max-width: 768px) {
  /* FIX: packs-grid on mobile allows 2 columns on medium-small phones
     instead of forcing 1fr which was too restrictive for 500-768px range. */
  .packs-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    max-width: 100%;
  }

  .packs-strip-grid,
  .packs-strip-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .savings-strip-inner { gap: 12px; }
  .savings-sep         { display: none; }

  .custom-pack-inner {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .pack-stat-card {
    min-width: 120px;
    padding: 14px 16px;
  }

  .pack-form-actions {
    flex-direction: column;
  }

  .pack-form-actions .btn {
    width: 100%;
    min-width: unset;
  }
}

/* Narrow mobile — single column */
@media (max-width: 560px) {
  /* FIX: Collapse packs grid to 1 column only on genuinely small screens */
  .packs-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .pack-card-actions { flex-direction: column; }
  .pack-card-visual  { height: 150px; }

  .packs-strip-grid,
  .packs-strip-skeleton {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }

  .strip-pack-visual { height: 120px; }

  .strip-pack-placeholder {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .pack-modal-price { font-size: 1.6rem; }
  .pack-modal-info  { padding: 24px 18px; }
}

/* ==========================================================
   PAGE DETAIL D'UN PACK — structure en 3 temps
   (1) en-tete : quoi / combien / pourquoi
   (2) contenu + calcul de l'economie
   (3) commande : formulaire a cote des etapes
   Tokens repris de style.css : --gold, --umber, --olive, --cream...
   ========================================================== */
#contents, #order { scroll-margin-top: 96px; }

/* ---------- (1) En-tete ---------- */
.pk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.pk-media-inner {
  position: sticky;
  top: 100px;
}

.pk-media-inner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 44px rgba(184, 134, 11, 0.16);
  background: #FBF6EA;
}

.pk-media-badge {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  padding: 7px 16px;
  border-radius: 30px;
  background: var(--umber);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-md);
}

.pk-eyebrow {
  margin: 0 0 8px;
  color: var(--gold-dark);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pk-title {
  margin: 0 0 14px;
  font-family: 'Scheherazade New', 'Amiri', serif;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--text-dark);
}

body[dir="ltr"] .pk-title { font-family: 'Playfair Display', Georgia, serif; font-size: 2.3rem; }

.pk-desc {
  margin: 0 0 24px;
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.9;
}

.pk-price-box {
  padding: 18px 22px;
  margin-bottom: 22px;
  background: var(--white);
  border: 1px solid #EEDFB4;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.pk-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.pk-price {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-dark);
}

.pk-price small { font-size: 1rem; font-weight: 400; color: var(--text-light); }

.pk-price-old { font-size: 1.15rem; color: var(--text-light); }
.pk-price-old small { font-size: 0.8rem; }

.pk-price-save {
  display: inline-block;
  margin: 12px 0 0;
  padding: 5px 14px;
  border-radius: 30px;
  background: #F1F8E4;
  color: var(--olive-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.pk-trust {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pk-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--cream);
  border: 1px solid #F0E4C2;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
}

.pk-trust-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
  color: var(--olive);
  font-weight: 700;
}

.pk-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.pk-cta {
  padding: 15px 36px;
  font-size: 1.1rem;
  font-weight: 700;
}

.pk-cta-link {
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: none;
}

.pk-cta-link:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.pk-section {
  padding: 44px 0 0;
  margin-bottom: 20px;
  border-top: 1px solid #EEDFB4;
}

.pk-section-head { margin-bottom: 26px; text-align: center; }

.pk-section-head h2,
.pk-order-aside h2 {
  margin: 0 0 6px;
  font-family: 'Scheherazade New', 'Amiri', serif;
  font-size: 1.9rem;
  color: var(--text-dark);
}

body[dir="ltr"] .pk-section-head h2,
body[dir="ltr"] .pk-order-aside h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.7rem; }

.pk-section-head h2 span { font-size: 1.1rem; font-weight: 400; color: var(--text-light); }
.pk-section-head p { margin: 0; color: var(--text-light); }

/* ---------- (2) Grille des produits ---------- */
.pk-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.pk-items > .pk-item { flex: 0 1 230px; }

.pk-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #EEDFB4;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.pk-item:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.pk-item-img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--cream);
}

.pk-item-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pk-item-qty {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(75, 54, 33, 0.85);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.pk-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 14px 16px 16px;
}

.pk-item-name { font-weight: 700; font-size: 1.05rem; color: var(--umber); }
.pk-item-weight { font-size: 0.86rem; color: var(--text-light); }

.pk-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #EEDFB4;
}

.pk-item-price { font-weight: 700; color: var(--text-dark); }
.pk-item-price small { font-weight: 400; font-size: 0.8rem; }
.pk-item-link { font-size: 0.82rem; font-weight: 700; color: var(--gold-dark); }

/* Recapitulatif du calcul */
.pk-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  max-width: 820px;
  margin: 30px auto 0;
  padding: 22px 26px;
  background: #FBF6EA;
  border: 1px solid #EEDFB4;
  border-radius: var(--radius-md);
}

.pk-summary-rows { margin: 0; }

.pk-summary-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--text-mid);
}

.pk-summary-rows dt, .pk-summary-rows dd { margin: 0; }
.pk-summary-rows small { font-weight: 400; }

.pk-summary-struck dd { text-decoration: line-through; color: var(--text-light); }

.pk-summary-rows > .pk-summary-price {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #E0CE9E;
  font-weight: 700;
  color: var(--umber);
}

.pk-summary-price dd { color: var(--gold-dark); font-size: 1.25rem; }
.pk-summary-price dt small { color: var(--olive-dark); font-size: 0.8rem; }

.pk-summary-save {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 12px;
  border-radius: var(--radius-md);
  background: #F1F8E4;
  color: var(--olive-dark);
  text-align: center;
}

.pk-summary-save-label { font-weight: 700; }
.pk-summary-save strong { font-size: 2rem; line-height: 1.1; }
.pk-summary-save strong small { font-size: 1rem; font-weight: 400; }
.pk-summary-save > small { font-size: 0.8rem; opacity: 0.85; }

/* ---------- (3) Commande ---------- */
.pk-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: start;
}

.pk-order-aside { position: sticky; top: 100px; }

.pk-steps {
  list-style: none;
  margin: 20px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pk-steps li { display: flex; gap: 14px; align-items: flex-start; }

.pk-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--umber);
  font-weight: 700;
}

.pk-steps strong { display: block; color: var(--umber); margin-bottom: 2px; }
.pk-steps li div > span { color: var(--text-light); font-size: 0.92rem; }

.pk-help { margin: 0; color: var(--text-mid); }
.pk-help a { color: var(--olive-dark); font-weight: 700; }

.pk-order-main .pack-order-card { margin-top: 0 !important; }

/* ---------- Barre d'achat mobile ---------- */
.pk-sticky { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pk-hero { grid-template-columns: 1fr; gap: 26px; margin-bottom: 44px; }
  /* Mobile : prix + bouton juste sous le titre, la description passe apres */
  .pk-info { display: flex; flex-direction: column; }
  .pk-price-box { order: 1; }
  .pk-ctas { order: 2; margin-bottom: 22px; }
  .pk-trust { order: 3; }
  .pk-desc { order: 4; margin-bottom: 0; }
  .pk-media-inner { position: relative; top: 0; }
  .pk-title { font-size: 2rem; }
  body[dir="ltr"] .pk-title { font-size: 1.85rem; }
  .pk-order-grid { grid-template-columns: 1fr; gap: 28px; }
  .pk-order-main { order: -1; }          /* le formulaire d'abord sur mobile */
  .pk-order-aside { position: static; }
  .pk-summary { grid-template-columns: 1fr; }

  .pk-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid #EEDFB4;
    box-shadow: 0 -6px 20px rgba(75, 54, 33, 0.12);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .pk-sticky.show { transform: translateY(0); }
  .pk-sticky-price { font-size: 1.35rem; font-weight: 700; color: var(--gold-dark); }
  .pk-sticky-price small { font-size: 0.85rem; font-weight: 400; color: var(--text-light); }
  .pk-sticky .btn { padding: 12px 28px; }
}

@media (max-width: 560px) {
  .pk-trust { gap: 8px; }
  .pk-trust li { padding: 8px 10px; font-size: 0.82rem; gap: 8px; }
  .pk-trust-ico { width: 26px; height: 26px; }
  .pk-items { gap: 12px; }
  .pk-items > .pk-item { flex: 0 1 calc(50% - 6px); }
  .pk-item-body { padding: 10px 12px 12px; }
  .pk-item-foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pk-cta { width: 100%; text-align: center; }
  .pk-ctas { justify-content: center; }
}
