/* =========================================================
   GLOBAL WRAPPER (page container for /products)
   ========================================================= */
.catalog-wrapper {
  padding-top: 120px;
  padding-bottom: 4rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  background-color: #fff;
}

/* =========================================================
   HERO / PRODUCT BANNER CAROUSEL
   ========================================================= */
.product-hero {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
}

.hero-slider {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 24px 40px -8px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.05);
  max-width: 1280px;
  margin: 0 auto;
}

.hero-track {
  display: flex;
  will-change: transform;
  transition: transform 0.6s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 240px;
  background: transparent;
}

@media (min-width: 768px) {
  .hero-slide {
    height: 320px;
  }
}

.hero-media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  line-height: 0;
  background: #000;
  overflow: hidden;
}

/* desktop & mobile images in the same slide */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* show desktop by default */
.hero-img-desktop {
  display: block;
}

/* hide mobile by default */
.hero-img-mobile {
  display: none;
}

@media (max-width: 767px) {
  /* on phones: use mobile art, hide desktop */
  .hero-img-desktop {
    display: none;
  }
  .hero-img-mobile {
    display: block;
  }
  .hero-slide {
    height: 210px; /* a bit shorter for phones */
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 1rem;
  color: #fff;
  background: transparent;
  z-index: 2;
}

.hero-overlay-inner {
  max-width: 90%;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-heading {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.hero-subtext {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #e5e7eb;
}

@media (min-width: 768px) {
  .hero-heading {
    font-size: 1.75rem;
    font-weight: 700;
  }
  .hero-subtext {
    font-size: 1rem;
  }
}

/* Dots */
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: auto;
  z-index: 5;
}

.hero-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s;
}
.hero-dot.active {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.15s, box-shadow 0.15s;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55);
}

.hero-prev {
  left: 0.75rem;
}
.hero-next {
  right: 0.75rem;
}

@media (min-width: 768px) {
  .hero-arrow {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  .hero-prev {
    left: 1rem;
  }
  .hero-next {
    right: 1rem;
  }
}

/* =========================================================
   SECTION HEADER
   ========================================================= */
.catalog-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.catalog-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.catalog-breadcrumb {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
}

.catalog-breadcrumb li a {
  color: #6366f1;
  text-decoration: none;
}

/* =========================================================
   CATEGORY FILTER TABS
   ========================================================= */
.catalog-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 2rem auto 2.5rem;
  padding: 0 1rem;
}

.catalog-tab-pill {
  display: inline-block;
  min-width: 84px;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 500;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.15s;
}

.catalog-tab-pill:hover {
  box-shadow: 0 10px 18px -5px rgba(0, 0, 0, 0.1);
}

.catalog-tab-pill.active {
  border: none;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0072ff 0%, #00c6ff 40%, #00ff99 100%);
  box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   PRODUCT GRID
   ========================================================= */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  gap: 1.8rem 2rem;
  justify-content: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */
.product-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 535px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12),
    0 0 0 3px rgba(59, 130, 246, 0.15);
}

.product-image-wrapper {
  width: 100%;
  height: 200px;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem 1rem 0 0;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.03);
  filter: brightness(1.03);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.25rem 1.5rem;
  color: #374151;
  background-color: #fff;
}

.product-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.product-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.product-details-scroll {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
}

.product-desc {
  margin-bottom: 0.75rem;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.55;
}

.product-desc ul {
  margin: 0 0 0.5rem 1rem;
  padding: 0;
  list-style: disc;
}

.product-desc li {
  margin-bottom: 0.4rem;
}

.product-dosage {
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-dosage strong {
  color: #111827;
  font-weight: 600;
}

.product-footer {
  flex-shrink: 0;
  padding-top: 0.5rem;
}

.product-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5b21b6;
  text-decoration: none;
  transition: all 0.2s ease;
}

.product-cta:hover {
  color: #7c3aed;
  text-decoration: underline;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.4;
}

.pagination-wrap {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.product-details-scroll {
  position: relative;
  flex: 1;
  overflow: hidden; /* not auto now, we’re clipping */
  margin-bottom: 0.75rem;
}

.product-details-scroll::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 90%);
}


/* Hard reset for slider arrows so global button styles don't break them */
.product-hero .hero-arrow {
  all: unset;                 /* wipe framework / theme button styles */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;

  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.15s, box-shadow 0.15s;
}

.product-hero .hero-arrow-icon {
  font-size: 1.2rem;   /* control the arrow size */
  line-height: 1;
}

.product-hero .hero-prev {
  left: 0.75rem;
}
.product-hero .hero-next {
  right: 0.75rem;
}

@media (min-width: 768px) {
  .product-hero .hero-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
}