/* ============================================================
   HOMMIE ALUMINUM — PRODUCT PAGES
   Loaded after assets/css/base.css
   ============================================================ */

/* ---------- Products dropdown in header ---------- */
.nav-item-dropdown { position: relative; }
.nav-item-dropdown > .nav-link { display: inline-flex; align-items: center; gap: 6px; }
.nav-item-dropdown .caret {
  width: 10px; height: 10px; flex: none;
  transition: transform 0.25s ease;
}
.nav-item-dropdown:hover .caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 232px; padding: 10px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 18px 44px rgba(28, 60, 84, 0.16);
  border: 1px solid rgba(59, 163, 219, 0.12);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1001;
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown::before {
  content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
.nav-dropdown li { list-style: none; }
.nav-dropdown a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 9px;
  font-size: 0.9375rem; font-weight: 500; color: var(--text-dark);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown a:hover { background: var(--brand-blue-tint); color: #1f7fb3; }

/* ---------- Page hero ---------- */
.p-hero {
  position: relative;
  margin-top: var(--header-height);
  min-height: 460px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: #12303f;
}
.p-hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* Two stacked scrims: a left-to-right wash for the text column, plus a
   bottom-up scrim so the copy always sits on dark ground even when the
   banner photo itself is bright (glass facades, white walls, sky). */
.p-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(7, 26, 38, 0.90) 0%, rgba(7, 26, 38, 0.70) 42%, rgba(7, 26, 38, 0.22) 100%),
    linear-gradient(0deg, rgba(7, 26, 38, 0.62) 0%, rgba(7, 26, 38, 0.18) 46%, rgba(7, 26, 38, 0) 70%);
}
.p-hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding: 56px 0 52px; color: #fff;
}
.p-breadcrumb {
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 8px rgba(4, 18, 27, 0.55);
  margin-bottom: 14px;
}
.p-breadcrumb a { color: rgba(255, 255, 255, 0.86); }
.p-breadcrumb a:hover { color: #fff; }
.p-breadcrumb span.sep { margin: 0 8px; opacity: 0.6; }
.p-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.01em;
  margin-bottom: 14px;
  /* base.css sets a global `h1 { color: var(--text-dark) }` which beats the
     inherited white from .p-hero-inner — override it explicitly or the title
     renders dark grey on a dark photo and becomes unreadable. */
  color: #fff;
  text-shadow: 0 2px 22px rgba(4, 18, 27, 0.6);
}
.p-hero p {
  max-width: 640px; font-size: 1.0625rem; line-height: 1.65;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 12px rgba(4, 18, 27, 0.55);
}
.p-hero-stats {
  display: flex; flex-wrap: wrap; gap: 34px; margin-top: 26px;
  padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.p-hero-stats .stat-num {
  display: block; font-size: 1.75rem; font-weight: 700; color: #fff; line-height: 1.1;
  text-shadow: 0 1px 12px rgba(4, 18, 27, 0.5);
}
.p-hero-stats .stat-label {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 1px 8px rgba(4, 18, 27, 0.5);
}

/* ---------- Sticky category sub-nav ---------- */
.p-subnav {
  position: sticky; top: var(--header-height); z-index: 900;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(59, 163, 219, 0.14);
}
.p-subnav-inner {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.p-subnav-inner::-webkit-scrollbar { display: none; }
.p-subnav a {
  flex: none; padding: 16px 18px;
  font-size: 0.9375rem; font-weight: 600; color: var(--text-medium);
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.p-subnav a:hover { color: var(--brand-blue); }
.p-subnav a.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }

/* ---------- Intro ---------- */
.p-intro-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.p-intro h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600;
  line-height: 1.2; margin-bottom: 18px; color: var(--text-dark);
}
.p-intro p { color: var(--text-medium); margin-bottom: 16px; }
.p-intro-media { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.p-intro-media img { width: 100%; display: block; }

.p-checks { display: grid; gap: 12px; margin-top: 22px; }
.p-checks li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.9375rem; color: var(--text-dark);
}
.p-checks li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand-blue); }

/* ---------- Sub-category cards ---------- */
.subcat-list { display: grid; gap: 34px; }
.subcat-card {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  background: #fff; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(59, 163, 219, 0.14);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.subcat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.subcat-card:nth-child(even) { grid-template-columns: 1.1fr 0.9fr; }
.subcat-card:nth-child(even) .subcat-media { order: 2; }

.subcat-media {
  position: relative; min-height: 300px; background: var(--brand-blue-tint);
  overflow: hidden;
}
.subcat-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.subcat-body { padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; }
.subcat-body h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem; font-weight: 600; line-height: 1.2;
  color: var(--text-dark); margin-bottom: 12px;
}
.subcat-body p { color: var(--text-medium); font-size: 0.9375rem; margin-bottom: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-size: 0.8125rem; font-weight: 500; color: #21718f;
  background: var(--brand-blue-tint); border: 1px solid rgba(59, 163, 219, 0.22);
  padding: 6px 13px; border-radius: 30px;
}
.chips.muted .chip { background: #f1f5f8; border-color: #e2eaf0; color: var(--text-medium); }

.subcat-cta {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 0.9375rem; font-weight: 600; color: var(--brand-blue);
  padding-bottom: 3px; border-bottom: 2px solid rgba(59, 163, 219, 0.3);
  transition: gap 0.2s ease, border-color 0.2s ease;
}
.subcat-cta:hover { gap: 13px; border-color: var(--brand-blue); }

/* ---------- Placeholder tile ---------- */
.ph-tile {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background:
    linear-gradient(135deg, rgba(59, 163, 219, 0.10) 0%, rgba(96, 184, 246, 0.05) 100%),
    repeating-linear-gradient(45deg, #f4f9fc 0 14px, #eef6fb 14px 28px);
}
.ph-tile svg { width: 72px; height: 72px; color: var(--brand-blue); opacity: 0.55; }
.ph-tile span {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-light); font-weight: 600;
}

/* ---------- Feature band ---------- */
.p-band { background: var(--bg-light); }
.p-band .features-grid { grid-template-columns: repeat(4, 1fr); }

/* ---------- Related ranges ---------- */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-table th, .spec-table td { padding: 15px 20px; text-align: left; font-size: 0.9375rem; border-bottom: 1px solid #eef3f7; }
.spec-table th { width: 34%; font-weight: 600; color: var(--text-dark); background: #f7fbfd; }
.spec-table td { color: var(--text-medium); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .p-intro-grid { grid-template-columns: 1fr; gap: 34px; }
  .subcat-card, .subcat-card:nth-child(even) { grid-template-columns: 1fr; }
  .subcat-card:nth-child(even) .subcat-media { order: 0; }
  .subcat-media { min-height: 250px; }
  .p-band .features-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .p-band .features-grid, .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .p-hero { min-height: 380px; }
  .p-hero-inner { padding: 40px 0 36px; }
  .p-hero-stats { gap: 22px; }
  .p-hero-stats .stat-num { font-size: 1.4rem; }
  .subcat-body { padding: 26px 22px; }
  .p-subnav { top: 64px; }
  .nav-dropdown {
    position: static; transform: none; opacity: 1; visibility: visible;
    pointer-events: auto; box-shadow: none; border: none; padding: 0 0 0 14px;
    min-width: 0; background: transparent;
  }
  .nav-item-dropdown:hover .nav-dropdown { transform: none; }
}
