/* ==========================================================================
   FoodSphere QSR Cart Drawer & Multi-Step Checkout Styles — Tandoori Stop
   Warm Ivory/White Surface, #111827 Text, #C81E1E Primary CTA, #1C1917 Charcoal Accents
   Barlow Condensed Headings + Inter Body
   ========================================================================== */

:root {
  --cd-primary: #C81E1E;
  --cd-primary-hover: #991B1B;
  --cd-accent: #1C1917;
  --cd-accent-hover: #000000;
  --cd-gold: #F59E0B;
  --cd-gold-soft: #FEF3C7;
  --cd-bg: #FFFFFF;
  --cd-surface: #FFFFFF;
  --cd-card-bg: #FAF8F5;
  --cd-card-border: #E5E7EB;
  --cd-text: #111827;
  --cd-muted: #4B5563;
  --cd-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Floating Cart Button */
.cd-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cd-accent);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 30px rgba(28, 25, 23, 0.35);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.cd-float-btn:hover {
  background: var(--cd-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(28, 25, 23, 0.45);
}

.cd-float-badge {
  background: var(--cd-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cd-float-total {
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--cd-gold);
}

/* Drawer Backdrop Overlay */
.cd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cd-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer Container */
.cd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--cd-surface);
  border-left: 1px solid var(--cd-card-border);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
  color: var(--cd-text);
}

.cd-drawer.active {
  transform: translateX(0);
}

/* Header */
.cd-header {
  padding: 16px 20px;
  background: var(--cd-accent);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cd-header-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.cd-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.cd-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Stepper Indicator */
.cd-stepper {
  display: flex;
  border-bottom: 1px solid var(--cd-card-border);
  background: #FAF8F5;
}

.cd-step {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cd-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.cd-step.active {
  color: var(--cd-primary);
  border-bottom-color: var(--cd-primary);
  font-weight: 800;
  background: #FFFFFF;
}

/* Body / Content Area */
.cd-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  background: #FFFFFF;
}

/* Empty State */
.cd-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.cd-empty-icon {
  font-size: 52px;
  margin-bottom: 14px;
}

.cd-empty-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--cd-text);
  margin-bottom: 6px;
}

.cd-empty-sub {
  font-size: 13.5px;
  color: var(--cd-muted);
  margin-bottom: 20px;
}

/* Item Card */
.cd-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAF8F5;
  border: 1px solid var(--cd-card-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.cd-item-card:hover {
  border-color: var(--cd-primary);
  background: #FFFDF9;
}

.cd-item-img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: #FAF8F5;
  border: 1px solid var(--cd-card-border);
  flex-shrink: 0;
}

.cd-item-info {
  flex: 1;
  min-width: 0;
}

.cd-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--cd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.cd-item-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  color: var(--cd-primary);
  font-weight: 800;
}

/* Quantity Control Buttons */
.cd-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--cd-card-border);
  border-radius: 8px;
  padding: 3px 6px;
}

.cd-qty-btn {
  background: transparent;
  border: none;
  color: var(--cd-text);
  font-size: 14px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cd-qty-btn:hover {
  background: var(--cd-accent);
  color: #ffffff;
}

.cd-qty-num {
  font-size: 13px;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  color: var(--cd-text);
}

/* Footer / Summary Area */
.cd-footer {
  padding: 16px 20px;
  background: #FAF8F5;
  border-top: 1px solid var(--cd-card-border);
}

.cd-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--cd-muted);
  margin-bottom: 6px;
}

.cd-summary-row.total {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--cd-text);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--cd-card-border);
}

.cd-summary-row.total .cd-total-price {
  color: var(--cd-primary);
}

/* Action Buttons */
.cd-btn-primary {
  width: 100%;
  background: var(--cd-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 30, 30, 0.25);
  transition: all 0.2s ease;
  margin-top: 12px;
}

.cd-btn-primary:hover {
  background: var(--cd-primary-hover);
  transform: translateY(-1px);
}

.cd-btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--cd-muted);
  border: 1px solid var(--cd-card-border);
  border-radius: 12px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.cd-btn-secondary:hover {
  border-color: var(--cd-text);
  color: var(--cd-text);
}

/* Checkout Form Inputs */
.cd-form-group {
  margin-bottom: 14px;
}

.cd-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}

.cd-form-input, .cd-form-select, .cd-form-textarea {
  width: 100%;
  background: #FAF8F5;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cd-form-input:focus, .cd-form-select:focus, .cd-form-textarea:focus {
  border-color: var(--cd-primary);
  background: #FFFFFF;
}

/* Toggle in Cart Drawer */
.cd-fulfillment-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #F3F2EE;
  border: 1px solid var(--cd-card-border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}

.cd-fulfillment-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cd-fulfillment-btn.active {
  background: var(--cd-primary);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
