/* ==========================================================================
   Components: product card, nameplate, qty, tabs, accordion, notices,
   spec table, carousel controls, signal badge
   ========================================================================== */

/* ------------------------------------------------------------ product card */
/* Product grid: --cols per row; a short last row sits centred. */
.p-grid { display: flex; flex-wrap: wrap; justify-content: center; --cols: 4; --g: 30px; gap: var(--g); }
.p-grid--3 { --cols: 3; }
@media (max-width: 1240px) { .p-grid { --cols: 3; } }
@media (max-width: 900px) { .p-grid { --cols: 2; --g: 18px; } }
@media (max-width: 520px) { .p-grid { --cols: 1; } }

.p-grid > * { display: flex; min-width: 0; flex: 0 0 calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols)); }
.p-grid > * > .p-card { flex: 1; min-width: 0; }
.p-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 26px;
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.p-card:hover { box-shadow: 0 30px 60px -32px rgb(8 21 37 / 0.45); }
.p-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.02;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(180deg, #f6f9fb, #e6edf3);
}
.p-card__media img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.6s var(--ease); }
.p-card:hover .p-card__media img { transform: scale(1.05); }
.p-card__tech { position: absolute; left: 12px; top: 12px; z-index: 2; }
.p-card__buy {
  display: flex;
  align-items: stretch;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.86rem;
}
.p-card__buy > * { display: flex; align-items: center; padding: 0 14px; min-height: 46px; }
.p-card__buy > :first-child { flex: 1; min-width: 0; color: var(--text-mute); font-size: 0.82rem; line-height: 1.25; }
.p-card__price { border-left: 1px solid var(--line); font-family: var(--f-head); font-weight: 800; font-size: 1rem; color: var(--blue); white-space: nowrap; flex: none; }
.p-card__buy--quote .p-card__price { font-size: 0.86rem; color: var(--ink); transition: background-color 0.2s; }
.p-card__buy--quote .p-card__price:hover { background: var(--mist); color: var(--ink); }
.p-card__title { margin-top: 22px; font-size: 1.12rem; line-height: 1.3; text-align: center; }
.p-card__title a:hover { color: var(--blue); }
.p-card__model { margin-top: 8px; text-align: center; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.p-card__note { margin-top: 6px; text-align: center; font-size: 0.85rem; }
.p-card__note--pl { color: var(--blue); font-weight: 600; }
.p-card__cta { margin-top: auto; padding-top: 20px; display: flex; justify-content: center; }

.qty { display: flex; align-items: center; gap: 8px; }
.qty input { width: 52px; height: 32px; border: 0; background: var(--mist); border-radius: 3px; text-align: center; font: inherit; font-weight: 600; color: var(--ink); }

/* -------------------------------------------------------------- nameplate */
/* A model plate where no approved, model-matched photograph exists yet. */
.plate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 78%;
  aspect-ratio: 1.25;
  padding: 18px;
  color: #fff;
  background: linear-gradient(160deg, var(--navy-3), var(--navy));
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  text-align: center;
}
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgb(220 229 236 / 0.06) 1px, transparent 1px), linear-gradient(to bottom, rgb(220 229 236 / 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.plate > * { position: relative; }
.plate__screw { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 0.22); box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 0.3); }
.plate__screw:nth-child(1) { left: 12px; top: 12px; }
.plate__screw:nth-child(2) { right: 20px; top: 12px; }
.plate__screw:nth-child(3) { left: 12px; bottom: 20px; }
.plate__screw:nth-child(4) { right: 12px; bottom: 12px; }
.plate__range { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-d); }
.plate__icon .icon { width: 30px; height: 30px; color: var(--cyan); margin: 4px 0; }
.plate__model { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: 0.02em; line-height: 1; }
.plate__kind { max-width: 90%; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-d); line-height: 1.35; }
.plate--access { background: linear-gradient(160deg, #3a4757, #1a2431); }
.plate--access .plate__icon .icon { color: #d6dee6; }
.plate--safety .plate__icon .icon { color: #f5b84b; }

/* -------------------------------------------------------------------- tabs */
.tabs__list { display: flex; flex-wrap: wrap; }
.tabs__btn {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 260px;
  padding: 20px 28px;
  border: 0;
  background: var(--paper);
  box-shadow: 0 16px 40px -28px rgb(8 21 37 / 0.4);
  text-align: left;
  font-family: var(--f-head);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--text-mute);
}
.tabs__btn b { font-size: 2rem; font-weight: 800; letter-spacing: 0; color: var(--line); }
.tabs__btn[aria-selected="true"] { background: var(--blue); color: #fff; }
.tabs__btn[aria-selected="true"] b { color: #fff; }
@media (max-width: 640px) { .tabs__btn { min-width: 0; flex: 1; padding: 16px; gap: 10px; } .tabs__btn b { font-size: 1.4rem; } }

/* --------------------------------------------------------------- accordion */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__q {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--f-head);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}
.acc__q .icon { color: var(--blue); transition: transform 0.25s; }
.acc__q[aria-expanded="true"] .icon { transform: rotate(45deg); }
.acc__a { padding: 0 48px 24px 0; }
.dark .acc, .dark .acc__item { border-color: var(--line-d); }
.dark .acc__q { color: #fff; }

/* ----------------------------------------------------------------- notices */
.notice { display: flex; gap: 14px; padding: 18px 20px; border-left: 3px solid var(--blue); background: var(--mist); font-size: 0.93rem; }
.notice .icon { color: var(--blue); margin-top: 3px; }
.notice--warn { border-color: var(--warn); }
.notice--warn .icon { color: var(--warn); }
.dark .notice { background: rgb(255 255 255 / 0.05); }

/* -------------------------------------------------------------- spec table */
.specs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.specs th, .specs td { padding: 15px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 38%; padding-right: 20px; font-weight: 600; color: var(--ink); }
.specs td small { display: block; margin-top: 2px; color: var(--text-mute); font-size: 0.8rem; }
.specs .is-confirm { color: var(--text-mute); font-style: italic; }

/* -------------------------------------------------------- carousel controls */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding-bottom: 6px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; flex: 0 0 calc((100% - 90px) / 4); }
@media (max-width: 1240px) { .carousel__track > * { flex-basis: calc((100% - 60px) / 3); } }
@media (max-width: 900px) { .carousel__track > * { flex-basis: calc((100% - 30px) / 2); } }
@media (max-width: 560px) { .carousel__track > * { flex-basis: 84%; } .carousel__track { gap: 16px; } }
.carousel__nav { display: flex; align-items: center; gap: 10px; }
.carousel__btn { display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); transition: background 0.2s, color 0.2s; }
.carousel__btn:hover { background: var(--blue); color: #fff; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.carousel__dots button { width: 16px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: var(--line); transition: width 0.3s, background 0.3s; }
.carousel__dots button[aria-current="true"] { width: 40px; background: var(--blue); }

/* ----------------------------------------------------------- signal badge */
/* Round badge with signal rings — the design-1 "circle seal", made a radio pulse. */
.signal-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy);
  text-align: center;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
  padding: 22px;
}
.signal-badge::before, .signal-badge::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgb(0 200 244 / 0.55);
}
.signal-badge::after { inset: -26px; border-color: rgb(0 200 244 / 0.25); animation: ring 3.2s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(0.86); opacity: 1; } 100% { transform: scale(1.08); opacity: 0; } }

/* ------------------------------------------------------------- reticle icon */
/* Icon inside a locate reticle: circle with four ticks. */
.reticle {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  color: var(--blue);
  background: var(--paper);
}
.reticle .icon { width: 26px; height: 26px; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--blue); }
.reticle::before { left: 50%; top: -6px; bottom: -6px; width: 1.5px; transform: translateX(-50%); mask: linear-gradient(#000 0 8px, transparent 8px calc(100% - 8px), #000 calc(100% - 8px)); }
.reticle::after { top: 50%; left: -6px; right: -6px; height: 1.5px; transform: translateY(-50%); mask: linear-gradient(90deg, #000 0 8px, transparent 8px calc(100% - 8px), #000 calc(100% - 8px)); }
.dark .reticle { background: transparent; border-color: var(--line-d); color: var(--cyan); }
.dark .reticle::before, .dark .reticle::after { background: var(--cyan); }

/* ---------------------------------------------------------- toast (cart) */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 130; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: toast-in 0.35s var(--ease); max-width: calc(100% - 32px); }
.toast .icon { color: var(--cyan); }
.toast a { color: var(--cyan); font-weight: 600; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
.p-card__media.has-img, .pd__media.has-img { background: #fff; }
/* Temporary placeholder photos fill the frame (they have their own backgrounds). */
.p-card__media.is-photo img, .pd__media.is-photo img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
