.products-page .category-nav-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  overflow: visible;
}

.products-page .category-nav-link {
  flex: 1 1 220px;
  max-width: 280px;
  min-width: 190px;
  border-radius: 25px;
  white-space: normal;
}

.products-page .catalog-product-grid {
  align-items: stretch;
}

.products-page .catalog-product-card:not(.is-expanded) {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.products-page .catalog-product-card:not(.is-expanded) .product-card-link,
.products-page .catalog-product-card:not(.is-expanded) .product-card-summary {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
}

.products-page .catalog-product-card:not(.is-expanded) .product-card-content {
  flex: 1;
}

.products-page .product-card-details-link {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px 20px;
  border: 1px solid #d4af37;
  border-radius: 6px;
  background: transparent;
  color: #d4af37;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .3s, border-color .3s, box-shadow .3s, color .3s, transform .3s;
}

.products-page .product-card-details-link i {
  transition: transform .3s;
}

.products-page .product-card-link:focus-visible .product-card-details-link,
.products-page .product-card-link:hover .product-card-details-link {
  border-color: #d4af37;
  background: #d4af37;
  box-shadow: 0 4px 12px rgba(212, 175, 55, .3);
  color: #0f203c;
  transform: translateY(-2px);
}

.products-page .product-card-link:focus-visible .product-card-details-link i,
.products-page .product-card-link:hover .product-card-details-link i {
  transform: translateX(4px);
}

@media (max-width: 760px) {
  .products-page .category-nav-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .products-page .category-nav-link {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
    min-width: 140px;
    padding: 10px 12px;
    white-space: normal;
  }
}

/* Inline product details interaction */
.products-page .catalog-product-card {
  scroll-margin-top: 96px;
  overflow: hidden;
}

.products-page .catalog-product-card.is-expanded {
  border-color: rgba(212, 175, 55, .75);
  box-shadow: 0 22px 54px rgba(15, 32, 60, .18), 0 0 0 1px rgba(212, 175, 55, .18);
}

.products-page .catalog-product-card.is-expanded:hover {
  transform: none;
}

.products-page .catalog-product-card:not(.is-expanded) .product-card-link {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
}

.products-page .catalog-product-card.is-expanded .product-card-link {
  height: auto;
  flex: none;
}

.products-page .view-details-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: auto;
  padding: 10px 18px;
  border: 1px solid #d4af37;
  border-radius: 7px;
  background: transparent;
  color: #9a742e;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .35px;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, color .3s ease, transform .3s ease;
}

.products-page .view-details-toggle:hover,
.products-page .view-details-toggle:focus-visible,
.products-page .view-details-toggle[aria-expanded="true"] {
  border-color: #d4af37;
  outline: none;
  background: #d4af37;
  box-shadow: 0 5px 14px rgba(212, 175, 55, .28);
  color: #0f203c;
  transform: translateY(-2px);
}

.products-page .view-details-toggle i {
  transition: transform .3s ease;
}

.products-page .view-details-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.products-page .product-detail-panel {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  transition: max-height .55s ease, opacity .35s ease, visibility 0s linear .55s;
}

.products-page .catalog-product-card.is-expanded .product-detail-panel {
  visibility: visible;
  opacity: 1;
  transition: max-height .55s ease, opacity .35s ease .08s, visibility 0s;
}

.products-page .product-detail-inner {
  padding: 38px;
}

.products-page .product-detail-panel .product-block,
.products-page .product-detail-panel .embedded-product-layout {
  display: grid !important;
  width: 100% !important;
  align-items: start !important;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%) !important;
  gap: clamp(30px, 5vw, 64px) !important;
  padding: 0 !important;
  border: 0 !important;
}

.products-page .embedded-product-layout .product-gallery,
.products-page .embedded-product-layout .main-image {
  width: 100%;
}

.products-page .embedded-product-layout .main-image {
  overflow: hidden;
  border-radius: 10px;
  background: #f4f6f8;
  box-shadow: 0 12px 30px rgba(10, 22, 40, .09);
}

.products-page .embedded-product-layout .main-image img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.products-page .embedded-product-layout .thumbnail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.products-page .embedded-product-layout .gallery-thumb {
  width: 74px;
  height: 74px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid #d9dee5;
  border-radius: 7px;
  background: #fff;
}

.products-page .embedded-product-layout .gallery-thumb.active,
.products-page .embedded-product-layout .gallery-thumb:hover {
  border-color: #d4af37;
}

.products-page .embedded-product-layout .gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-page .product-detail-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 38px 34px;
}

.products-page .product-full-page-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-bottom: 1px solid #d4af37;
  color: #8a6728;
  font-size: .9rem;
  font-weight: 700;
  transition: color .25s ease, transform .25s ease;
}

.products-page .product-full-page-link:hover,
.products-page .product-full-page-link:focus-visible {
  color: #0f203c;
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .products-page .product-detail-panel .product-block,
  .products-page .product-detail-panel .embedded-product-layout {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .products-page .product-detail-inner {
    padding: 28px;
  }

  .products-page .product-detail-footer {
    padding: 0 28px 28px;
  }
}

@media (max-width: 560px) {
  .products-page .product-detail-inner {
    padding: 22px 18px;
  }

  .products-page .product-detail-footer {
    justify-content: stretch;
    padding: 0 18px 22px;
  }

  .products-page .product-full-page-link {
    width: 100%;
    text-align: center;
  }

  .products-page .embedded-product-layout .gallery-thumb {
    width: 62px;
    height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .products-page .product-detail-panel,
  .products-page .view-details-toggle,
  .products-page .view-details-toggle i {
    transition: none;
  }
}

@media (max-width: 760px) {
  .products-page .product-category-nav {
    position: static;
  }
}
