/* ✅ Global Box-Sizing Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Reset & Base */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #ebe3d8;
  color: #333;
}

html, body {
  overflow-x: hidden;
}

.banner-img {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  content: url('/images/banner-desktop.jpg');
}

@media (max-width: 768px) {
  .banner-img {
    content: url('/images/banner-mobile.jpg?v=2');
    height: auto;
    max-height: 25vh; /* 25% of the viewport height */
  }
}

/* Navigation */
.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #ebe3d8;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0 1rem;
}

.main-nav a {
  display: inline-block;
  padding: 1rem;
  text-decoration: none;
  color: #3344dd;
  font-weight: bold;
}

/* Main Content */
.intro {
  padding: 2rem;
  text-align: center;
}

.intro h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #a12b45;
}

.intro p {
  font-size: 1.1rem;
  color: #555;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background-color: #e3cebe;
  color: #5c2b33;
  margin-top: 2rem;
}

.homepage-section {
  padding: 40px;
  text-align: center;
}

.preview-block {
  display: inline-block;
  max-width: 300px;
  margin-top: 20px;
  text-decoration: none;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: visible;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.preview-block img {
  width: 100%;
  height: auto;
  display: block;
}

.preview-block p {
  padding: 12px;
  color: #333;
  font-size: 14px;
}

.preview-button {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 16px;
  background-color: #f1d2c2;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 👈 3 columns by default */
  gap: 20px;
  padding: 20px 10px;
  justify-items: center;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.product {
  width: 100%;
  max-width: 300px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
  overflow: hidden;
  margin: 0 auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.product img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  max-width: 100%;
}

.product h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0;
  color: #333;
}

/* ✅ Center navigation globally */
.main-nav {
  text-align: center;
}

/* ✅ Side-by-side layout for homepage preview blocks */
.preview-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0 auto;
  margin-top: 20px;
  max-width: 1200px;
}

/* ✅ Responsive stacking on smaller screens */
@media (max-width: 768px) {
  .preview-section {
    flex-direction: column;
    align-items: center;
  }
}

/* ✅ Contact & Subscribe Form Styling */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

/* ✅ Centered row labels for grouped preview blocks */
.row-title {
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: 1.rem;
  margin: 20px 0 10px 0;
}

.view-button {
  background-color: #edddce;
  color: #333;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}

.purchase-button {
  background-color: #f5d0d0;
  color: #333;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}

.contact-link {
  display: inline-block;
  color: #3344dd;
  text-decoration: underline;
  margin-top: 8px;
  font-size: 14px;
  font-weight: normal;
}

.product h3 {
  margin-top: 12px;
  color: #000;
  font-size: 14px;
  font-weight: 600;
}

/* ✅ Fixed Width Container */
.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 480px) {
  .site-container {
    padding: 0 8px;
  }
}


.category-links a:hover {
  text-decoration: underline;
}

.top-icons {
  position: absolute;
  top: 12px;
  right: 20px;
  display: flex;
  gap: 16px;
  z-index: 999;
}

.top-icons .icon {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.banner {
  position: relative;
}

.top-icons .icon:hover {
  opacity: 1;
}

/* ✅ New Category Dropdown Menu */
.category-wrapper {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 30px auto;
  flex-wrap: wrap;
  max-width: 1200px;
}

.category {
  position: relative;
  font-weight: bold;
  font-size: 16px;
}

.category-title {
  cursor: pointer;
  padding: 12px;
  border-radius: 6px;
  background-color: #f1d2c2;
  color: #333;
}

.highlight-link {
  color: red !important;
  font-weight: bold;
  text-decoration: underline;
}

.subcategory-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 1000;
}

.category:hover .subcategory-menu {
  display: block;
}

.subcategory-menu a {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-weight: normal;
  white-space: nowrap;
}

.subcategory-menu a:hover {
  background-color: #f5d0d0;
  color: #000;
}

.subcategory-menu.show {
  display: block;
}

.subcategory-menu {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.subcategory-menu.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}



/* Desktop override */

.mySwiper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.mySwiper .swiper-wrapper {
  display: flex;              /* Critical */
  transition-property: transform;
  box-sizing: content-box;
}

.mySwiper .swiper-slide {
  flex-shrink: 0;             /* Critical */
  width: 100%;
  height: auto;
}

.mySwiper .swiper-slide img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr; /* 👈 1 column for small screens */
  }
}

.index-page .preview-block a {
  font-size: 12px; /* Adjust as needed */
}