/* ==========================================================================
   NordicForm & LipoKetonic - Component Stylesheets
   Includes: Cart Drawer, Cookie Banner, Calculators, Quizzes, Checkout
   ========================================================================== */

/* --- 1. SLIDE-OUT CART DRAWER --- */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 33, 48, 0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(-440px);
}

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--nordic-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nordic-slate);
}

.cart-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--nordic-muted);
  cursor: pointer;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-close-btn:hover {
  color: var(--nordic-slate);
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--nordic-muted);
}

.cart-empty-state svg {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  color: var(--nordic-border);
}

.cart-item-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--nordic-border-light);
}

.cart-item-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--nordic-border-light);
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nordic-slate);
  margin-bottom: 4px;
}

.cart-item-subtitle {
  font-size: 0.8rem;
  color: var(--nordic-muted);
  margin-bottom: 8px;
}

.cart-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
}

.cart-qty-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--nordic-slate);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-val {
  padding: 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #C0392B;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--nordic-border-light);
  background: var(--bg-surface-alt);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--nordic-charcoal);
}

.cart-summary-row.total-row {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--nordic-slate);
  padding-top: 10px;
  border-top: 1px dashed var(--nordic-border);
  margin-bottom: 18px;
}

.cart-btn-block {
  width: 100%;
  display: block;
  text-align: center;
}

/* --- 2. GDPR COOKIE CONSENT BANNER & SETTINGS MODAL --- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 580px;
  margin: 0 auto;
  background: rgba(17, 33, 48, 0.97);
  backdrop-filter: blur(14px);
  color: #FFFFFF;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 990;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #C6D4E2;
  margin-bottom: 16px;
}

.cookie-banner-text a {
  color: #FFFFFF;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cookie-btn-primary {
  background: var(--brand-copper);
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  transition: var(--transition);
}

.cookie-btn-primary:hover {
  background: var(--brand-copper-hover);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  transition: var(--transition);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Cookie Settings Modal */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 33, 48, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal-window {
  background: var(--bg-card);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cookie-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nordic-slate);
}

.cookie-group-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--nordic-border-light);
}

.cookie-group-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.cookie-group-desc {
  font-size: 0.83rem;
  color: var(--nordic-muted);
  margin-top: 6px;
}

/* --- 3. PRODUCTS & BUNDLE CARDS --- */
.product-showcase-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--nordic-border-light);
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}

@media (min-width: 992px) {
  .product-showcase-box {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.product-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, var(--brand-copper-light) 0%, #FFFFFF 70%);
  border-radius: var(--radius-md);
  padding: 30px;
}

.product-image-container img {
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(200, 109, 58, 0.25));
}

.bundle-selection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 32px 0;
}

@media (min-width: 768px) {
  .bundle-selection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bundle-card {
  background: var(--bg-card);
  border: 2px solid var(--nordic-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.bundle-card:hover {
  border-color: var(--brand-copper);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.bundle-card.featured {
  border-color: var(--brand-copper);
  background: #FFFDF9;
  box-shadow: var(--shadow-md);
}

.bundle-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-copper);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.bundle-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--nordic-slate);
  margin: 10px 0 6px;
}

.bundle-duration {
  font-size: 0.85rem;
  color: var(--nordic-muted);
  margin-bottom: 14px;
}

.bundle-feature-tag {
  background: var(--badge-green-light);
  color: var(--badge-green);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  display: inline-block;
}

.bundle-desc {
  font-size: 0.88rem;
  color: var(--nordic-charcoal);
  margin-bottom: 20px;
  flex-grow: 1;
}

.bundle-btn {
  width: 100%;
  background: var(--brand-copper);
  color: #FFFFFF;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.bundle-btn:hover {
  background: var(--brand-copper-hover);
}

/* --- 4. WATER INTAKE CALCULATOR & METABOLIC QUIZ --- */
.tool-tab-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.tool-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--nordic-border);
  color: var(--nordic-slate);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.tool-tab-btn.active {
  background: var(--brand-copper);
  color: #FFFFFF;
  border-color: var(--brand-copper);
  box-shadow: var(--shadow-warm);
}

.calculator-card-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--nordic-border-light);
}

@media (min-width: 992px) {
  .calculator-card-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.form-group-custom {
  margin-bottom: 22px;
}

.form-group-custom label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--nordic-slate);
  margin-bottom: 8px;
}

.range-slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-slider-wrap input[type="range"] {
  flex-grow: 1;
  accent-color: var(--brand-copper);
  height: 8px;
  border-radius: 4px;
  background: var(--nordic-border-light);
  cursor: pointer;
}

.range-value-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-copper);
  min-width: 65px;
  text-align: right;
}

.calc-result-pane {
  background: var(--brand-copper-light);
  border: 1px solid rgba(200, 109, 58, 0.2);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tumbler-graphic {
  width: 90px;
  height: 140px;
  border: 4px solid var(--nordic-slate);
  border-top: none;
  border-radius: 0 0 16px 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  background: #FFFFFF;
}

.tumbler-water {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #5AB1E6 0%, #1D8CD7 100%);
  height: 65%;
  transition: height 0.5s ease;
}

.calculated-intake-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--nordic-slate);
  line-height: 1;
  margin-bottom: 6px;
}

.calculated-intake-sub {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nordic-charcoal);
  margin-bottom: 16px;
}

/* Metabolic Quiz Interactive */
.quiz-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--nordic-border-light);
}

.quiz-progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--nordic-border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--brand-copper);
  width: 20%;
  transition: width 0.3s ease;
}

.quiz-step-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--nordic-slate);
  margin-bottom: 20px;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-option-card {
  padding: 16px 20px;
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.95rem;
}

.quiz-option-card:hover {
  border-color: var(--brand-copper);
  background: var(--brand-copper-light);
}

.quiz-option-card.selected {
  border-color: var(--brand-copper);
  background: var(--brand-copper-light);
  color: var(--brand-copper-hover);
  box-shadow: 0 0 0 1px var(--brand-copper);
}

.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* --- 5. CHECKOUT PAGE --- */
.checkout-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 992px) {
  .checkout-layout-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.checkout-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--nordic-border-light);
}

.checkout-box h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nordic-slate);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nordic-border-light);
}

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

@media (min-width: 600px) {
  .checkout-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-full-col {
    grid-column: 1 / -1;
  }
}

.form-input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--nordic-slate);
  font-size: 0.95rem;
  transition: var(--transition);
  min-height: 48px;
}

.form-input-field:focus {
  outline: none;
  border-color: var(--brand-copper);
  box-shadow: 0 0 0 3px rgba(200, 109, 58, 0.15);
}

.radio-selection-card {
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.radio-selection-card:hover {
  border-color: var(--brand-copper);
}

.radio-selection-card.selected {
  border-color: var(--brand-copper);
  background: var(--brand-copper-light);
}

.radio-content-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-content-left input[type="radio"] {
  accent-color: var(--brand-copper);
  width: 18px;
  height: 18px;
}

.ssl-badge-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--badge-blue-light);
  color: var(--badge-blue);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 20px;
}

/* --- 6. THANK YOU ORDER TRACKER --- */
.thankyou-receipt-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--nordic-border-light);
  text-align: center;
}

.success-check-icon {
  width: 64px;
  height: 64px;
  background: var(--badge-green-light);
  color: var(--badge-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.tracking-code-pill {
  display: inline-block;
  background: var(--nordic-slate);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  margin: 16px 0 28px;
}

/* 4-Stage Delivery Timeline */
.delivery-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 36px 0;
  position: relative;
}

.delivery-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--nordic-border);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--nordic-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--nordic-muted);
}

.timeline-step.completed .timeline-dot {
  background: var(--badge-green);
  border-color: var(--badge-green);
  color: #FFFFFF;
}

.timeline-step.active .timeline-dot {
  background: var(--brand-copper);
  border-color: var(--brand-copper);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--brand-copper-light);
}

.timeline-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--nordic-charcoal);
}

.coach-note-box {
  background: var(--brand-copper-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 30px;
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.coach-avatar-small {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--brand-copper);
}
