@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Hind+Madurai:wght@400;700&display=swap');

:root {
  --primary-navy: #001D3D;
  --secondary-white: #FFFFFF;
  --accent-red: #D90429;
  --light-gray: #F8F9FA;
  --text-dark: #212529;
  --text-muted: #6C757D;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Montserrat', 'Hind Madurai', sans-serif;
  background-color: var(--secondary-white);
  background-image: url('assets/scales.png');
  background-size: 400px;
  background-attachment: fixed;
  background-repeat: repeat;
  background-blend-mode: overlay;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.96);
  z-index: -1;
}

/* Language Selector */
.lang-toggle {
  background: var(--primary-navy);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.3s;
}

.lang-toggle:hover {
  background: var(--accent-red);
}

/* Header & Nav */
header {
  background: var(--secondary-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  border-bottom: 1px solid #eee;
}

.address-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.mid-header {
  padding: 15px 5%;
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.logo-img {
  height: 55px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  color: var(--primary-navy);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logo-subtitle {
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Search */
.search-container {
  flex-grow: 1;
  max-width: 650px;
  margin: 0 20px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f3f5;
  border-radius: 50px;
  padding: 4px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.search-wrapper:focus-within {
  background: #fff;
  border-color: var(--primary-navy);
  box-shadow: 0 0 0 4px rgba(0, 29, 61, 0.1);
}

.search-icon {
  color: var(--text-muted);
  margin-left: 15px;
  min-width: 20px;
}

.search-bar {
  width: 100%;
  padding: 12px 15px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.search-btn {
  background: var(--primary-navy);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: var(--accent-red);
}

/* User Actions */
.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-btn {
  background: transparent;
  border: 1px solid #e9ecef;
  padding: 10px 16px;
  border-radius: 30px;
  cursor: pointer;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.header-btn:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  transform: translateY(-2px);
}

.cart-btn-style {
  background: var(--primary-navy);
  color: white;
  border-color: var(--primary-navy);
}

.cart-btn-style:hover {
  background: #00152e;
  border-color: #00152e;
  transform: translateY(-2px);
}

.cart-badge {
  background: var(--accent-red);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  position: absolute;
  top: -6px;
  right: -8px;
  border: 2px solid var(--primary-navy);
}

/* Sticky Category Scroll */
.category-wrapper {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  padding: 15px 5%;
  gap: 15px;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  padding: 8px 25px;
  border-radius: 25px;
  background: var(--light-gray);
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
  border: 1px solid transparent;
}

.cat-chip.active {
  background: var(--primary-navy);
  color: #fff;
}

.cat-chip:hover:not(.active) {
  border-color: var(--primary-navy);
}

/* Notification Banner */
.notice-banner {
  background: #FFF5F5;
  color: var(--accent-red);
  font-size: 0.75rem;
  padding: 10px 5%;
  text-align: center;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 40px 5%;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-navy);
  text-align: center;
}

/* Feature Grid */
.feature-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 25px;
  margin-top: 40px;
  padding: 10px 10px 30px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.feature-grid::-webkit-scrollbar {
  height: 6px;
}

.feature-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.feature-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  text-align: center;
  padding: 35px 25px;
  border-radius: 16px;
  background: var(--secondary-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-navy);
}

.feature-card svg {
  margin: 0 auto 20px;
  transition: transform 0.3s ease;
}

.feature-card:hover svg {
  transform: scale(1.1);
}

.feature-card h4 {
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-navy);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sidebar Cart */
.cart-sidebar {
  position: fixed;
  right: -100%;
  top: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #fff;
  z-index: 2000;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 25px;
  background: var(--primary-navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-footer {
  padding: 25px;
  border-top: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

/* Map Integration */
.map-container {
  height: 400px;
  background: #eee;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 30px;
}

/* WhatsApp Icon */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #25D366;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  text-decoration: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .mid-header {
    flex-wrap: wrap;
    gap: 15px;
  }

  .logo-text {
    display: none;
  }

  .search-container {
    order: 3;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .btn-text {
    display: none;
  }

  .header-btn {
    padding: 10px;
  }

  .section-title {
    font-size: 1.5rem;
  }
}