/* =========================================================
   BACHA COLLECTION — páginas renderizadas en el servidor
   (ficha de producto, guía de talles, 404)

   Reutiliza los tokens y los .btn de css/style.css; acá solo
   va lo propio de estas páginas, que no comparten el header
   ni el layout de la home.
========================================================= */

/* Solo aplica a las páginas server-side, para no pisar la home */
body.page-pdp,
body.page-doc {
  background: var(--off-white);
  padding-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ HEADER / FOOTER ============ */
.page-header {
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* El header y el footer de estas páginas van sobre --black, y el logo es negro
   sobre transparente: sin invert(1) queda invisible. El arte ya es escala de
   grises, así que invertir lo pasa a blanco sin alterar el degradado del arco. */
.page-brand img {
  height: 40px;
  width: auto;
  filter: invert(1);
}

.page-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.page-nav a {
  color: var(--off-white);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.page-nav a:hover {
  color: var(--crudo);
}

.page-footer {
  background: var(--black);
  color: var(--off-white);
  margin-top: 80px;
  padding: 48px 24px;
}

.page-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-footer-logo {
  height: 32px;
  width: auto;
  margin: 0 auto 20px;
  filter: invert(1);
}

.page-footer-nap p {
  margin: 6px 0;
  font-size: 0.9rem;
  color: var(--gray-light);
  line-height: 1.7;
}

.page-footer-nap a {
  color: var(--crudo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-footer-legal {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--gray);
}

/* ============ MIGA DE PAN ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--gray);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--black);
}

.breadcrumb [aria-current="page"] {
  color: var(--black);
  font-weight: 600;
}

.breadcrumb-sep {
  opacity: 0.45;
}

/* ============ FICHA DE PRODUCTO ============ */
.pdp-inner,
.doc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.pdp-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: start;
}

.pdp-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pdp-gallery-item {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.pdp-gallery-item.is-main {
  grid-column: 1 / -1;
}

.pdp-gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.pdp-gallery-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 4rem;
  color: var(--gray-light);
}

.pdp-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 600;
  margin: 0 0 10px;
}

.pdp-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  text-transform: uppercase;
  line-height: 1.08;
  margin: 0 0 14px;
}

.pdp-price {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.pdp-currency {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.1em;
}

.pdp-stock {
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0 0 22px;
}

.pdp-stock.is-available {
  color: #1c7c3c;
}

.pdp-stock.is-sold-out {
  color: #a12525;
}

.pdp-desc {
  line-height: 1.75;
  color: #333;
  margin: 0 0 26px;
}

.pdp-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  margin: 0 0 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.pdp-specs dt {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--gray);
  align-self: center;
}

.pdp-specs dd {
  margin: 0;
}

.pdp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.pdp-note {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.65;
  margin: 0;
}

.pdp-note a,
.doc-note a,
.doc-block a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pdp-block {
  margin-top: 72px;
}

.pdp-block h2,
.pdp-related h2,
.doc-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
  margin: 0 0 20px;
}

/* ============ TABLAS ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.data-table caption {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
  padding-bottom: 10px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background: var(--black);
  color: var(--off-white);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.data-table tbody th {
  font-weight: 700;
}

.data-table td.in-stock {
  color: #1c7c3c;
  font-weight: 600;
}

.data-table td.out-stock {
  color: var(--gray);
}

/* Las tablas anchas scrollean solas en mobile en vez de romper el layout */
.pdp-block,
.doc-block {
  overflow-x: auto;
}

/* ============ RELACIONADOS ============ */
.pdp-related {
  margin-top: 80px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.related-card a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13, 13, 13, 0.1);
}

.related-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.related-name {
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.94rem;
}

.related-price {
  padding: 0 14px 16px;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ============ PÁGINAS DE TEXTO (guía de talles, 404) ============ */
.doc-inner {
  max-width: 860px;
}

.doc-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.doc-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin: 0 0 20px;
}

.doc-block {
  margin-top: 56px;
}

.doc-block p {
  line-height: 1.8;
  color: #333;
}

.doc-list {
  padding-left: 20px;
  list-style: decimal;
  display: grid;
  gap: 14px;
}

.doc-list li {
  line-height: 1.75;
  color: #333;
}

.doc-note {
  font-size: 0.86rem;
  color: var(--gray);
  line-height: 1.7;
}

.doc-center {
  text-align: center;
  padding-top: 80px;
}

.doc-actions {
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pdp-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .page-header-inner {
    justify-content: center;
    text-align: center;
  }

  .page-nav {
    gap: 18px;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .pdp-gallery {
    grid-template-columns: 1fr;
  }

  .pdp-specs {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .pdp-specs dd {
    margin-bottom: 12px;
  }
}
