/* Products page — rounded search bar with autocomplete suggestions, and
   the catalog grid of product cards below it. */

.product-search-wrap {
  position: relative;
  width: 100%;
}

.product-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 999px;
  padding: 6px 6px 6px 26px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--default-color), transparent 92%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-search-form:focus-within {
  border-color: color-mix(in srgb, var(--accent-color), transparent 40%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent-color), transparent 82%);
}

.product-search-icon {
  color: color-mix(in srgb, var(--default-color), transparent 32%);
  font-size: 20px;
  margin-right: 14px;
  flex-shrink: 0;
}

.product-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  padding: 15px 0;
  color: var(--default-color);
}

.product-search-submit {
  border: 0;
  border-radius: 999px;
  padding: 14px 32px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent-color), transparent 65%);
}

.product-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  color: var(--heading-color);
  transition: background 0.2s ease;
}

.product-search-clear:hover {
  background: color-mix(in srgb, var(--default-color), transparent 85%);
  color: var(--heading-color);
}

.product-search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
  background: var(--surface-color);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  display: none;
}

.product-search-suggestions.is-open {
  display: block;
}

.product-search-suggestion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--default-color);
  transition: background 0.15s ease;
}

.product-search-suggestion:hover,
.product-search-suggestion.is-active {
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
}

.product-search-suggestion-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--heading-color), transparent 95%);
}

.product-search-suggestion-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-search-suggestion-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--heading-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-search-suggestion-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-color);
}

/* ---------- Catalog layout ----------
   Wide two-column product cards (photo + specs), a header row with the
   search bar, and a "custom specification" band at the end. The second
   gallery photo fades in on hover. Uses the site's cut-corner shape. */
.catalog-section {
  position: relative;
  overflow: clip;
}

.catalog-glow {
  position: absolute;
  z-index: -1;
  top: 80px;
  right: -140px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color), transparent 86%);
  filter: blur(100px);
  pointer-events: none;
}

.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 50px;
}

.catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border: 1px dashed color-mix(in srgb, var(--accent-color), transparent 45%);
  border-radius: 30px;
  color: var(--heading-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.catalog-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-size: 13px;
}

.catalog-title {
  font-size: calc(2.5rem * var(--type-display-scale, 1));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.catalog-title .accent-highlight {
  color: var(--accent-color);
}

.catalog-count {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.catalog-count strong {
  color: var(--accent-color);
  font-weight: 800;
}

.catalog-search {
  flex: 0 1 460px;
}

/* ---------- Grid & cards ---------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.catalog-card {
  position: relative;
  display: grid;
  grid-template-columns: 44% 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--heading-color), transparent 93%);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.catalog-card:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
  box-shadow: 0 28px 56px color-mix(in srgb, var(--accent-color), transparent 82%);
}

/* ---------- Media ---------- */
.catalog-card-media {
  position: relative;
  min-height: 320px;
  margin: 12px 0 12px 12px;
  overflow: hidden;
  border-radius: 42px 10px 42px 10px;
  background: color-mix(in srgb, var(--accent-color), transparent 93%);
}

.catalog-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.catalog-card-image-alt {
  opacity: 0;
}

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

.catalog-card:hover .catalog-card-image-alt {
  opacity: 1;
}

.catalog-card-number {
  position: absolute;
  right: 14px;
  bottom: 6px;
  font-family: var(--heading-font);
  font-size: calc(3.6rem * var(--type-display-scale, 1));
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.9);
  text-shadow: 0 6px 20px rgb(0 0 0 / 0.15);
  pointer-events: none;
}

.catalog-card-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.92);
  color: var(--heading-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.12);
}

.catalog-card-flag i {
  color: #f5b301;
}

/* ---------- Body ---------- */
.catalog-card-body {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
}

.catalog-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
}

.catalog-card-title a {
  color: var(--heading-color);
  transition: color 0.3s ease;
}

.catalog-card:hover .catalog-card-title a {
  color: var(--accent-color);
}

.catalog-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.catalog-card-specs {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.catalog-card-specs li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--heading-color);
}

.catalog-card-specs i {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent-color);
  font-size: 16px;
}

.catalog-card-specs small {
  display: block;
  color: color-mix(in srgb, var(--default-color), transparent 32%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.catalog-card-price {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-color);
}

.catalog-card-price small {
  display: block;
  margin-bottom: 4px;
  color: color-mix(in srgb, var(--default-color), transparent 32%);
  font-family: var(--default-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Icon buttons sit above the card's stretched title link. */
.catalog-icon-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  color: var(--heading-color);
  font-size: 17px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.catalog-icon-btn:hover {
  background: var(--heading-color);
  border-color: var(--heading-color);
  color: #fff;
  transform: translateY(-2px);
}

.catalog-card-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 30px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.catalog-card-go i {
  transition: transform 0.3s ease;
}

.catalog-card:hover .catalog-card-go {
  background: var(--heading-color);
}

.catalog-card:hover .catalog-card-go i {
  transform: translateX(4px);
}

/* ---------- Empty state ---------- */
.catalog-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 50px 30px;
  border-radius: 28px;
  border: 1px dashed color-mix(in srgb, var(--accent-color), transparent 55%);
  background: color-mix(in srgb, var(--accent-color), var(--surface-color) 96%);
  text-align: center;
}

.catalog-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: var(--accent-color);
  color: #fff;
  font-size: 26px;
}

.catalog-empty h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.catalog-empty p {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.catalog-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* ---------- Buttons ---------- */
.catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 40px;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.catalog-btn:hover {
  transform: translateY(-2px);
}

.catalog-btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.catalog-btn-primary:hover {
  background: #fff;
  color: var(--heading-color);
}

.catalog-empty .catalog-btn-primary:hover {
  background: var(--heading-color);
  color: #fff;
}

.catalog-btn-ghost {
  border: 1.5px solid color-mix(in srgb, var(--heading-color), transparent 75%);
  color: var(--heading-color);
}

.catalog-btn-ghost:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.catalog-btn-light {
  border: 1.5px solid rgb(255 255 255 / 0.35);
  color: #fff;
}

.catalog-btn-light:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- Pagination ---------- */
.catalog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

/* ---------- Custom specification band ---------- */
.catalog-custom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 70px;
  padding: 38px 44px;
  overflow: hidden;
  background: linear-gradient(120deg, var(--heading-color), color-mix(in srgb, var(--heading-color), var(--accent-color) 35%));
  border-radius: 50px 12px 50px 12px;
  color: #fff;
}

.catalog-custom::before {
  content: "";
  position: absolute;
  right: 18%;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 0 0 40px rgb(255 255 255 / 0.03);
  pointer-events: none;
}

.catalog-custom-text {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 680px;
}

.catalog-custom-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent-color);
  font-size: 24px;
  animation: catalog-bob 3.2s ease-in-out infinite;
}

@keyframes catalog-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-6deg); }
}

.catalog-custom h3 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.catalog-custom p {
  margin: 0;
  color: rgb(255 255 255 / 0.75);
  line-height: 1.6;
}

.catalog-custom-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .catalog-card {
    grid-template-columns: 1fr;
  }

  .catalog-card-media {
    min-height: 260px;
    margin: 12px 12px 0;
  }
}

@media (max-width: 991px) {
  .catalog-title {
    font-size: 2rem;
  }

  .catalog-search {
    flex: 1 1 100%;
  }
}

@media (max-width: 767px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .catalog-title {
    font-size: 1.7rem;
  }

  .catalog-card-body {
    padding: 24px 20px 22px;
  }

  .catalog-card-media {
    min-height: 230px;
  }

  .catalog-custom {
    padding: 30px 24px;
  }

  .catalog-custom-text {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-custom-actions,
  .catalog-custom-actions .catalog-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card,
  .catalog-card-image {
    transition: none;
  }

  .catalog-card:hover,
  .catalog-card:hover .catalog-card-image {
    transform: none;
  }

  .catalog-custom-icon {
    animation: none;
  }
}

@media (max-width: 575px) {
  .product-search-form {
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 22px;
  }

  .product-search-icon {
    order: 1;
  }

  .product-search-input {
    order: 2;
    padding: 8px 0;
  }

  .product-search-submit,
  .product-search-clear {
    order: 3;
    width: 100%;
    margin-top: 8px;
    border-radius: 14px;
  }
}
