:root {
  --detail-bg: #f8fafc;
  --card-shadow: 0 10px 30px rgba(0,0,0,0.04);
  --glass-bg: rgba(255, 255, 255, 0.92);
}

.detail-layout {
  background: var(--detail-bg);
  min-height: 100vh;
  padding-bottom: 140px;
  font-family: 'Poppins', sans-serif;
}

/* ── Premium Image Banner (Mobile Only) ── */
.image-banner-wrapper {
  padding: 16px 16px 0;
}

.image-banner {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.image-banner img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 12s ease;
}
.image-banner:hover img { transform: scale(1.08); }

.image-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 50%);
  pointer-events: none;
}

.back-btn {
  position: absolute; top: 20px; left: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.3); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff; z-index: 100; font-size: 1.1rem;
  transition: all 0.3s;
  text-decoration: none;
}
.back-btn:hover { background: #fff; color: var(--primary); transform: scale(1.08); }

/* ── Content Area ── */
.content-area {
  padding: 24px;
  position: relative;
  z-index: 10;
}

.product-name {
  font-size: 1.8rem; font-weight: 800;
  color: #0f172a; line-height: 1.2; margin: 12px 0 16px;
  font-family: 'Outfit', sans-serif;
}

.price-tag {
  display: inline-block;
  font-size: 1.4rem; font-weight: 900; color: #fff; 
  background: var(--primary-gradient, linear-gradient(135deg, #6366f1, #4338ca)); 
  padding: 8px 20px; border-radius: 20px;
  box-shadow: 0 8px 20px rgba(99,102,241,0.25);
}

.section-title {
  font-size: 0.85rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: #64748b; margin: 36px 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 2px; background: #e2e8f0; border-radius: 2px; }

/* ── Nutri Grid Premium ── */
.nutri-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.nutri-item {
  background: #fff; padding: 16px 8px; border-radius: 20px;
  text-align: center; border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow); transition: all 0.3s;
}
.nutri-item:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 25px rgba(99,102,241,0.15); }
.nutri-val { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 6px 0 2px; }
.nutri-lbl { font-size: 0.65rem; color: #64748b; font-weight: 700; text-transform: uppercase; }

/* ── Info Boxes ── */
.info-box {
  background: #fff; border-radius: 24px; padding: 24px; margin-bottom: 24px;
  border: 1px solid #e2e8f0; box-shadow: var(--card-shadow); position: relative;
  overflow: hidden;
}
.info-box.ai-box { background: linear-gradient(145deg, #ffffff, #f8fafc); border-left: 4px solid #8b5cf6; }

/* ── Modifiers & Ingredients (Pill Toggles) ── */
.custom-options-grid {
  display: flex; flex-direction: column; gap: 12px;
}
.option-card {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; padding: 16px 20px; border-radius: 18px;
  border: 2px solid #e2e8f0; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.option-card:hover { border-color: #cbd5e1; }

/* Modern Toggle Switch instead of Checkbox */
.toggle-switch {
  position: relative; width: 44px; height: 24px; 
  background: #cbd5e1; border-radius: 24px; transition: 0.3s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.option-input { display: none; }
.option-input:checked + .option-card { border-color: var(--primary); background: #f5f3ff; }
.option-input:checked + .option-card .toggle-switch { background: var(--primary); }
.option-input:checked + .option-card .toggle-switch::after { transform: translateX(20px); }

/* Red styling for removed ingredients */
.option-input.remove-ing:checked + .option-card { border-color: #ef4444; background: #fef2f2; }
.option-input.remove-ing:checked + .option-card .toggle-switch { background: #ef4444; }

/* ── Qty Control ── */
.qty-wrapper {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: 12px 24px; border-radius: 24px;
  box-shadow: var(--card-shadow); margin: 30px 0; border: 1px solid #e2e8f0;
}
.qty-label { font-weight: 800; color: #0f172a; font-size: 1.1rem; }
.qty-controls { display: flex; align-items: center; gap: 20px; }
.btn-qty {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: #f1f5f9; color: #0f172a; font-size: 1.4rem; font-weight: 800;
  cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center;
}
.btn-qty:hover { background: #e2e8f0; transform: scale(1.05); }
.btn-qty:active { transform: scale(0.95); }
.qty-val { font-size: 1.4rem; font-weight: 900; min-width: 30px; text-align: center; }

/* ── Glass Footer ── */
.glass-footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; padding: 20px 24px 30px;
  background: var(--glass-bg); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.5); z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 32px 32px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.08);
}
.footer-price-lbl { font-size: 0.75rem; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.footer-price-val { font-size: 1.8rem; font-weight: 900; color: #0f172a; }

.btn-add-cart {
  background: var(--primary-gradient, linear-gradient(135deg, #6366f1, #4338ca));
  color: #fff; border: none; padding: 16px 32px; border-radius: 20px;
  font-size: 1.1rem; font-weight: 800; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(99,102,241,0.3);
  display: flex; align-items: center; gap: 10px;
}
.btn-add-cart:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(99,102,241,0.4); }

/* ── Desktop-Specific Side-by-Side Symmetrical Grid ── */
.desktop-image-wrapper {
  display: none;
}
.desktop-split-grid {
  display: block;
}

@media (min-width: 992px) {
  .detail-layout {
    padding-bottom: 60px;
  }
  .image-banner-wrapper.mobile-only {
    display: none;
  }
  .desktop-image-wrapper {
    display: block;
    margin-bottom: 24px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    height: 380px;
    position: relative;
  }
  .desktop-image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
  }
  .desktop-split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    align-items: start;
  }
  .desktop-left-panel {
    position: sticky;
    top: 30px;
  }
  .desktop-right-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 32px;
    padding: 36px;
    box-shadow: 0 15px 35px -5px rgba(0,0,0,0.03);
    position: sticky;
    top: 30px;
  }
  .glass-footer {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 0 0 0 !important;
    border-top: 1px dashed #e2e8f0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    margin-top: 30px;
  }
}

.suggested-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1) !important;
    border-color: rgba(99,102,241,0.2) !important;
}
.suggested-card:hover img {
    transform: scale(1.05);
}