@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #F86302;
  --primary-hover: #E45700;
  --primary-soft: #FF9B52;
  --primary-bg: #FFF1E8;
  --dark-base: #FFF8F3;
  --dark-card: #FFFFFF;
  --text-primary: #1F2937;
  --text-muted: #6B7280;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 24px -8px rgba(15,23,42,0.12);
  --shadow-hover: 0 20px 30px -10px rgba(15,23,42,0.18);
  --border: #E5E7EB;
  --glass: rgba(255,255,255,0.45);
  --glass-dark: rgba(255,255,255,0.75);
  --accent: #00cec9;
  --text-light: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(180deg, #fff8f3 0%, #fffdf9 45%, #fff1e8 100%);
  min-height: 100vh;
}

/* Navbar (unchanged from your original, but ensure variables are defined) */
.navbar {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: var(--glass-dark);
  border-bottom: 1px solid rgba(248, 99, 2, 0.12);
  box-shadow: var(--shadow);
  z-index: 1030;
}

.navbar-toggler {
  border: 1px solid rgba(248, 99, 2, 0.18);
  background: linear-gradient(135deg, rgba(248, 99, 2, 0.1), rgba(0, 206, 201, 0.08));
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 10px 24px -14px rgba(248, 99, 2, 0.45);
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 99, 2, 0.32);
  box-shadow: 0 16px 30px -16px rgba(248, 99, 2, 0.5);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(248, 99, 2, 0.14);
}

.navbar-toggler-icon {
  width: 1.4rem;
  height: 1.4rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28248, 99, 2, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler:hover .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 206, 201, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--text-light);
}

.nav-search-group .input-group-text {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(248, 99, 2, 0.18);
  border-right: none;
  border-radius: 999px 0 0 999px;
}

.nav-search-group .form-control {
  border: 1px solid rgba(248, 99, 2, 0.18);
  border-left: none;
  border-right: none;
  background: rgba(255,255,255,0.92);
}

.nav-search-group .btn {
  border-radius: 0 999px 999px 0;
  border: 1px solid rgba(248, 99, 2, 0.18);
  border-left: none;
}

.navbar .dropdown-menu {
  border-radius: 18px;
  border: 1px solid rgba(248, 99, 2, 0.12);
  box-shadow: 0 22px 55px -40px rgba(15,23,42,0.45);
}

.nav-link {
  color: #374151 !important;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary) !important;
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section with Overlay */
.hero {
  position: relative;
  background: linear-gradient(135deg, #fff3eb 0%, #ffe0cc 50%, #ffd3b0 100%);
  background-size: cover;
  background-position: center;
  padding: 120px 0;
  text-align: center;
  margin-bottom: 50px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(248,99,2,0.08));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 8px 24px rgba(248,99,2,0.12);
  color: #1f2937;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.95;
  color: #4b5563;
}

.hero-search {
  max-width: 720px;
  margin: 0 auto 18px auto;
}

.hero-search .input-group {
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 20px 45px -30px rgba(15,23,42,0.35);
  border: 1px solid rgba(248, 99, 2, 0.14);
}

.hero-search .form-control:focus {
  box-shadow: none;
}

.hero-cta {
  margin-top: 6px;
}

.hero-hub {
  padding: 110px 0 40px 0;
  margin-bottom: 18px;
}

.home-hub-card {
  text-align: left;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(248, 99, 2, 0.14);
  border-radius: 26px;
  box-shadow: 0 26px 60px -44px rgba(15,23,42,0.55);
  padding: 18px 18px 14px 18px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hub-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hub-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 0.9rem;
  box-shadow: 0 16px 30px -18px rgba(248,99,2,0.55);
}

.hub-title {
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #111827;
  box-shadow: 0 16px 30px -24px rgba(15,23,42,0.45);
  text-decoration: none;
  transition: all 0.25s ease;
}

.hub-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(248,99,2,0.18);
  color: var(--primary);
}

.hub-search {
  margin-bottom: 12px;
}

.hub-search-group {
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 20px 45px -34px rgba(15,23,42,0.35);
  border: 1px solid rgba(248, 99, 2, 0.14);
}

.hub-search-group .form-control:focus {
  box-shadow: none;
}

.hub-search-group .btn {
  border-radius: 0;
}

.hub-search-group .btn:last-child {
  border-radius: 0 999px 999px 0;
}

.hub-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px 2px;
  -webkit-overflow-scrolling: touch;
}

.hub-chips::-webkit-scrollbar { height: 6px; }
.hub-chips::-webkit-scrollbar-thumb {
  background: rgba(248,99,2,0.25);
  border-radius: 999px;
}

.hub-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  transition: all 0.25s ease;
}

.hub-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 99, 2, 0.10);
  color: var(--primary);
}

.hub-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(248,99,2,0.22);
}

.hub-chip.active {
  border-color: rgba(248,99,2,0.28);
  background: linear-gradient(135deg, rgba(248,99,2,0.14), rgba(0,206,201,0.10));
}

.hub-chip.active .hub-chip-icon {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
}

.home-filters {
  margin-top: -28px;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(248, 99, 2, 0.12);
  box-shadow: 0 22px 55px -36px rgba(15,23,42,0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-hub .home-filters {
  margin-top: 0;
}

.home-filters .form-control,
.home-filters .form-select {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.home-filters .form-control:focus,
.home-filters .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(248, 99, 2, 0.12);
  border-color: rgba(248, 99, 2, 0.35);
}

.home-badges {
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}

.badge-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px -32px rgba(15,23,42,0.35);
}

.badge-ico {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(248, 99, 2, 0.16), rgba(0, 206, 201, 0.12));
  color: #f86302;
  border: 1px solid rgba(248, 99, 2, 0.12);
}

.btn-modern {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border: none;
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  color: white;
  text-decoration: none;
  display: inline-block;
}

.btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: white;
}

/* Product Cards */
.product-card {
  border: 1px solid rgba(248,99,2,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--dark-card);
  box-shadow: var(--shadow-lg);
  height: 100%;
}

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

.product-card .card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  height: auto;
}

@supports not (aspect-ratio: 1 / 1) {
  .product-card .card-img-wrapper {
    height: 200px;
  }
}

.product-card .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-top {
  transform: scale(1.05);
}

.stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 30px;
  background: rgba(255,255,255,0.72);
  color: #1f2937;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.product-card .card-body {
  padding: 1rem;
}

.product-card .card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(45deg, #00b894, #00cec9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stock-info {
  font-size: 0.85rem;
  font-weight: 500;
}

.category {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.product-card .card-footer {
  padding: 0 1rem 1rem 1rem;
  background: transparent;
  border: none;
}

.product-grid {
  gap: 1.5rem 0;
}

.btn-outline-primary {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: all 0.3s;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-success {
  background: linear-gradient(45deg, #00b894, #00cec9);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(45deg, #00a187, #00b894);
  transform: translateY(-2px);
}

/* Product detail page */
.product-detail-card {
  border-radius: 18px;
}

.product-gallery .product-main-image {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.8);
}

.product-gallery .product-main-image img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-thumbs {
  display: flex;
  gap: 0.6rem;
}

.product-thumbs .thumb {
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: white;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumbs .thumb.active {
  border-color: rgba(248, 99, 2, 0.65);
  transform: translateY(-1px);
}

.product-add-btn {
  background: linear-gradient(45deg, #f86302, #ff9b52);
  border: none;
}

.product-add-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.related-img {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.85);
}

.related-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.delivery-tile {
  border: 1px solid rgba(248, 99, 2, 0.10);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  background: rgba(255,255,255,0.9);
}

.tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 99, 2, 0.12);
  color: #f86302;
}

/* Category chips */
.category-strip {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.25rem 0.15rem 0.6rem 0.15rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.category-strip::-webkit-scrollbar {
  height: 8px;
}

.category-strip::-webkit-scrollbar-thumb {
  background: rgba(31, 41, 55, 0.12);
  border-radius: 999px;
}

.category-chip {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 99, 2, 0.14);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.35);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.category-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 99, 2, 0.35);
}

.category-chip.active {
  background: linear-gradient(45deg, rgba(248, 99, 2, 0.14), rgba(0, 206, 201, 0.12));
  border-color: rgba(0, 206, 201, 0.55);
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 99, 2, 0.10);
  color: #f86302;
}

.category-chip.active .category-icon {
  background: rgba(0, 206, 201, 0.16);
  color: #00a8a3;
}

.category-label {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .navbar-brand { font-size: 1.3rem; }
  .home-filters { margin-top: -18px; padding: 0.9rem; }
  .badge-card { padding: 0.9rem 1rem; }
  .badge-ico { width: 44px; height: 44px; }
  .navbar-collapse {
    margin-top: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.88);
    box-shadow: 0 18px 38px -24px rgba(15,23,42,0.28);
    border: 1px solid rgba(248, 99, 2, 0.08);
  }
  .price-wrapper { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .btn-outline-primary, .btn-success { padding: 8px 12px; font-size: 0.85rem; }
  .category-icon { width: 36px; height: 36px; }
  .category-label { font-size: 0.9rem; }
}

/* Fade-in animation */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-grid .product-card {
  animation: fadeIn 0.6s ease forwards;
}

.product-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.product-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.product-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.product-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
.product-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.product-grid .product-card:nth-child(6) { animation-delay: 0.3s; }
