/* ============================================
   AGILOX Japan - Product Page Styles
   Based on agilox.net/en/product/ design

   Typography: style.css のグローバル定義を継承
     h2: clamp(28px, 3.5vw, 40px), w700, uppercase
     h3: clamp(22px, 2.5vw, 30px), w700
     p:  16px, line-height 1.5
   ============================================ */

.product-subtitle {
  font-size: clamp(18px, 2.5vw, 25px);
  font-weight: 700;
  font-style: italic;
  color: var(--color-green);
  text-align: center;
  margin-bottom: 40px;
}

/* --- Product Hero --- */
.product-hero {
  position: relative;
  height: calc(100vh - 96px);
  min-height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  margin-top: var(--header-height);
}

/* --- Catchphrase --- */
.product-catchphrase {
  background-color: var(--color-dark);
  padding: 80px 0;
  text-align: center;
}

.product-catchphrase h1 {
  color: var(--color-green);
  margin-bottom: 10px;
}

.product-catchphrase p {
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- Specs Bar --- */
.specs-bar {
  background-color: var(--color-dark);
  padding: 10px 0;
}

.specs-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}

.specs-bar__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 1);
}

.specs-bar__item:last-child {
  border-right: none;
}

.specs-bar__value {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: var(--color-green);
  line-height: 1;
}

.specs-bar__value small {
  font-size: 0.5em;
  font-weight: 700;
}

.specs-bar__label {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 1);
  letter-spacing: 0.5px;
}

/* --- Product Overview (dark bg, centered text + video) --- */
.product-overview {
  background-color: var(--color-dark);
  padding: 80px 0;
  color: var(--color-white);
}

.product-overview__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-overview__text {
  max-width: 900px;
  margin-bottom: 50px;
}

.product-overview__text h2 {
  color: var(--color-white);
  margin-bottom: 25px;
}

.product-overview__text p {
  color: var(--color-white);
}

.product-overview__video {
  width: 100%;
  max-width: 960px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Product Features (dark bg, 3-col with vertical dividers) --- */
.product-features {
  background-color: var(--color-dark);
  padding: 80px 0;
}

.product-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.product-feature-card {
  padding: 30px 40px;
  border-right: 1px solid rgba(255, 255, 255, 1);
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

.product-feature-card:last-child {
  border-right: none;
}

.product-feature-card h3 {
  color: var(--color-green);
  margin-bottom: 20px;
  line-height: 1.3;
}

.product-feature-card p {
  color: var(--color-white);
}

/* --- X-SWARM (white bg) --- */
.product-xswarm {
  background-color: var(--color-white);
  padding: 80px 0;
  color: var(--color-text-dark);
}

.product-xswarm__inner {
  display: flex;
  gap: 40px;
  align-items: center;
}

.product-xswarm__text h2 {
  color: var(--color-text-dark);
  margin-bottom: 20px;
}

.product-xswarm__image {
  flex: 0 0 auto;
  max-width: 50%;
}

.product-xswarm__image img {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
}

/* --- Product Specs (dark bg, image + table) --- */
.product-specs {
  background-color: var(--color-dark);
  padding: 80px 0;
  color: var(--color-white);
}

.product-specs h2 {
  text-align: center;
  color: var(--color-white);
  margin-bottom: 10px;
}

.product-specs__layout {
  gap: 20px;
  display: flex;
  align-items: center;
}

.product-specs__image img {
  width: 100%;
  max-width: 500px;
}

.product-specs__table-wrapper {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.product-specs__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.product-specs__table th {
  text-align: left;
  padding: 14px 10px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 1);
  color: var(--color-white);
}

.product-specs__table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 1);
  color: var(--color-white);
}

.product-specs__table td:first-child {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.product-specs__table td:not(:first-child),
.product-specs__table th:not(:first-child) {
  text-align: center;
}

/* --- Variants (dark bg) --- */
.product-variants {
  background-color: var(--color-dark);
  padding: 80px 0;
  color: var(--color-white);
}

.product-variants h2 {
  text-align: center;
  color: var(--color-white);
  margin-bottom: 10px;
}

.product-variant {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.product-variant:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.product-variant h3 {
  color: var(--color-white);
  margin-bottom: 15px;
}

.product-variant > p {
  color: var(--color-white);
  margin-bottom: 30px;
}

/* --- Add-ons (white bg, 3-col with vertical dividers) --- */
.product-addons {
  background-color: var(--color-white);
  padding: 100px 0;
}

.product-addons h2 {
  text-align: center;
  color: var(--color-text-dark);
  margin-bottom: 50px;
}

.product-addons__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 30px;
}

.product-addon-card {
  padding: 10px 30px 0px;
  border-right: 1px solid var(--color-text-dark);
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 0;
}

.product-addon-card:nth-child(3n),
.product-addon-card:last-child {
  border-right: none;
}

.product-addon-card h3 {
  color: var(--color-green);
  margin-bottom: 5px;
}

.product-addon-card p {
  color: #000;
  margin-bottom: 40px;
}

/* 4-column variant (for pages with exactly 4 add-ons) */
.product-addons__grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

.product-addons__grid--4col .product-addon-card:nth-child(3n) {
  border-right: 1px solid var(--color-text-dark);
}

/* ============================================
   Responsive - Product Pages
   ============================================ */
@media (max-width: 1024px) {
  .product-features {
    padding-top: 0;
  }

  .product-features__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .product-feature-card {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 1);
  }

  .product-feature-card:last-child {
    border-bottom: none;
  }

  .product-addons__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-addon-card:nth-child(3n) {
    border-right: 1px solid var(--color-text-dark);
  }

  .product-addon-card:nth-child(2n) {
    border-right: none;
  }

  .product-specs__layout {
    flex-direction: column;
  }

  .product-specs__image {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .product-hero {
    height: 60vh;
    min-height: 350px;
  }

  .specs-bar__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .specs-bar__item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 1);
  }

  .specs-bar__item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 1);
  }

  .specs-bar__item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .product-features__grid {
    grid-template-columns: 1fr;
  }

  .product-feature-card {
    padding: 30px 0;
  }

  .product-xswarm__inner {
    flex-direction: column;
    text-align: center;
  }

  .product-addons__grid {
    grid-template-columns: 1fr;
  }

  .product-addon-card {
    border-right: none !important;
    padding: 10px 0 0;
  }

  .product-variant {
    padding: 24px 0;
  }

  .product-specs__table {
    font-size: 13px;
  }

  .product-specs__table th,
  .product-specs__table td {
    padding: 10px 6px;
  }
}

@media (max-width: 480px) {
  .specs-bar__grid {
    grid-template-columns: 1fr 1fr;
  }
}
