/* AMOX Industrial - products catalog styles. */

/* Category directory hub */
.catalog-nav-section {
  position: static;
  padding: 90px 0 80px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.catalog-nav-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
}
.catalog-nav-head h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 3.8vw, 2.85rem);
}
.catalog-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px;
  background: var(--site-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s, border-color .25s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(12, 15, 20, 0.02);
}
.cat-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--orange), var(--orange-2));
  opacity: 0;
  transform: scaleY(0.4);
  transition: all .25s cubic-bezier(.22,1,.36,1);
}
.cat-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 75, 11, .3);
  box-shadow: 0 16px 36px rgba(12, 15, 20, .08);
}
.cat-tile:hover::before {
  opacity: 1;
  transform: scaleY(1);
}
.cat-tile-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(239,75,11,.08);
  border: 1px solid rgba(239,75,11,.16);
  color: var(--orange);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  transition: all .28s ease;
}
.cat-tile:hover .cat-tile-icon {
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  border-color: transparent;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(239, 75, 11, .25);
}
.cat-tile-info {
  flex: 1;
  min-width: 0;
}
.cat-tile-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.cat-tile-no {
  color: var(--orange);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.cat-tile-short {
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.cat-tile-tagline {
  display: block;
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-tile-arrow {
  flex: none;
  color: #ccd0d7;
  font-size: .82rem;
  transition: all .25s ease;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.cat-tile:hover .cat-tile-arrow {
  color: var(--orange);
  transform: translateY(3px);
}

/* Product sections */
.product-section { padding: 90px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.product-section:nth-child(even) { background: var(--paper); }
.product-intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; align-items: stretch; margin-bottom: 28px; }
.product-intro img { width: 100%; height: 320px; object-fit: cover; border-radius: 14px; }
.product-intro-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.product-intro h2 { margin: 10px 0 14px; font-size: clamp(2.2rem, 4.5vw, 4rem); }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-item { position: relative; padding: 24px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--site-bg); transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s, border-color .3s; }
.product-item:hover { transform: translateY(-4px); border-color: rgba(239,75,11,.3); box-shadow: 0 20px 45px rgba(12,15,20,.09); }
.product-item h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.product-item p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }

/* Structured details prototype: PLCs & Controllers */
.product-item--has-details { padding-right: 62px; }
.product-item--has-details.is-details-open { z-index: 80; border-color: rgba(239,75,11,.55); box-shadow: 0 22px 55px rgba(12,15,20,.14); }
.motion-ready .product-item--has-details.motion-reveal.is-visible.is-details-open { transform: none !important; filter: none !important; transition: none !important; will-change: auto !important; }
.product-details-trigger,
.product-popover-close {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--orange);
  background: rgba(239,75,11,.09);
  transition: color .2s, background .2s, transform .2s;
}
.product-details-trigger {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(239,75,11,.18);
  border-radius: 50%;
  font-size: .94rem;
}
.product-details-trigger:hover,
.product-details-trigger:focus-visible,
.product-item--has-details.is-details-open .product-details-trigger {
  color: white;
  background: var(--orange);
  outline: none;
  transform: scale(1.06);
}
.product-details-trigger:focus-visible { box-shadow: 0 0 0 4px rgba(239,75,11,.18); }
.product-popover[hidden] { display: none; }
.product-popover {
  position: fixed;
  z-index: 90;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(16,18,22,.1);
  border-radius: 18px;
  background: rgba(242,242,242,.985);
  box-shadow: 0 30px 90px rgba(12,15,20,.24);
  backdrop-filter: blur(18px);
}
.product-popover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}
.product-popover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.product-popover-kicker { display: block; margin-bottom: 5px; color: var(--orange); font-size: .68rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.product-popover .product-popover-head h3 { margin: 0; font-size: 1.55rem; line-height: 1.12; }
.product-popover-close { flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); background: var(--paper); }
.product-popover-close:hover,
.product-popover-close:focus-visible { color: white; background: var(--ink); outline: none; }
.product-popover-section { padding: 14px 0; border-top: 1px solid var(--line); }
.product-popover-section h4 { margin: 0 0 7px; color: var(--ink); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.product-popover .product-popover-section p { color: #555b64; font-size: .82rem; line-height: 1.5; }
.product-popover-section ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.product-popover-section li { position: relative; padding-left: 17px; color: #555b64; font-size: .8rem; line-height: 1.45; }
.product-popover-section li::before { content: ""; position: absolute; top: .53em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(239,75,11,.1); }
.product-popover-brands { padding-top: 0; border-top: 0; }
.product-brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.product-brand-logo { position: relative; display: grid; place-items: center; min-width: 0; height: 54px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fafafa; overflow: hidden; }
.product-brand-logo img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); max-width: none; object-fit: contain; object-position: center; }
@media (max-width: 1100px) {
  .catalog-nav-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .catalog-nav-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .catalog-nav-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 740px) {
  .catalog-nav-section { padding: 60px 0 50px; }
  .product-section { padding: 70px 0; scroll-margin-top: 85px; }
  .product-intro { grid-template-columns: 1fr; gap: 36px; }
  .product-intro img { height: 240px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-item h3, .product-item p { min-height: auto; }
  .product-popover { width: calc(100vw - 28px); max-height: calc(100vh - 28px); padding: 21px; border-radius: 18px; }
  .product-brand-grid { grid-template-columns: repeat(2, 1fr); }
}

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