/* ========================================
   IMPORTS
======================================== */
@import url("../pagestyle.css");
@import url("product-section.css");

/* ========================================
   BREADCRUMB NAVIGATION
======================================== */

.breadcrumb-section {
  padding: 25px 0;
  background: transparent;
  border-bottom: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tertiary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0;
  font-weight: 500;
  letter-spacing: 0.03em;
  position: relative;
}

.breadcrumb-item::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.breadcrumb-item:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.breadcrumb-item:hover::after {
  width: 100%;
}

.breadcrumb-item i {
  font-size: 1rem;
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--shadow-color);
  font-weight: 700;
  pointer-events: none;
}

.breadcrumb-item.active::after {
  display: none;
}

.breadcrumb-separator {
  color: var(--light-gray);
  font-weight: 400;
  user-select: none;
  font-size: 0.75rem;
}

/* ========================================
   BASE LAYOUT
======================================== */
.product-group-page {
  background: var(--light-color);
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ========================================
   INTRO SECTION
======================================== */
.intro-section {
  background: var(--white);
  display: flex;
  border-bottom: 4px solid var(--primary-color);
  width: 100%;
}

.intro-section .container {
  max-width: 100%;
  width: 90%;
  margin: 60px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}

.intro-content {
  flex: 1;
  min-width: 300px;
  max-width: 60%;
}

.intro-title {
  font-size: 2rem;
  font-weight: 300;
  color: var(--shadow-color);
  margin-bottom: 25px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  position: relative;
  padding-bottom: 15px;
}

.intro-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--primary-color);
}

.intro-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--shadow-color);
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

.intro-image {
  flex: 0 0 auto;
  width: 35%;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, min-width 0.3s ease;
}

.group-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ========================================
   DETAILS SECTION
======================================== */
.details-section {
  background: var(--white);
  padding: 60px 0;
  position: relative;
}

.details-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color) 20%,
    var(--primary-color) 80%,
    transparent
  );
}

.details-section .container {
  max-width: 100%;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.details-content-block {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
  padding: 40px 0;
  position: relative;
}

.details-content-block::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--light-gray) 20%,
    var(--light-gray) 80%,
    transparent
  );
}

.details-content-block:last-child::after {
  display: none;
}

.details-content-block.details-1 {
  padding-top: 0;
}

.details-content-block.image-left {
  flex-direction: row;
}

.details-content-block.image-right {
  flex-direction: row-reverse;
}

.details-content {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.details-title {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--shadow-color);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 12px;
  line-height: 1.3;
}

.details-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.details-content-block:hover .details-title::after {
  width: 120px;
}

.details-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--shadow-color);
  letter-spacing: 0.02em;
  margin-bottom: 15px;
  opacity: 0.9;
}

.details-text:last-of-type {
  margin-bottom: 0;
}

.details-text p {
  margin-bottom: 20px;
}

.details-image {
  flex: 0 0 auto;
  width: 40%;
  min-width: 320px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.details-image::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid var(--light-gray);
  z-index: 0;
  transition: all 0.3s ease;
}

.details-content-block:hover .details-image::before {
  border-color: var(--primary-color);
}

.details-image[style*="width: 0"] {
  display: none;
}

.detail-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.4s ease;
}

/* Full details container */
.full-details-container {
  display: none;
  flex-direction: column;
  gap: 60px;
  animation: fadeInDetails 0.5s ease-out;
}

.full-details-container.active {
  display: flex;
}

@keyframes fadeInDetails {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Learn More Button */
.learn-more-container {
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding: 30px 0;
  position: relative;
}

.learn-more-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
}

.learn-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 40px;
  background: var(--white);
  color: var(--shadow-color);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.learn-more-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transition: left 0.4s ease;
  z-index: -1;
}

.learn-more-button::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.learn-more-button:hover {
  color: var(--white);
  border-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow-light);
}

.learn-more-button:hover::before {
  left: 0;
}

.learn-more-button:hover::after {
  transform: translateY(3px);
}

.learn-more-button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--shadow-light);
}

.learn-more-button.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.learn-more-container.hidden {
  margin-top: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
  background: var(--shadow-color);
  padding: 60px 0;
  text-align: center;
}

.cta-section .container {
  max-width: 100%;
  width: 90%;
  margin: 0 auto;
  padding: 0;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2rem;
  font-weight: 300;
  color: var(--light-color);
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.cta-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--light-color);
  margin-bottom: 30px;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: var(--light-color);
  padding: 16px 35px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
}

.cta-button:hover {
  background: var(--light-color);
  color: var(--shadow-color);
  border-color: var(--light-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(208, 195, 42, 0.3);
}

/* ========================================
   SUBGROUPS SECTION
======================================== */
.subgroups-section {
  background: var(--light-color);
  padding: 60px 0;
}

.subgroups-section .container {
  max-width: 100%;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.subgroups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
  margin-top: 60px;
  width: 100%;
}

.subgroup-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--light-gray);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  height: 100%;
}

.subgroup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.subgroup-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--shadow-light);
  border-color: var(--primary-color);
}

.subgroup-card:hover::before {
  transform: scaleX(1);
}

.subgroup-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.subgroup-image {
  width: 100%;
  padding-top: 100%;
  position: relative;
  overflow: hidden;
  background: var(--light-color);
  border-bottom: 2px solid var(--light-gray);
}

.subgroup-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  transition: all 0.4s ease;
}

.subgroup-card:hover .subgroup-image img {
  transform: scale(1.08);
}

.subgroup-text-content {
  padding: 25px 20px 30px;
  background: var(--white);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
}

.subgroup-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--shadow-color);
  transition: color 0.3s ease;
}

.subgroup-card:hover .subgroup-title {
  color: var(--primary-color);
}

.subgroup-desc {
  font-size: 0.8125rem;
  color: var(--shadow-color);
  line-height: 1.6;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* ========================================
   CATEGORY LISTING (ALL CATEGORIES VIEW)
======================================== */
.product-groups-section {
  background: var(--light-color);
  padding: 60px 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  width: 100%;
}

.category-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--light-gray);
  transition: all 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--shadow-light);
  border-color: var(--primary-color);
}

.category-image {
  width: 100%;
  padding-top: 75%;
  position: relative;
  overflow: hidden;
  background: var(--light-color);
}

.category-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-image img {
  transform: scale(1.1);
}

.category-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--shadow-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.category-card:hover .category-title {
  color: var(--primary-color);
}

.category-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--shadow-color);
  opacity: 0.85;
}

/* ========================================
   NAVIGATION SECTION
======================================== */
.navigation-section {
  background: var(--shadow-color);
  padding: 60px 0;
}

.nav-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-button {
  background: var(--primary-color);
  color: var(--light-color);
  padding: 18px 35px;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 400;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-button:hover {
  background: var(--light-color);
  color: var(--primary-color);
}

.nav-back {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.nav-back:hover {
  background: var(--light-color);
  color: var(--secondary-color);
}

/* ========================================
   SHARED STYLES
======================================== */
.section-title {
  font-weight: 300;
  color: var(--shadow-color);
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--primary-color);
}

/* Empty states */
.empty-products,
.no-data-message {
  text-align: center;
  padding: 50px 20px;
  background: var(--white);
  margin-top: 50px;
}

.empty-products i,
.no-data-message i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.7;
}

.empty-products h3,
.no-data-message h2 {
  font-size: 1.5rem;
  color: var(--shadow-color);
  margin-bottom: 15px;
}

.empty-products p,
.no-data-message p {
  font-size: 1rem;
  color: var(--shadow-color);
  opacity: 0.8;
}

/* ========================================
   PRODUCTS SECTION - TABLE & CARDS
======================================== */

.products-section {
  padding: 60px 0;
  background: var(--light-color);
  position: relative;
}

.products-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color) 15%,
    var(--primary-color) 85%,
    transparent
  );
}

.products-section .container {
  max-width: 100%;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.products-header .section-title {
  margin-bottom: 0;
}

/* ========================================
   PRODUCTS LOADING STATE
======================================== */

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
}

.loader {
  width: 60px;
  height: 60px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  position: relative;
}

.loader::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-bottom-color: var(--primary-light);
  animation: spin 0.7s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.products-loading p {
  color: var(--shadow-color);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ========================================
   VIEW SWITCHER & SORT CONTROLS
======================================== */

.view-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.view-switcher {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 2px solid var(--light-gray);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* Sort Dropdown */
.sort-dropdown {
  position: relative;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid var(--light-gray);
  color: var(--shadow-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort-btn:hover {
  background: var(--light-color);
  border-color: var(--primary-color);
}

.sort-btn i {
  font-size: 1rem;
}

.sort-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--white);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 12px var(--shadow-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.sort-dropdown__menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--light-gray);
}

.sort-dropdown__item:last-child {
  border-bottom: none;
}

.sort-dropdown__item:hover {
  background: var(--light-color);
  padding-left: 24px;
}

.sort-dropdown__item.active {
  background: var(--primary-color);
  color: var(--white);
}

.sort-dropdown__item.active i {
  color: var(--white);
}

.sort-dropdown__item i {
  color: var(--primary-color);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sort-dropdown__item span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Range Slider Hover States */
.range-slider-wrapper {
  position: relative;
  height: 6px;
  background: var(--light-gray);
  margin: 20px 0;
  border-radius: 3px;
  cursor: pointer;
}

.range-slider:focus {
  outline: none;
}

.range-slider::-webkit-slider-thumb:focus {
  box-shadow: 0 0 0 8px rgba(238, 10, 16, 0.25);
}

.range-slider::-moz-range-thumb:focus {
  box-shadow: 0 0 0 8px rgba(238, 10, 16, 0.25);
}

/* Highlight which slider is being interacted with */
.range-slider-wrapper.interacting-min
  .range-slider:first-of-type::-webkit-slider-thumb {
  background: var(--primary-color);
  border-color: var(--primary-dark);
  transform: scale(1.15);
}

.range-slider-wrapper.interacting-max
  .range-slider:last-of-type::-webkit-slider-thumb {
  background: var(--primary-color);
  border-color: var(--primary-dark);
  transform: scale(1.15);
}
