/* ==========================================================================
   EVERHOME - Core Design & Styling System
   ========================================================================== */

:root {
  --orange: #ea580c;
  --orange-hover: #c2410c;
  --orange-light: #fff7ed;
  --orange-border: #fed7aa;
  --amber: #f59e0b;
  --red: #ea580c;
  --red-hover: #c2410c;
  --green: #1E6C41;
  --green-hover: #175332;
  --dark: #1f2937;
  --gray-bg: #f8f9fa;
  --gray-border: #fed7aa;
  --text-muted: #6b7280;
  --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Open Sans', sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: var(--font-main);
  color: var(--dark);
  background-color: #fcfcfc;
  overflow-x: hidden;
}

/* Delivery Promise Bar */
.delivery-promise-web {
  background: linear-gradient(90deg, #c2410c 0%, #ea580c 45%, #f97316 100%);
  color: #ffffff;
  padding: 8px 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 4px rgba(194, 65, 12, 0.2);
}
.delivery-promise-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.delivery-promise-divider {
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
}
.delivery-promise-link {
  color: #fff;
  background: rgba(255,255,255,0.25);
  padding: 2px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.delivery-promise-link:hover {
  background: rgba(255,255,255,0.45);
  color: #fff;
}

/* Top bar */
.top-bar {
  background: #fffaf5;
  border-bottom: 1px solid #ffedd5;
  font-size: 0.84rem;
  padding: 7px 0;
  color: #9a3412;
}
.top-bar a {
  color: #9a3412;
  text-decoration: none;
  transition: color 0.2s ease;
}
.top-bar a:hover {
  color: #ea580c;
}

/* Brand */
.brand-name {
  font-size: 1.45rem;
  letter-spacing: -0.5px;
  color: #ea580c !important;
}

/* Search Bar */
.search-bar {
  display: flex;
  border: 2px solid #ea580c;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}
.search-bar .cat-select {
  border: none;
  background: #fffaf5;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: #431407;
  outline: none;
  border-right: 1px solid #fed7aa;
}
.search-bar input {
  border: none;
  flex-grow: 1;
  padding: 8px 16px;
  font-size: 0.9rem;
  outline: none;
}
.search-bar .search-btn {
  background: #ea580c;
  color: #fff;
  border: none;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.search-bar .search-btn:hover {
  background: #c2410c;
}

/* Header Actions */
.header-action-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff7ed;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #fed7aa;
}
.header-action-btn:hover {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
}
.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ea580c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Account Dropdown */
.acc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #431407;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.account-btn:hover {
  background: #ffedd5;
  color: #ea580c;
}

/* Main Navigation */
.main-nav {
  background: #fff;
  border-top: 1px solid #ffedd5;
  border-bottom: 1px solid #ffedd5;
}
.mega-cat-btn {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
  transition: all 0.2s ease;
}
.mega-cat-btn:hover, .mega-cat-btn:focus {
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
  color: #fff;
}
.main-nav .nav-link {
  color: #431407;
  font-weight: 700;
  padding: 12px 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}
.main-nav .nav-link:hover, .main-nav .nav-link.active {
  color: #ea580c;
}
.main-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: #ea580c;
  border-radius: 3px 3px 0 0;
}

/* Hero Mobile App Promotional Banner (Reference Design) */
.hero-mobile-app-section {
  background: #ea580c;
  overflow: hidden;
  position: relative;
}

.hero-banner-wrap {
  width: 100%;
  min-height: 400px;
  background-color: #ea580c;
  background-image: 
    linear-gradient(90deg, rgba(234, 88, 12, 0) 0%, rgba(234, 88, 12, 0.15) 32%, rgba(225, 80, 10, 0.7) 48%, rgba(220, 75, 8, 0.95) 68%, rgba(215, 70, 6, 0.98) 100%),
    url('../images/hero_banner.jpg');
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.hero-phone-col {
  min-height: 320px;
}

.hero-app-title {
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.3px;
  text-shadow: 0 3px 12px rgba(160, 40, 0, 0.5), 0 2px 0 #b43403;
}

.hero-app-title .brand-highlight {
  color: #ffffff;
  display: inline-block;
  position: relative;
}

.hero-actions-row {
  flex-wrap: nowrap;
}

.app-badge-btn {
  background: #026638;
  color: #ffffff !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
}

.app-badge-btn:hover {
  background: #014f2b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  color: #ffffff !important;
}

.app-badge-btn i {
  font-size: 1.45rem;
  line-height: 1;
}

.app-badge-btn .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}

.app-badge-btn .badge-text small {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.app-badge-btn .badge-text strong {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.hero-hours-pill {
  background: #ffffff;
  color: #ea580c;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(0.78rem, 1.15vw, 1.05rem);
  padding: 8px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-block;
  flex-shrink: 0;
}

.hero-app-subtext {
  color: #ffffff;
  font-family: 'Open Sans', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 991.98px) {
  .hero-banner-wrap {
    background-image: 
      linear-gradient(180deg, rgba(234, 88, 12, 0.88) 0%, rgba(194, 65, 12, 0.98) 100%),
      url('../images/hero_banner.jpg');
    padding: 35px 0;
    min-height: auto;
  }
  .hero-phone-col {
    min-height: auto;
  }
  .hero-actions-row {
    flex-wrap: wrap;
  }
}

/* Trust Signals Bar */
.trust-bar {
  background: #fff;
  padding: 18px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border-bottom: 1px solid var(--gray-border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
}
.trust-item i {
  font-size: 1.8rem;
  color: var(--red);
}
.trust-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--dark);
}
.trust-text small {
  color: var(--text-muted);
}

/* Category Carousel */
.categories-fire-bg {
  padding: 40px 0;
  background: #fff;
}
.cats-eyebrow {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cats-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.cats-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}
.cat-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gray-border);
  background: #fff;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-nav-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.cat-circle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--dark);
  padding: 10px 6px;
  border-radius: 12px;
  transition: transform 0.2s ease, color 0.2s ease;
  width: 100%;
}
.cat-circle-card:hover {
  transform: translateY(-4px);
  color: var(--red);
}
.cat-circle-card.active .cat-circle-img-wrap {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}
.cat-circle-img-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.cat-circle-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-circle-icon-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e63946, #ff758f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.cat-circle-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-count-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Product Cards */
.products-grid-shell {
  min-height: 400px;
}
.product-card-v2 {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.product-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}
.product-img-wrap {
  position: relative;
  height: 220px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-wrap img {
  max-height: 190px;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card-v2:hover .product-img-wrap img {
  transform: scale(1.05);
}
.product-badge-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.wishlist-btn-v2 {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
}
.wishlist-btn-v2:hover, .wishlist-btn-v2.active {
  background: #fee2e2;
  color: var(--red);
  border-color: var(--red);
}
.qv-overlay {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  transition: bottom 0.25s ease;
  z-index: 2;
}
.product-card-v2:hover .qv-overlay {
  bottom: 12px;
}
.qv-btn {
  background: rgba(31, 41, 55, 0.9);
  color: #fff;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.2s ease;
}
.qv-btn:hover {
  background: var(--red);
}
.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-cat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-name a {
  color: var(--dark);
  text-decoration: none;
}
.product-name a:hover {
  color: var(--red);
}
.product-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}
.product-rating-row .stars {
  color: #f59e0b;
}
.product-rating-row .rating-count {
  color: var(--text-muted);
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  margin-top: auto;
}
.price-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red);
}
.price-original {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
}
.product-footer {
  display: flex;
  gap: 8px;
}
.qty-wrap {
  display: flex;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  width: 90px;
}
.qty-btn {
  width: 28px;
  background: transparent;
  border: none;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.qty-btn:hover {
  background: #e2e8f0;
}
.qty-input {
  width: 34px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  outline: none;
}
.add-cart-btn {
  flex-grow: 1;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.add-cart-btn:hover {
  background: var(--green-hover);
}
.add-cart-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Pagination */
.pagination .page-item .page-link {
  color: var(--dark);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  margin: 0 4px;
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.2s;
}
.pagination .page-item.active .page-link {
  background-color: var(--red);
  border-color: var(--red);
  color: #fff;
}
.pagination .page-item .page-link:hover {
  background-color: #fee2e2;
  color: var(--red);
}

/* Toast Notifications */
.toast-notification {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  padding: 12px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  transform: translateX(120%);
  transition: transform 0.3s ease-out;
  border-left: 4px solid var(--green);
}
.toast-notification.error {
  border-left-color: var(--red);
}
.toast-notification.info {
  border-left-color: #0284c7;
}
.toast-notification.show {
  transform: translateX(0);
}

/* Offcanvas Cart */
.offcanvas {
  max-width: 420px;
}
.cart-item img {
  border: 1px solid var(--gray-border);
}

/* Quick View Radio / Addons */
.quickview-choice {
  cursor: pointer;
  transition: all 0.2s;
}
.quickview-choice.active {
  background-color: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ==========================================================================
   PWA Components: Install Banner & Offline Mode
   ========================================================================== */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 460px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2), 0 0 1px 1px rgba(0,0,0,0.05);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1070;
  animation: slideUpPwa 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpPwa {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(30, 108, 65, 0.25);
  flex-shrink: 0;
}

.pwa-content {
  flex-grow: 1;
}

.pwa-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 2px;
}

.pwa-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.pwa-btn-install {
  background: linear-gradient(135deg, #1E6C41, #2d9e5f);
  color: #ffffff;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pwa-btn-install:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(30, 108, 65, 0.35);
  color: #ffffff;
}

.pwa-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  padding: 4px;
  cursor: pointer;
}

.pwa-btn-close:hover {
  color: #475569;
}

/* Offline Indicator Bar */
.offline-banner {
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
  display: none;
  position: sticky;
  top: 0;
  z-index: 1080;
}

/* ==========================================================================
   Order Tracking Timeline Modal
   ========================================================================== */
.tracking-timeline-wrapper {
  position: relative;
  padding: 20px 0;
}

.tracking-step {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 24px;
}

.tracking-step:last-child {
  margin-bottom: 0;
}

.tracking-step-line {
  position: absolute;
  left: 20px;
  top: 36px;
  bottom: -24px;
  width: 3px;
  background: #e2e8f0;
  z-index: 1;
}

.tracking-step.completed .tracking-step-line,
.tracking-step.active .tracking-step-line {
  background: #1E6C41;
}

.tracking-step-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  z-index: 2;
  flex-shrink: 0;
  margin-right: 16px;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px #e2e8f0;
  transition: all 0.3s ease;
}

.tracking-step.completed .tracking-step-icon {
  background: #1E6C41;
  color: #ffffff;
  box-shadow: 0 0 0 1px #1E6C41;
}

.tracking-step.active .tracking-step-icon {
  background: #ea580c;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.2);
  animation: pulseTracking 1.8s infinite;
}

@keyframes pulseTracking {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.tracking-step-content {
  flex-grow: 1;
  padding-top: 6px;
}

.tracking-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.tracking-step-time {
  font-size: 0.78rem;
  color: #64748b;
}

.tracking-rider-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tracking-rider-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dcfce7;
  color: #1E6C41;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

