/* Import common page styles */
@import url("../pagestyle.css");

.product-group-page {
  /* Убираем min-height и другие свойства которые могут блокировать содержимое */
  background: var(--light-color);
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Intro Section - redesigned with simplified flex layout */
.intro-section {
  background: var(--white);
  display: flex;
  border-bottom: 4px solid var(--primary-color);
  width: 100%;
}

.intro-section .container {
  max-width: 1480px;
  margin: 60px auto;
  width: 100%;
  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: 48px;
  font-weight: 300;
  color: var(--shadow-color);
  margin-bottom: 30px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
  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: 20px;
  line-height: 1.8;
  color: var(--shadow-color);
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

/* Details content внутри intro-section */
.details-content {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--primary-color);
}

.details-title {
  font-size: 32px;
  font-weight: 300;
  color: var(--shadow-color);
  margin-bottom: 25px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 12px;
}

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

.details-text {
  font-size: 18px;
  line-height: 1.9;
  color: var(--shadow-color);
  letter-spacing: 0.02em;
}

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

/* Intro Image - static version */
.intro-image {
  flex: 0 0 auto;
  width: 35%;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  /* No transitions, no hover effects, no box-shadow */
}

/* Category blocks for main listing */
.category-block {
  margin-bottom: 40px;
  background: var(--white);
  padding: 50px;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
}

.category-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-light);
}

.category-block:nth-child(even) {
  background: var(--shadow-color);
}

.category-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.category-title {
  font-size: 42px;
  font-weight: 300;
  color: var(--shadow-color);
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
}

.category-block:nth-child(even) .category-title {
  color: var(--light-color);
}

.category-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.category-block:nth-child(even) .category-title a:hover {
  color: var(--secondary-color);
}

.category-description {
  font-size: 18px;
  line-height: 1.8;
  color: var(--shadow-color);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.category-block:nth-child(even) .category-description {
  color: var(--light-color);
}

/* Products Section */
.products-section {
  background: var(--light-color);
  padding: 80px 0;
}

.products-section .container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 48px;
  font-weight: 300;
  color: var(--shadow-color);
  text-align: center;
  margin-bottom: 70px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 20px;
}

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

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

/* New Product Card Design */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--shadow-light);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--shadow-color);
  height: 100%;
  position: relative;
  border: none;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  transition: height 0.2s ease;
}

.product-card:hover::before {
  height: 5px;
}

.product-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Create 1:1 aspect ratio */
  overflow: hidden;
  background: var(--white);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 90%;
  height: 90%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--shadow-light);
}

.product-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--shadow-color);
  transition: color 0.3s ease;
}

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

.product-id {
  font-size: 14px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 500;
}

.product-manufacturer {
  font-size: 14px;
  color: var(--shadow-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-manufacturer i {
  color: var(--primary-color);
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  background: var(--light-color);
  color: var(--shadow-color);
  padding: 5px 10px;
  font-size: 12px;
}

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

.empty-products i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.7;
}

.empty-products h3 {
  font-size: 24px;
  color: var(--shadow-color);
  margin-bottom: 15px;
}

.empty-products p {
  font-size: 16px;
  color: var(--shadow-color);
  opacity: 0.8;
}

/* Subgroups Section */
.subgroups-section {
  background: var(--light-color);
  padding: 80px 0;
}

.subgroups-section .container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.subgroups-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 60px;
}

/* New Subgroup Card Design */
.subgroup-card {
  display: flex;
  flex-direction: column;
  width: 280px;
  height: 400px;
  background: var(--white);
  border: none;
  box-shadow: 0 0 0 1px var(--shadow-light);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.subgroup-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.08);
}

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

.subgroup-card:hover::before {
  height: 5px;
}

.subgroup-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  height: 100%;
  position: relative;
  padding: 0;
}

.subgroup-image {
  width: 90%;
  height: 0;
  padding-top: 90%; /* Create 1:1 aspect ratio */
  margin: 5% auto;
  position: relative;
  overflow: hidden;
}

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

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

.subgroup-text-content {
  padding: 20px 25px 30px;
  background: var(--white);
  border-top: 1px solid var(--shadow-light);
}

.subgroup-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  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: 14px;
  color: var(--shadow-color);
  line-height: 1.6;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

/* 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: 18px;
  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);
}

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

.cta-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.cta-title {
  font-size: 42px;
  font-weight: 300;
  color: var(--light-color);
  margin-bottom: 25px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cta-text {
  font-size: 20px;
  line-height: 1.8;
  color: var(--light-color);
  margin-bottom: 40px;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: var(--shadow-color);
  padding: 20px 40px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  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);
  cursor: pointer;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(60, 64, 71, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  background: var(--shadow-color);
  padding: 25px;
  text-align: center;
  position: relative;
}

.modal-title {
  color: var(--light-color);
  font-size: 24px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--light-color);
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.modal-body {
  padding: 40px 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--shadow-color);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label.required::after {
  content: " *";
  color: var(--accent-red);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  font-size: 16px;
  font-family: "Gilroy", sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(208, 195, 42, 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--accent-red);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: "Gilroy", sans-serif;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.contact-options {
  display: flex;
  gap: 15px;
}

.contact-options .form-group {
  flex: 1;
}

.form-note {
  font-size: 13px;
  color: var(--shadow-color);
  opacity: 0.7;
  margin-top: 10px;
  font-style: italic;
}

.form-submit {
  background: var(--primary-color);
  color: var(--shadow-color);
  border: 2px solid var(--primary-color);
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-family: "Gilroy", sans-serif;
}

.form-submit:hover {
  background: var(--shadow-color);
  color: var(--light-color);
  border-color: var(--shadow-color);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  color: var(--accent-red);
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.success-message {
  background: var(--success-color);
  color: var(--white);
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
  display: none;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-body {
    padding: 30px 20px;
  }

  .form-row,
  .contact-options {
    flex-direction: column;
    gap: 0;
  }

  .form-submit {
    padding: 15px 30px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .modal-body {
    padding: 25px 15px;
  }

  .form-input,
  .form-textarea {
    padding: 12px;
    font-size: 15px;
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .intro-section .container {
    margin: 40px auto;
    padding: 0 20px;
  }

  .intro-content {
    max-width: 100%;
  }

  .intro-image {
    width: 100%;
    order: -1; /* Image appears on top on smaller screens */
  }

  .intro-title {
    font-size: 38px;
  }
}

@media (max-width: 768px) {
  .intro-section .container {
    margin: 30px auto;
    gap: 30px;
  }

  .intro-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .intro-text {
    font-size: 18px;
    margin-bottom: 30px;
  }

  .details-title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .details-text {
    font-size: 16px;
  }

  .group-image {
    max-height: 60vh;
  }

  .category-block {
    padding: 35px 25px;
    margin-bottom: 30px;
  }

  .category-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .category-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .section-title {
    font-size: 36px;
    margin-bottom: 50px;
  }

  .products-section .container,
  .subgroups-section .container {
    max-width: 100%;
    padding: 0 15px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
  }

  .product-info {
    padding: 15px;
  }

  .product-title {
    font-size: 16px;
  }

  .subgroups-grid {
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
  }

  .subgroup-card {
    width: 250px;
    height: 350px;
  }

  .subgroup-text-content {
    padding: 15px 20px 25px;
  }

  .subgroup-title {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .subgroup-desc {
    font-size: 13px;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .nav-button {
    width: 250px;
    text-align: center;
    padding: 15px 25px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .intro-section .container {
    margin: 20px auto;
    gap: 20px;
  }

  .intro-title {
    font-size: 28px;
  }

  .intro-text {
    font-size: 16px;
  }

  .details-title {
    font-size: 22px;
  }

  .category-block {
    padding: 25px 20px;
  }

  .category-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 28px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }

  .product-title {
    font-size: 15px;
  }

  .product-id,
  .product-manufacturer {
    font-size: 13px;
  }

  .tag {
    font-size: 11px;
    padding: 4px 8px;
  }

  .subgroups-grid {
    gap: 15px;
    justify-content: center;
  }

  .subgroup-card {
    width: 220px;
    height: 320px;
  }

  .subgroup-text-content {
    padding: 15px;
  }

  .subgroup-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .subgroup-desc {
    font-size: 12px;
  }
}
