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

:root {
  --fm-primary: #2563eb;
  --fm-primary-light: #3b82f6;
  --fm-primary-bg: #dbeafe;
  --fm-secondary: #dc2626;
  --fm-secondary-light: #ef4444;
  --fm-dark: #141414;
  --fm-cream: #f7f7f8;
  --fm-cream-dark: #ebebed;
  --fm-text: #141414;
  --fm-text-muted: #6b7280;
  --fm-border: #e5e7eb;
  --fm-success: #16a34a;
  --fm-warning: #f59e0b;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--fm-cream);
  color: var(--fm-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
}

/* Top Bar */
.top-bar {
  background-color: var(--fm-dark);
  color: white;
  font-size: 0.85rem;
  padding: 0.5rem 0;
}
.top-bar a { color: white; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }

/* Navbar */
.navbar-Rufadex  {
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fm-border);
}
.navbar-Rufadex  .navbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--fm-text);
}
.navbar-Rufadex  .nav-link {
  color: var(--fm-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.navbar-Rufadex  .nav-link:hover,
.navbar-Rufadex  .nav-link.active {
  color: var(--fm-primary);
}
.brand-logo {
  width: 40px;
  height: 40px;
  background-color: var(--fm-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 0.5rem;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--fm-secondary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.icon-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
  position: relative;
  color: var(--fm-text);
}
.icon-btn:hover { background-color: var(--fm-cream-dark); }

/* Search bar */
.search-bar-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  border-top: 1px solid var(--fm-border);
}
.search-bar-wrap.show { max-height: 80px; padding: 0.75rem 0; }
.search-bar {
  width: 100%;
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  outline: none;
  background: var(--fm-cream);
}
.search-bar:focus { border-color: var(--fm-primary); box-shadow: 0 0 0 3px var(--fm-primary-bg); }

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 480px;
}
.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20,20,20,0.88), rgba(20,20,20,0.55), transparent);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
  max-width: 540px;
}
.hero-badge {
  display: inline-block;
  background-color: var(--fm-secondary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-content h1 {
  color: white;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
}
.hero-content p { color: rgba(255,255,255,0.8); font-size: 1.1rem; }
.btn-fm-primary {
  background-color: var(--fm-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-fm-primary:hover { opacity: 0.9; color: white; }
.btn-fm-outline {
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  background: transparent;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-fm-outline:hover { background: rgba(255,255,255,0.1); color: white; }
.btn-fm-accent {
  background-color: var(--fm-secondary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-fm-accent:hover { opacity: 0.9; color: white; }

/* Feature bar */
.feature-bar {
  background: white;
  border-bottom: 1px solid var(--fm-border);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}
.feature-icon {
  width: 40px;
  height: 40px;
  background-color: var(--fm-primary-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--fm-primary);
  font-size: 1.1rem;
}
.feature-item h6 { margin: 0; font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600; }
.feature-item small { color: var(--fm-text-muted); font-size: 0.78rem; }

/* Section */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 { margin-bottom: 0; }
.section-header p { margin: 0.25rem 0 0; color: var(--fm-text-muted); }
.section-header a { color: var(--fm-primary); font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.section-header a:hover { text-decoration: underline; }

/* Category card */
.category-card {
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  display: block;
}
.category-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.category-card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s;
}
.category-card:hover img { transform: scale(1.08); }
.category-card .card-body { text-align: center; padding: 0.75rem; }
.category-card .card-body h6 { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; color: var(--fm-text); }
.category-card .card-body small { color: var(--fm-text-muted); }

/* Product card */
.product-card {
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  transition: box-shadow 0.3s;
}
.product-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.badge-sale { background-color: var(--fm-secondary); }
.badge-new { background-color: var(--fm-success); }
.badge-default { background-color: var(--fm-primary); }
.product-card .card-body { padding: 1rem; }
.product-category { font-size: 0.75rem; color: var(--fm-text-muted); text-transform: capitalize; margin-bottom: 0.25rem; }
.product-card .card-body h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0;
}
.product-card .card-body h6 a {
  color: var(--fm-text);
  text-decoration: none;
  transition: color 0.2s;
}
.product-card .card-body h6 a:hover { color: var(--fm-primary); }
.product-rating {
  font-size: 0.78rem;
  color: var(--fm-text-muted);
  margin-top: 0.25rem;
}
.product-rating i { color: var(--fm-warning); }
.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 0.75rem;
}
.product-price { font-size: 1.15rem; font-weight: 700; }
.product-price-old { font-size: 0.85rem; color: var(--fm-text-muted); text-decoration: line-through; margin-left: 0.5rem; }
.product-unit { font-size: 0.75rem; color: var(--fm-text-muted); }
.btn-add-cart {
  width: 100%;
  margin-top: 0.75rem;
  background-color: var(--fm-primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
  cursor: pointer;
}
.btn-add-cart:hover { opacity: 0.9; }

/* Deals Banner */
.deals-banner {
  background-color: var(--fm-primary);
  border-radius: 16px;
  padding: 3rem;
  color: white;
}
.deals-banner h2 { color: white; margin-bottom: 0.5rem; }
.deals-banner p { color: rgba(255,255,255,0.8); margin-bottom: 0; }

/* Muted BG */
.bg-muted { background-color: var(--fm-cream-dark) !important; }

/* Footer */
.footer-section {
  background: var(--fm-dark);
  color: white;
  padding: 3rem 0;
}
.footer-section h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-section ul li a:hover { color: white; }
.footer-section .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}
.footer-contact li i { color: var(--fm-primary-light); }

/* Page header */
.page-header-blue {
  background-color: var(--fm-primary);
  color: white;
  padding: 3rem 0;
  text-align: center;
}
.page-header-blue h1 { color: white; }
.page-header-blue p { color: rgba(255,255,255,0.8); }

/* Filter pills */
.filter-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter-pill.active {
  background-color: var(--fm-primary);
  color: white;
}
.filter-pill:not(.active) {
  background-color: var(--fm-cream-dark);
  color: var(--fm-text-muted);
}
.filter-pill:not(.active):hover { background-color: #d8d2c9; }

/* Cart item */
.cart-item {
  /*display: flex;*/
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  background: white;
  margin-bottom: 1rem;
}
.cart-item img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-info h6 { font-family: 'Inter', sans-serif; font-weight: 600; margin-bottom: 0.25rem; }
.cart-item-info h6 a { color: var(--fm-text); text-decoration: none; }
.cart-item-info h6 a:hover { color: var(--fm-primary); }
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  overflow: hidden;
}
.qty-control button {
  background: none;
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-control button:hover { background-color: var(--fm-cream-dark); }
.qty-control span {
  width: 2rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
}
.btn-remove {
  background: none;
  border: none;
  color: var(--fm-text-muted);
  padding: 0.3rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove:hover { background-color: #fde8e8; color: #dc3545; }

/* Order summary */
.order-summary {
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  background: white;
  padding: 1.5rem;
}
.order-summary h5 { margin-bottom: 1rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.summary-row .label { color: var(--fm-text-muted); }
.summary-total {
  border-top: 1px solid var(--fm-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
}
.free-delivery-hint {
  background-color: var(--fm-primary-bg);
  color: var(--fm-primary);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Checkout form */
.checkout-card {
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  background: white;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.checkout-card h5 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.checkout-card h5 i { color: var(--fm-primary); }
.form-control-fm {
  width: 100%;
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--fm-cream);
}
.form-control-fm:focus {
  border-color: var(--fm-primary);
  box-shadow: 0 0 0 3px var(--fm-primary-bg);
}

/* Success */
.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background-color: rgba(22,163,74,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon i { font-size: 2.5rem; color: var(--fm-success); }

/* Product detail */
.product-detail-img {
  border: 1px solid var(--fm-border);
  border-radius: 16px;
  overflow: hidden;
}
.product-detail-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-badge {
  display: inline-block;
  background: var(--fm-primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.detail-price { font-size: 2rem; font-weight: 700; }
.detail-price-old { font-size: 1.2rem; color: var(--fm-text-muted); text-decoration: line-through; }
.detail-stars i { font-size: 1rem; }
.info-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  padding: 0.75rem;
}
.info-box i { font-size: 1.25rem; color: var(--fm-primary); }
.info-box h6 { font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 600; margin: 0; }
.info-box small { color: var(--fm-text-muted); font-size: 0.78rem; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 0; }
.empty-state i { font-size: 3rem; color: var(--fm-text-muted); margin-bottom: 1rem; }

/* Toast animation */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
