/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  color: #222;
  background-color: #f9f9f9;
  line-height: 1.6;
}

/* Navbar container */
.navbar {
  background-color: #5e2b97;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 6px 20px;
}

/* Row 1 (logo + site name + hamburger for mobile) */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-logo {
  height: 65px;
  width: auto;
  border-radius: 6px;
}

.site-text {
  font-size: 22px;
  font-weight: bold;
}

/* Hide hamburger by default (only mobile shows it) */
.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Row 2 (unit text + logo) */
.second-row {
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 2px;
  margin: 3px 20px 4px 0;
}

.unit-text {
  font-size: 12px;
  font-weight: bold;
}

.pashas-logo {
  height: 75px;
  width: auto;
}

/* Nav links (row 3) */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 5px;
  flex: 1;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.35rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffeb3b;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: #ffeb3b;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Desktop */
@media (min-width: 769px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-links {
    position: absolute;  
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .nav-links a {
    font-size: 19px;
    font-weight: 500;
    color: #fff;
  }
}

/* Mobile only */
@media (max-width: 768px) {
  .navbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .top-row {
    width: 100%;
  }

  .brand {
    gap: 8px;
    text-align: center;
  }

  .main-logo {
    height: 55px;
  }

  .site-text {
    font-size: 18px;
  }

  .hamburger {
    display: block;
  }

  .second-row {
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 5px;
    width: 100%;
    text-align: center;
  }

  .unit-text {
    font-size: 20px;
  }

  .pashas-logo {
    height: 70px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    display: inline-block;
    padding: 5px 0;
  }
}


/* ===================== */
/* CATEGORY FILTER       */
/* ===================== */
.filter-section {
  padding: 1rem 2rem;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}

#categoryFilter {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 2px solid #5b2ca2;
  border-radius: 5px;
  outline: none;
}

/* LOADER */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #5b2ca2; /* purple accent */
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 30px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===================== */
/* PRODUCTS GRID         */
/* ===================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 260px)); /* fixed card size */
  justify-content: center;
  gap: 20px;
  padding: 1rem;
}

/* PRODUCT CARD */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  width: 260px;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: contain; /* prevents zoom */
  background: #f9f9f9;
}

.product-details {
  padding: 12px 14px;
  text-align: center;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.product-qty-range {
  font-size: 0.9rem;
  color: #555;
  margin: 2px 0;
}

.product-price-range {
  font-size: 1rem;
  font-weight: bold;
  color: #7b3fe4;
}

/* ===================== */
/* STATUS MESSAGE        */
/* ===================== */
.status-msg {
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  color: #5b2ca2;
}

/* ===================== */
/* POPUP OVERLAY         */
/* ===================== */
.product-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

/* POPUP BOX */
.product-popup {
  background: #fff;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 20px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: fadeInUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* POPUP CLOSE BUTTON (Sticky) */
.popup-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  color: #333;
}

.popup-close:hover {
  color: #000;
}

/* POPUP IMAGE (No Zoom) */
.popup-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 14px;
}

/* POPUP TITLE */
.popup-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  text-align: center;
}

/* POPUP VARIANTS */
.popup-variants {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-variant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8f8ff;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid #e0e0ff;
}

.variant-name {
  color: #444;
  font-weight: 500;
}

.variant-price {
  background: #7b3fe4;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 600px) {
  .nav-links {
    gap: 1rem;
  }
  .product-img {
    height: 150px;
  }
}

/* About Us Section with Map */
.about-flex {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap; /* stack on small screens */
  padding: 40px 20px 20px 20px; /* reduced bottom padding from 40px to 20px */
  background-color: #f8f8f8;
}

.about-text {
  flex: 1 1 400px; /* flexible width, min 400px */
}

.about-text h3 {
  margin-bottom: 15px;
  color: #5e2b97;
}

.about-map {
  flex: 1 1 400px;
}

.about-map iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 3px solid #5e2b97; /* purple border */
  border-radius: 6px;
}

footer {
  background-color: #5e2b97;
  color: #fff;
  text-align: center;
  padding: 0px;
}
