/* Products Catalog Specific Styles */

:root {
  --sidebar-width: 280px;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
  --accent-bg: #f8faf8;
}

.products-hero {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  padding: 6rem 0;
  color: white;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.products-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  /* background: url("product-images//bulk-bags/bulkbagsA.jpeg") no-repeat center right; */
  background-size: contain;
  opacity: 0.1;
  filter: grayscale(100%);
}

.products-hero .section-title {
  color: white;
  margin-bottom: 1rem;
  font-size: 3rem;
  /* 48px */
}

.hero-desc {
  font-size: 1rem;
  max-width: 600px;
  opacity: 0.9;
  animation: slideInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog-section {
  padding-bottom: 6rem;
}

.catalog-layout {
  display: flex;
  gap: 4rem;
}

/* Sidebar Styling */
.catalog-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
  /* Fixed position while page scrolls */
  max-height: calc(100vh - 120px);
  /* Limit height to viewport */
  overflow-y: auto;
  /* Enable internal scrolling */
  padding-right: 10px;

  /* Hide scrollbar for clean look */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.sidebar-sticky::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.sidebar-title {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #edf2f7;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  margin-top: 0;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-btn {
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 1.5rem;
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  border-radius: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-btn i {
  width: 24px;
  font-size: 1.1rem;
  color: #94a3b8;
  transition: color 0.3s ease;
}

.category-btn:hover {
  background: #f1f8e9;
  color: var(--primary-color);
}

.category-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
  border-radius: 0;
}

.category-btn.active i {
  color: white;
}

/* Content Area Styling */
.catalog-layout {
  display: flex;
  gap: 4rem;
  border-top: 1px solid #edf2f7;
  padding-top: 2rem;
}

/* Sidebar Styling */
.catalog-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.catalog-content {
  flex-grow: 1;
  padding-bottom: 4rem;
}

.product-detail-view {
  animation: airyFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes airyFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.category-header {
  margin-bottom: 3rem;
}

.category-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--heading-color);
}

.category-intro {
  background: var(--accent-bg);
  padding: 3rem;
  border-radius: 0;
  border-left: 6px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.category-intro-main {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.category-features-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
}

.category-image-column {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.category-image-carousel {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.category-image-carousel img {
  min-width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}


.category-intro-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: var(--card-shadow);
}

.category-description {
  font-size: 0.95rem;
  /* Decreased as requested */
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.category-intro-text {
  flex: 1;
}

.enquire-now-btn {
  align-self: flex-start;
}

.category-features-box {
  margin-bottom: 0;
}

.category-features-box h5 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--heading-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
  list-style: none;
  padding: 0;
}

.category-features-list li {
  font-size: 0.9rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-features-list li i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

.enquire-now-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.types-section-title {
  font-size: 1.5rem;
  margin: 4rem 0 2rem;
  position: relative;
  padding-left: 1.5rem;
}

.types-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: var(--primary-color);
}

/* Types Grid */
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.type-card {
  background: white;
  border: 1px solid #edf2f7;
  border-radius: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.type-image {
  height: 200px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.type-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.type-info {
  padding: 2rem;
  flex-grow: 1;
}

.type-info h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--heading-color);
}

.type-info p {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.features-list li i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

/* Mobile Category Selector Styling */
.mobile-category-selector {
  display: none;
  position: relative;
  margin-bottom: 2rem;
}

#mobile-category-dropdown {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  background: white;
  border: 2px solid #edf2f7;
  border-radius: 0;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

#mobile-category-dropdown:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.dropdown-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .catalog-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .catalog-sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 76px;
    /* Matches approx header height */
    z-index: 900;
    background: white;
    padding: 1rem 0 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }

  .catalog-content {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .catalog-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
    border-top: none;
    padding-top: 0;
  }

  .sidebar-sticky {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-left: 2px;
    /* Prevent shadow cutout */
    padding-right: 2px;
  }

  .mobile-category-selector {
    display: block;
    margin-bottom: 0.5rem;
  }

  .category-nav {
    display: none;
    /* Hide desktop buttons on mobile */
  }

  .category-intro {
    padding: 2rem;
    gap: 2rem;
  }

  .category-intro-main {
    flex-direction: column;
    gap: 1.5rem;
  }

  .category-image-column {
    width: 100%;
    order: 1;
  }

  .category-intro-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1;
  }

  .category-intro-text {
    order: 2;
  }

  .category-description {
    margin-bottom: 1.5rem;
  }

  .enquire-now-btn {
    order: 4;
    width: 100%;
    margin-top: 0;
  }

  .category-features-section {
    order: 3;
    border-top: none;
    padding-top: 0;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 640px) {
  .products-hero {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .types-grid {
    grid-template-columns: 1fr;
  }
}

/* Skeleton Loader */
.skeleton-loader {
  padding: 2rem;
}

.skeleton-header {
  height: 200px;
  background: #f1f5f9;
  border-radius: 0;
  margin-bottom: 3rem;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-card {
  height: 350px;
  background: #f1f5f9;
  border-radius: 0;
  animation: pulse 1.5s infinite ease-in-out;
}

#enquiryModal .modal-content {
  max-width: 600px;
  width: 95%;
  max-height: 95vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.enquiry-modal-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
  flex-shrink: 0;
}

.enquiry-modal-header h2 {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  color: #ffffff;
}

.enquiry-modal-header p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: #ffffff;
}

.enquiry-form-body {
  padding: 2rem 2.5rem;
  background: white;
  overflow-y: auto;
  flex-grow: 1;
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: #fff;
}

#successModal .close-modal {
  color: var(--text-color);
}

/* Modal Active State - reusing from style.css logic if needed */
.modal.active {
  display: flex;
}

/* Compact form styling for enquiry modal */

/* Compact form styling for enquiry modal */
#enquiryModal .form-group {
  margin-bottom: 1.2rem;
}

#enquiryModal .form-row {
  margin-bottom: 1.2rem;
  gap: 1.2rem;
}

#enquiryModal label {
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
}

#enquiryModal input,
#enquiryModal textarea {
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
}

#enquiryModal textarea {
  resize: vertical;
  min-height: 80px;
}

#enquiryModal .cta-button {
  margin-top: 0.5rem;
  padding: 0.85rem 1.5rem;
}

@media (max-width: 640px) {
  .category-features-list {
    grid-template-columns: 1fr;
  }

  #enquiryModal .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .enquiry-form-body {
    padding: 2rem;
  }

  #enquiryModal .form-group {
    margin-bottom: 1rem;
  }

  #enquiryModal .form-row {
    margin-bottom: 1rem;
  }

  #enquiryModal label {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
  }

  #enquiryModal input,
  #enquiryModal textarea {
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
  }
}