/* ==========================================================================
   DELHI KA TESSA (DELIKATESSA) B2C - RETAIL UI COMPONENTS
   Product Cards, Steppers, Free Shipping Bar, Buttons, Forms & Badges
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-600);
  color: #ffffff;
  border-color: var(--accent-700);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: var(--accent-700);
}

.btn-secondary {
  background: var(--primary-100);
  color: var(--primary-800);
  border-color: var(--primary-200);
}

.btn-secondary:hover {
  background: var(--primary-200);
}

.btn-outline {
  background: transparent;
  color: var(--primary-700);
  border-color: var(--surface-border-strong);
}

.btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
}

.btn-danger-outline {
  background: transparent;
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

.btn-danger-outline:hover {
  background: var(--status-danger-bg);
}

/* German Button-Lösung Legal Order Button */
.btn-legal-order {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(4, 120, 87, 0.35);
  letter-spacing: -0.2px;
  border: 1px solid #10b981;
}

.btn-legal-order:hover {
  background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

/* Predictive Search Bar */
.catalog-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface-base);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
  margin-bottom: 12px;
}

.catalog-search-bar:focus-within {
  border-color: var(--accent-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.catalog-search-bar svg {
  flex-shrink: 0;
  color: var(--primary-400);
}

.catalog-search-bar input {
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--primary-900);
  width: 100%;
}

.catalog-search-bar input::placeholder {
  color: var(--primary-400);
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--primary-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 2px;
}

/* Category Filter Pill Track */
.category-pill-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-pill-track::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.category-pill:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
}

.category-pill.active {
  background: var(--primary-900);
  color: #ffffff;
  border-color: var(--primary-900);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

/* Promotional Hero Carousel Banner */
.b2c-promo-banner {
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: #ffffff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.25);
}

.b2c-promo-banner::after {
  content: "🌿";
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 72px;
  opacity: 0.2;
  pointer-events: none;
}

.promo-badge {
  display: inline-block;
  background: var(--amber-400);
  color: var(--amber-800);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.promo-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
}

.promo-subtitle {
  font-size: 11px;
  color: var(--accent-100);
  line-height: 1.4;
}

/* Filter & Count Bar */
.filter-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--primary-500);
  font-weight: 600;
}

.sort-select {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-700);
  outline: none;
  cursor: pointer;
}

/* 2-Column Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Product Card */
.product-card {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}

.card-img-wrap {
  width: 100%;
  height: 125px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.card-heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-400);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
  z-index: 5;
}

.card-heart-btn.active {
  color: #ef4444;
  background: #ffffff;
}

.card-badge-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
}

.tag-bio { background: #065f46; color: #a7f3d0; }
.tag-bestseller { background: #b45309; color: #fef3c7; }
.tag-sale { background: #991b1b; color: #fee2e2; }

.card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-packaging {
  font-size: 10px;
  color: var(--primary-400);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 32px;
}

.card-price-row {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--surface-border);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.gross-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-900);
  font-family: var(--font-mono);
  line-height: 1.1;
}

.base-price {
  font-size: 9px;
  color: var(--primary-500);
  font-weight: 600;
  margin-top: 2px;
}

.card-quick-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-600);
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.card-quick-add-btn:hover {
  background: var(--accent-700);
}

.card-quick-add-btn:active {
  transform: scale(0.9);
}

/* Dynamic Free Shipping Progress Bar */
.free-shipping-card {
  background: var(--surface-base);
  border: 1px solid var(--accent-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}

.free-shipping-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-700);
  margin-bottom: 8px;
}

.free-shipping-track {
  height: 6px;
  background: var(--accent-100);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.free-shipping-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 3px;
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stepper Component */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--primary-100);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.stepper-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: var(--surface-base);
  color: var(--primary-800);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.stepper-btn:hover {
  background: var(--primary-200);
}

.stepper-val {
  min-width: 30px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--primary-900);
}

/* Form Styles */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-700);
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--primary-900);
  background: var(--surface-base);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-input.error {
  border-color: #ef4444;
  background: #fff5f5;
}

.form-error-msg {
  font-size: 10px;
  color: #dc2626;
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Checkout Progress Indicator */
.checkout-steps-tracker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.checkout-step-item {
  text-align: center;
  padding: 6px 2px;
  border-bottom: 3px solid var(--surface-border);
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-400);
  transition: all var(--transition-fast);
}

.checkout-step-item.active {
  border-bottom-color: var(--accent-600);
  color: var(--accent-700);
}

.checkout-step-item.completed {
  border-bottom-color: var(--accent-500);
  color: var(--accent-600);
}

/* Empty State Card */
.empty-state-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface-base);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--surface-border-strong);
  margin-top: 20px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 12px;
  color: var(--primary-500);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}

.badge-success { background: var(--status-success-bg); color: var(--status-success-text); border: 1px solid var(--status-success-border); }
.badge-info { background: var(--status-info-bg); color: var(--status-info-text); border: 1px solid var(--status-info-border); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning-text); border: 1px solid var(--status-warning-border); }
