﻿
/* ===== PRODUCTS PREMIUM PAGE STYLES ===== */

/* --- Hero --- */
.products-hero {
  background: #fafafa;
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 54, 35, 0.1);
}

.products-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(30, 54, 35, 0.08) 0%, rgba(30, 54, 35, 0.03) 20%, transparent 60%);
  animation: heroGlowLight 8s ease-in-out infinite alternate;
  z-index: 1;
}

.products-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 1;
}

@keyframes heroGlowLight {
  from { transform: translate(-5%, -5%) scale(1); }
  to { transform: translate(5%, 5%) scale(1.2); }
}

.products-hero .container {
  position: relative;
  z-index: 3;
}

.products-hero .hero-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #1e3623;
  text-transform: uppercase;
  letter-spacing: 5px;
  display: inline-block;
  margin-bottom: 24px;
  background: rgba(30, 54, 35, 0.1);
  padding: 8px 16px;
  border-radius: 50px;
}

.products-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.products-hero h1 span {
  color: #1e3623;
}

.products-hero p {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: #555;
  font-weight: 500;
  max-width: 500px;
  margin: 0 auto 60px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 54, 35, 0.15);
  padding: 30px 50px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  display: inline-flex;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #111;
  line-height: 1;
  display: block;
}

.hero-stat-num span {
  color: #1e3623;
}

.hero-stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #666;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  display: block;
}

/* --- Sticky Filter Bar --- */
.products-filter-bar {
  background: rgba(255, 255, 255, 0.85); /* Light glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 54, 35, 0.15); /* Orange border hint */
  position: sticky;
  top: 75px;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  margin-top: 85px; /* Push down to sit exactly under header */
}

.filter-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* Add a fade effect on mobile to hint scrollability */
.products-filter-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 1024px) {
  .filter-bar-inner {
    justify-content: center; /* Center on desktop */
  }
  .products-filter-bar::after {
    display: none; /* Hide scroll hint on desktop */
  }
}

.filter-bar-inner::-webkit-scrollbar { display: none; }

.cat-filter-btn {
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 22px 10px;
  margin-right: 15px;
  background: transparent;
  color: #666; /* Darker text for light theme */
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.cat-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #1e3623;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.cat-filter-btn:hover {
  color: #1e3623;
}

.cat-filter-btn.active {
  color: #1e3623;
}

.cat-filter-btn.active::after {
  transform: scaleX(1);
  box-shadow: 0 -2px 10px rgba(30, 54, 35, 0.3);
}

/* --- Subcategory Filter Bar --- */
.subcat-filter-bar {
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: none;
  position: sticky;
  top: 131px;
  z-index: 99;
}

.subcat-filter-bar.visible {
  display: block;
}

.subcat-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 40px;
  display: flex;
  gap: 8px;
  row-gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}

/* Mobile only: horizontal scroll, no wrap */
@media (max-width: 1023px) {
  .subcat-bar-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
}

/* Fade hint - mobile only */
.subcat-filter-bar::after {
  display: none;
}

@media (max-width: 1023px) {
  .subcat-filter-bar::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, rgba(250,250,250,0), rgba(250,250,250,1));
    pointer-events: none;
    z-index: 2;
  }
}

/* Desktop subcat wrap — already handled above in subcat-bar-inner */
.subcat-bar-inner::-webkit-scrollbar { display: none; }

.subcat-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.subcat-btn:hover {
  border-color: rgba(30, 54, 35, 0.5);
  color: #1e3623;
  background: rgba(30, 54, 35, 0.05);
}

.subcat-btn.active {
  background: #1e3623;
  border-color: #1e3623;
  color: #fff;
  box-shadow: 0 0 16px rgba(30, 54, 35, 0.25);
}

/* --- Products Section --- */
.products-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.section-heading h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #0f0f0f;
  letter-spacing: -1px;
}

.section-heading .count-badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: #f0f0f0;
  color: #888;
  padding: 5px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(30, 54, 35, 0.15);
  border-radius: 18px;
  padding: 22px 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.search-filter-row::before {
  content: 'FILTER';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Poppins', sans-serif;
  font-size: 80px;
  font-weight: 900;
  color: rgba(30, 54, 35, 0.03); /* Subtle orange water-mark */
  pointer-events: none;
  letter-spacing: -4px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 20px;
  transition: all 0.25s ease;
  flex: 1;
  max-width: 420px;
}

.search-box:focus-within {
  border-color: #1e3623;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 54, 35, 0.1);
}

.search-box i {
  color: #999;
  font-size: 13px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  width: 100%;
}

.search-box input::placeholder {
  color: #aaa;
}

.results-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.results-count span {
  color: #1e3623;
  font-weight: 800;
  font-size: 16px;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.product-card {
  background: #fff;
  border-radius: 20px;
  border: 2px solid #f0f0f0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  border-color: #1e3623;
  box-shadow: 0 30px 60px rgba(30, 54, 35, 0.12), 0 10px 30px rgba(0,0,0,0.08);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8f8f8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img img {
  transform: scale(1.07);
}

.product-card-img .no-img-placeholder {
  width: 80px;
  height: 80px;
  background: #e8e8e8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 32px;
}

.product-mat-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 5px 10px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

.product-card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-code {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1e3623;
  margin-bottom: 8px;
  display: block;
}

.product-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f0f0f;
  line-height: 1.3;
  flex: 1;
  margin-bottom: 16px;
}

.product-dim {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #999;
  font-weight: 500;
  margin-bottom: 16px;
}

.product-view-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #0f0f0f;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.product-card:hover .product-view-btn {
  color: #1e3623;
}

.product-view-btn i {
  transition: transform 0.2s ease;
  font-size: 14px;
}

.product-card:hover .product-view-btn i {
  transform: translateX(4px);
}

/* --- No Results --- */
.no-results {
  text-align: center;
  padding: 80px 20px;
  display: none;
  grid-column: 1 / -1;
}

.no-results.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.no-results i {
  font-size: 48px;
  color: #ddd;
}

.no-results h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.no-results p {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #888;
}

/* --- Kraft Coming Soon --- */
.kraft-coming-soon {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  border-radius: 30px;
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

.kraft-coming-soon::before {
  content: 'KRAFT';
  position: absolute;
  font-size: 200px;
  font-weight: 900;
  color: rgba(255,255,255,0.02);
  font-family: 'Poppins', sans-serif;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.kraft-coming-soon h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.kraft-coming-soon h2 span { color: #1e3623; }

.kraft-coming-soon p {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
  z-index: 2;
  line-height: 1.7;
}

.kraft-notify-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 18px 40px;
  background: #1e3623;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.kraft-notify-btn:hover {
  background: #fff;
  color: #1e3623;
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(30, 54, 35, 0.3);
}

/* --- MODAL --- */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(6px);
}

.product-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.product-modal {
  background: #fff;
  border-radius: 28px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  scrollbar-width: thin;
}

.product-modal-overlay.active .product-modal {
  transform: scale(1) translateY(0);
}

.modal-img-panel {
  background: #f8f8f8;
  border-radius: 28px 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.modal-img-panel img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.modal-img-panel img.zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
}

.modal-img-panel .no-img-icon {
  font-size: 80px;
  color: #ccc;
}

.modal-info-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  color: #555;
}

.modal-close-btn:hover {
  background: #1e3623;
  color: #fff;
  transform: rotate(90deg);
}

.modal-cat-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1e3623;
  margin-bottom: 12px;
  display: block;
}

.modal-code {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0f0f0f;
  letter-spacing: -1px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.modal-subcat {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
  font-weight: 500;
}

.modal-specs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  margin-bottom: 36px;
}

.modal-spec-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-spec-icon {
  width: 36px;
  height: 36px;
  background: #f8f8f8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: #1e3623;
}

.modal-spec-content label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #aaa;
  display: block;
  margin-bottom: 2px;
}

.modal-spec-content span {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0f0f0f;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-quote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 30px;
  background: #0f0f0f;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.modal-quote-btn:hover {
  background: #25D366;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(37, 211, 102, 0.3);
}

.modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 20px;
  border: 2px solid #eee;
  border-radius: 50px;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-nav-btn:hover {
  border-color: #1e3623;
  color: #1e3623;
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-counter {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 1280px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .product-modal { grid-template-columns: 1fr; max-width: 480px; }
  .modal-img-panel { border-radius: 28px 28px 0 0; min-height: 260px; padding: 30px; }
  .modal-info-panel { padding: 30px; }
  .products-section { padding: 40px 20px 80px; }
  .filter-bar-inner { padding: 0 20px; }
  .products-hero { padding: 120px 0 60px; }
  .hero-stats { gap: 30px; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-body { padding: 14px 16px 16px; }
  .product-name { font-size: 13px; }
  .hero-stat-num { font-size: 36px; }
  .products-hero h1 { font-size: 32px; }
  .subcat-bar-inner { padding: 12px 20px; }
  .kraft-coming-soon { padding: 60px 30px; border-radius: 20px; }
  .kraft-coming-soon h2 { font-size: 32px; }
}
