
/* ============================================
   PRODUCTS PAGE — products.css
   Madhav Polymers Products Listing Page
   ============================================ */

/* ============================================
   PRODUCTS HERO
   ============================================ */
.prod-hero {
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
}
.prod-hero-wrap {
  position: relative;
  width: 100%;
  min-height: 340px;
}
.prod-hero-bg {
  width: 100%;
  min-height: 340px;
  height: 340px;
  object-fit: cover;
  object-position: center right;
  display: block;
}
.prod-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.97) 0%,
    rgba(255,255,255,0.90) 38%,
    rgba(255,255,255,0.55) 58%,
    rgba(255,255,255,0.10) 78%,
    transparent 100%
  );
  pointer-events: none;
}
.prod-hero-content {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 52%;
  max-width: 700px;
  padding: 36px 32px 36px clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}
.prod-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
  margin-bottom: 16px;
}
.prod-breadcrumb a { color: #555; transition: color 0.2s; }
.prod-breadcrumb a:hover { color: var(--orange); }
.bc-sep { color: #aaa; }
.prod-hero-title {
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--purple);
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.ph-orange { color: var(--orange); }
.prod-hero-desc {
  font-size: 14.5px;
  color: #4a4a68;
  line-height: 1.7;
  margin-bottom: 22px;
}
.prod-hero-badges {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.prod-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--purple);
  line-height: 1.4;
}
.prod-badge-icon {
  width: 38px; height: 38px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.9);
}

/* ============================================
   BROWSE BY CATEGORY TABS
   ============================================ */
.cat-tabs-section {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 28px;
}
.cat-tabs-wrap {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}
.cat-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; flex-shrink: 0;
}
.cat-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #f5f5f7;
  cursor: pointer;
  transition: all 0.22s;
  flex: 1;
  text-align: left;
}
.cat-tab:hover { background: #eceaf7; }
.cat-tab.active { background: var(--purple); }
.cat-tab-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cat-tab.active .cat-tab-icon { background: rgba(255,255,255,0.22); }
.cat-tab-icon img { width: 26px; height: 26px; object-fit: contain; display: block; }
.cat-tab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-tab-text strong {
  font-size: 13px; font-weight: 700; color: var(--dark); line-height: 1.3;
}
.cat-tab.active .cat-tab-text strong { color: #fff; }
.cat-tab-text span { font-size: 11px; color: #666; line-height: 1.4; }
.cat-tab.active .cat-tab-text span { color: rgba(255,255,255,0.8); }

/* ============================================
   PRODUCT LISTING SECTION
   ============================================ */
.prod-listing-section {
  padding: 32px 28px 60px;
  background: #f8f7ff;
}
.prod-listing-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

/* ---- SIDEBAR ---- */
.sidebar-block {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  border: 1px solid #eee;
}
.sidebar-heading {
  font-size: 12.5px; font-weight: 800; color: var(--dark);
  letter-spacing: 0.5px; margin-bottom: 12px; text-transform: uppercase;
}
.sidebar-filter-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #333; cursor: pointer;
  padding: 5px 4px; border-radius: 6px; transition: background 0.15s;
  line-height: 1.4;
}
.sidebar-checkbox:hover { background: #f5f3ff; }
.sidebar-checkbox input[type="checkbox"] { accent-color: var(--purple); width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-checkbox.checked { font-weight: 600; color: var(--purple); }
.filter-count {
  margin-left: auto; font-size: 11px; color: #888; font-weight: 500;
  background: #f0f0f5; padding: 1px 6px; border-radius: 30px;
}
.sidebar-view-more {
  margin-top: 8px; background: none; border: none;
  font-size: 12px; font-weight: 700; color: var(--purple);
  cursor: pointer; padding: 4px 0; transition: color 0.2s;
}
.sidebar-view-more:hover { color: var(--orange); }

/* Certs */
.sidebar-cert-list { display: flex; flex-direction: column; gap: 11px; }
.cert-item { display: flex; align-items: center; gap: 9px; }
.cert-icon-wrap {
  width: 34px; height: 34px; background: #f5f3ff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cert-icon-wrap img { width: 24px; height: 24px; object-fit: contain; }
.cert-text { display: flex; flex-direction: column; gap: 1px; }
.cert-text strong { font-size: 12px; font-weight: 700; color: var(--dark); line-height: 1.3; }
.cert-text span { font-size: 10.5px; color: #777; line-height: 1.3; }

/* ---- PRODUCT GRID AREA ---- */
.prod-grid-area { min-width: 0; }

/* Filter Bar */
.prod-filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-bar-left { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filter-pill {
  padding: 7px 16px; border-radius: 30px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: 1.5px solid #ddd; background: #fff; color: #333; transition: all 0.2s;
}
.filter-pill.active, .filter-pill:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.filter-dropdown-btn {
  padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1.5px solid #ddd; background: #fff; color: #444;
  transition: all 0.2s; display: flex; align-items: center; gap: 4px;
}
.filter-dropdown-btn:hover { border-color: var(--purple); color: var(--purple); }
.filter-bar-right { display: flex; align-items: center; gap: 9px; }
.sort-label { font-size: 12.5px; color: #555; font-weight: 500; }
.sort-select {
  font-size: 12.5px; font-family: var(--font); padding: 5px 10px;
  border: 1.5px solid #ddd; border-radius: 8px; color: #333; background: #fff;
  cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--purple); }
.view-toggle { display: flex; gap: 2px; border: 1.5px solid #ddd; border-radius: 8px; overflow: hidden; }
.view-btn {
  padding: 5px 9px; background: #fff; border: none; cursor: pointer;
  color: #888; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.view-btn.active, .view-btn:hover { background: var(--purple); color: #fff; }

/* Product Cards Grid */
.prod-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Product Card */
.prod-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #eee; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: 0 8px 26px rgba(61,31,140,0.11); }

.prod-card-img {
  position: relative; height: 162px; overflow: hidden; background: #f4f4f6;
}
.prod-card-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block; transition: transform 0.38s ease;
}
.prod-card:hover .prod-card-img img { transform: scale(1.05); }

.prod-card-icon-bg {
  background: linear-gradient(135deg, #f0eeff 0%, #fff3e8 100%);
  display: flex; align-items: center; justify-content: center;
}
.prod-icon-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.prod-icon-placeholder img {
  width: 72px !important; height: 72px !important;
  object-fit: contain !important; object-position: center !important;
}

.prod-cat-badge {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 10.5px; font-weight: 700; padding: 3px 10px;
  border-radius: 30px; color: #fff; letter-spacing: 0.2px;
}
.badge-pvc { background: var(--purple); }
.badge-mb { background: var(--orange); }
.badge-sp { background: #c94a00; }

.prod-card-body { padding: 13px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.prod-card-body h3 { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 6px; line-height: 1.4; }
.prod-card-body p { font-size: 12px; color: #666; line-height: 1.6; margin-bottom: 11px; flex: 1; }
.prod-view-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--purple);
  margin-top: auto; transition: gap 0.2s, color 0.2s;
}
.prod-view-link:hover { color: var(--orange); gap: 8px; }

/* ============================================
   WHY CHOOSE SECTION
   ============================================ */
.why-choose-section {
  padding: 48px 28px;
  background: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.why-choose-wrap { max-width: 100%; }
.wc-title-label {
  font-size: 12px; font-weight: 800; letter-spacing: 2.5px;
  color: var(--purple); text-align: center; text-transform: uppercase;
  margin-bottom: 30px;
}
.wc-grid {
  display: flex; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.wc-item {
  display: flex; align-items: flex-start; gap: 14px;
  flex: 1 1 170px; max-width: 220px; padding: 16px 18px;
  position: relative;
}
.wc-item:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 20%; height: 60%;
  width: 1px; background: #e8e4f5;
}
.wc-icon {
  width: 52px; height: 52px; background: #f5f3ff;
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.wc-icon img { width: 34px; height: 34px; object-fit: contain; }
.wc-text h4 { font-size: 13.5px; font-weight: 700; color: var(--dark); line-height: 1.35; margin-bottom: 4px; }
.wc-text p { font-size: 12px; color: #666; line-height: 1.55; }

/* ============================================
   INDUSTRIES WE SERVE CAROUSEL
   ============================================ */
.prod-industries-section { padding: 48px 28px; background: #fafafa; }
.prod-industries-wrap { max-width: 100%; }
.prod-industries-title {
  font-size: 26px; font-weight: 800; color: var(--dark);
  text-align: center; margin-bottom: 28px;
}
.prod-ind-carousel-wrap { display: flex; align-items: center; gap: 10px; }
.ind-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #ddd;
  background: #fff; font-size: 20px; color: #555;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 0.2s; line-height: 1;
}
.ind-btn:hover { border-color: var(--purple); color: var(--purple); background: #f5f3ff; }
.prod-ind-track-outer { flex: 1; overflow: hidden; }
.prod-ind-track { display: flex; gap: 12px; transition: transform 0.35s ease; }
.prod-ind-slide {
  flex: 0 0 calc((100% - 7 * 12px) / 8);
  min-width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
}
.prod-ind-img {
  width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; transition: border-color 0.2s, transform 0.2s;
}
.prod-ind-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.38s; }
.prod-ind-slide:hover .prod-ind-img { border-color: var(--orange); transform: translateY(-3px); }
.prod-ind-slide:hover .prod-ind-img img { transform: scale(1.06); }
.prod-ind-slide p { font-size: 11.5px; font-weight: 600; color: #444; text-align: center; line-height: 1.4; }

/* ============================================
   CTA SECTION
   ============================================ */
.prod-cta-section { background: var(--purple); padding: 52px 28px; }
.prod-cta-wrap {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.prod-cta-text h2 { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 7px; line-height: 1.3; }
.prod-cta-text p { font-size: 14.5px; color: rgba(255,255,255,0.82); line-height: 1.6; }
.prod-cta-btns { display: flex; gap: 14px; flex-wrap: wrap; flex-shrink: 0; }
.cta-btn-outline {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
  border: 2px solid #fff; border-radius: 50px; color: #fff;
  font-size: 14px; font-weight: 600; background: transparent; transition: all 0.2s; white-space: nowrap;
}
.cta-btn-outline:hover { background: rgba(255,255,255,0.12); }
.cta-btn-orange {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
  border-radius: 50px; color: #fff; font-size: 14px; font-weight: 600;
  background: var(--orange); transition: all 0.2s; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(255,107,0,0.35);
}
.cta-btn-orange:hover { background: #e05e00; transform: translateY(-2px); }

/* ============================================
   LIST VIEW STYLING
   ============================================ */
.prod-cards-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prod-cards-grid.list-view .prod-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 150px;
}
.prod-cards-grid.list-view .prod-card-img {
  width: 200px;
  height: auto;
  min-height: 150px;
  flex-shrink: 0;
}
.prod-cards-grid.list-view .prod-card-body {
  padding: 16px 20px;
  justify-content: center;
}
.prod-cards-grid.list-view .prod-view-link {
  margin-top: 12px;
}
@media (max-width: 768px) {
  .prod-cards-grid.list-view .prod-card {
    flex-direction: column;
  }
  .prod-cards-grid.list-view .prod-card-img {
    width: 100%;
    height: 162px;
    min-height: 162px;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .prod-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-tab-text span { display: none; }
}
@media (max-width: 1024px) {
  .prod-listing-wrap { grid-template-columns: 200px 1fr; gap: 18px; }
}
@media (max-width: 860px) {
  .prod-listing-wrap { grid-template-columns: 1fr; }
  .prod-sidebar { display: flex; flex-wrap: wrap; gap: 12px; }
  .sidebar-block { flex: 1 1 200px; margin-bottom: 0; }
  .prod-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-tabs { overflow-x: auto; }
  .cat-tab { flex: 0 0 auto; min-width: 155px; }
  .wc-grid { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .prod-hero-bg { min-height: 260px; height: 260px; }
  .prod-hero-wrap { min-height: 260px; }
  .prod-hero-content { width: 100%; padding: 24px 20px; }
  .prod-cards-grid { grid-template-columns: 1fr; }
  .prod-filter-bar { flex-direction: column; align-items: flex-start; }
  .prod-cta-wrap { flex-direction: column; text-align: center; align-items: center; }
  .prod-industries-title { font-size: 20px; }
  .wc-grid { flex-direction: column; gap: 0; }
  .wc-item:not(:last-child)::after { display: none; }
  .prod-listing-section { padding: 20px 16px 44px; }
}

/* Helper to align portrait/bottom-weighted images in product cards */
.prod-card-img img[src*="Untitled design"],
.prod-card-img img[src*="white_pvc_pellets"] {
  object-position: bottom;
}
