/* WhatsApp Order App - Custom Styles */

:root {
  --wa-green: #25d366;
  --wa-dark: #128c7e;
  --wa-light: #dcf8c6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Hero Banner */
.hero-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 5rem 2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  background: #ff9800;
  color: #fff;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  transition: background 0.2s, transform 0.2s;
}

.hero-btn:hover {
  background: #e65100;
  color: #fff;
  transform: translateY(-2px);
}

/* Product Cards */
.product-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.product-img {
  height: 200px;
  object-fit: cover;
}

.product-img-placeholder {
  height: 200px;
}

/* Add to Cart Button */
.add-to-cart-btn {
  background: #ff9800;
  color: #fff;
  border: none;
}

.add-to-cart-btn:hover {
  background: #e65100;
  color: #fff;
}

/* Navbar Links */
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

/* PWA Install Button */
#pwa-install-btn {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#pwa-install-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  font-size: 0.65rem;
}

/* Toast */
.toast-success {
  background-color: var(--wa-green);
  color: white;
}

/* Navbar Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.brand-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e65100, #ff9800);
  border-radius: 10px 10px 0 0;
}

.brand-a {
  font-size: 1.15rem;
  font-weight: 900;
  color: #e65100;
  line-height: 1;
  letter-spacing: -2px;
  font-style: italic;
}

.brand-c {
  font-size: 1.15rem;
  font-weight: 900;
  color: #e65100;
  line-height: 1;
  font-style: italic;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.brand-highlight {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
}

.navbar-brand i {
  font-size: 1.3rem;
}

/* Mobile navbar menu */
@media (max-width: 991.98px) {
  .navbar-dark .navbar-nav .nav-link {
    font-size: 1rem;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-dark .navbar-nav .nav-link:hover {
    border-radius: 0;
  }

  .navbar-collapse {
    padding-top: 0.5rem;
  }
}

/* Category Section */
.category-section h5 {
  color: #333;
}

/* Category Cards */
.cat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  color: #333;
  background: #fff;
  border: 1.5px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  height: 100%;
}

.cat-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f8f0, #d4f1e6);
  color: var(--wa-dark);
  font-size: 1.25rem;
  transition: all 0.25s ease;
}

.cat-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cat-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-count {
  font-size: 0.75rem;
  color: #888;
  font-weight: 400;
}

/* Hover */
.cat-card:hover {
  color: #333;
  border-color: var(--wa-green);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.15);
}

.cat-card:hover .cat-card-icon-wrap {
  background: linear-gradient(135deg, var(--wa-light), #b8f0d8);
  transform: scale(1.08);
}

/* Active */
.cat-card.active {
  color: #fff;
  background: linear-gradient(135deg, var(--wa-dark), var(--wa-green));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(18, 140, 126, 0.35);
}

.cat-card.active .cat-card-icon-wrap {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cat-card.active .cat-card-name {
  color: #fff;
}

.cat-card.active .cat-card-count {
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive: stack vertically on very small screens */
@media (max-width: 400px) {
  .cat-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.75rem;
    gap: 0.5rem;
  }
  .cat-card-name {
    white-space: normal;
  }
}

/* Footer */
footer {
  margin-top: auto;
}

/* Table image */
.table img {
  border: 1px solid #dee2e6;
}

/* Quantity input */
#detail-qty {
  max-width: 60px;
}

/* Order Ref Display */
.order-ref-display {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Status Badges */
.status-badge {
  font-size: 0.8rem;
  padding: 0.35em 0.75em;
}
.status-pending { background-color: #ffc107; color: #000; }
.status-confirmed { background-color: #17a2b8; color: #fff; }
.status-processing { background-color: #6f42c1; color: #fff; }
.status-shipped { background-color: #0d6efd; color: #fff; }
.status-delivered { background-color: #198754; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }

/* Status Timeline Stepper */
.status-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}
.status-timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #dee2e6;
  z-index: 0;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}
.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dee2e6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #dee2e6;
  margin-bottom: 6px;
}
.timeline-step.active .timeline-dot {
  background: var(--wa-green);
  box-shadow: 0 0 0 2px var(--wa-green);
}
.timeline-step.current .timeline-dot {
  box-shadow: 0 0 0 2px var(--wa-green), 0 0 0 5px rgba(37, 211, 102, 0.25);
}
.timeline-step.cancelled .timeline-dot {
  background: #dc3545;
  box-shadow: 0 0 0 2px #dc3545;
}
.timeline-label {
  font-size: 0.7rem;
  text-align: center;
  color: #6c757d;
}
.timeline-step.active .timeline-label {
  color: #212529;
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .min-vh-hero {
    min-height: 400px;
    padding: 2.5rem 0;
  }
  .hero-stats {
    gap: 1rem;
  }
  .hero-stat-number {
    font-size: 1.2rem;
  }
  .hero-btn-primary,
  .hero-btn-outline {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.65rem;
  }
  .hero-stats {
    gap: 0.75rem;
  }
  .hero-stat-divider {
    height: 28px;
  }
}
