/* ════ PÁGINAS INTERIORES (categoria.php / producto.php) ════ */

.interior-main {
  margin-top: calc(var(--header-h) + var(--navbar-h));
  min-height: calc(100vh - var(--header-h) - var(--navbar-h) - 100px);
  padding: 40px 24px 64px;
  background: var(--light);
}

.interior-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: .78rem; color: var(--gray);
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--navy); text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--gold); }
.bc-sep { color: #bbb; }
.bc-current { color: var(--gray); font-weight: 600; }

/* ── Encabezado categoría / producto ── */
.cat-header { margin-bottom: 36px; }

.cat-titulo {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; color: var(--navy);
  letter-spacing: .04em; margin-bottom: 12px;
}
.cat-titulo + .gold-bar { margin-bottom: 20px; }

.cat-descripcion {
  font-size: .92rem; color: var(--gray);
  line-height: 1.85; max-width: 780px;
  margin-top: 8px;
}

/* ── Imágenes de categoría ── */
.cat-imagenes {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.cat-img-wrap {
  flex: 1 1 260px; max-width: 380px;
}
.cat-img-wrap img {
  width: 100%; border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  display: block;
}
.cat-img-wrap figcaption {
  font-size: .75rem; color: var(--gray);
  margin-top: 6px; text-align: center;
}

/* ── Sección interior ── */
.cat-section { margin-bottom: 48px; }

.cat-section-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Grid de hijos ── */
.cat-children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cat-child-card {
  display: flex; align-items: flex-start; flex-direction: column;
  background: #fff; border-radius: 6px; padding: 18px 20px;
  text-decoration: none;
  border-left: 4px solid var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  gap: 6px;
  position: relative;
}
.cat-child-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.09);
}
.cat-child-name {
  font-size: .88rem; font-weight: 700; color: var(--navy);
  line-height: 1.3;
}
.cat-child-desc {
  font-size: .78rem; color: var(--gray); line-height: 1.5;
}
.cat-child-arrow {
  margin-top: auto; color: var(--gold);
  font-size: 1rem; align-self: flex-end;
}

/* ── Mosaico de productos / subcategorías ── */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
}

.mosaic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  transition: background .15s;
  overflow: hidden;
}
.mosaic-card:hover { background: #fafafa; }

/* L dorada en hover: barra horizontal 30% ancho */
.mosaic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 30%; height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
  z-index: 2;
}
/* L dorada en hover: barra vertical 30% alto */
.mosaic-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 30%;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .25s ease;
  z-index: 2;
}
.mosaic-card:hover::before,
.mosaic-card:hover::after {
  transform: scale(1);
}

/* Imagen del mosaico */
.mosaic-img {
  width: 100%;
  overflow: hidden;
  background: #f2f2f2;
}
.mosaic-img img {
  width: 100%; height: 160px;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.mosaic-card:hover .mosaic-img img { transform: scale(1.03); }

.mosaic-img-placeholder {
  width: 100%; height: 160px;
  background: #ebebeb;
}

/* Texto del mosaico */
.mosaic-body {
  padding: 18px 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}

.mosaic-name {
  font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); line-height: 1.3;
}

.mosaic-desc {
  font-size: .8rem; color: var(--gray);
  line-height: 1.7; margin: 0;
}

/* ── Estado vacío ── */
.cat-empty {
  text-align: center; padding: 48px 24px;
  background: #fff; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.cat-empty p {
  font-size: .9rem; color: var(--gray);
  margin-bottom: 20px; line-height: 1.7;
}

/* ════ PÁGINA DE PRODUCTO ════ */

.prod-grupo-tag {
  display: inline-block;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 8px;
}

/* ── Layout superior: imagen | descripción ── */
.prod-top {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

/* Galería */
.prod-galeria { }
.prod-galeria-empty { min-height: 200px; }

.prod-img-principal {
  width: 100%; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  display: block; margin-bottom: 12px;
  object-fit: contain;
  background: #fff;
}
.prod-thumbnails { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-thumb {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 4px; border: 2px solid var(--border);
  cursor: pointer; transition: border-color .2s;
}
.prod-thumb:hover { border-color: var(--gold); }

/* Columna descripción */
.prod-desc-col { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }

.prod-descripcion-top {
  font-size: .92rem; color: var(--gray);
  line-height: 1.85; margin: 0;
}

.prod-cat-link {
  font-size: .85rem; color: var(--gray); margin: 0;
}
.prod-cat-link a {
  color: var(--gold); text-decoration: none; font-weight: 600;
}
.prod-cat-link a:hover { text-decoration: underline; }

/* CTA fuera de las columnas */
.prod-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ── Tabs de producto ── */

.prod-tabs { margin-bottom: 28px; }

.prod-tabs-nav {
  display: flex;
  border-bottom: none;
}

.prod-tab-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  padding: 18px 8px 14px;
  background: #f2f2f2;
  border: 1px solid #ddd;
  border-right: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  min-width: 0;
}
.prod-tab-btn:last-child { border-right: 1px solid #ddd; }
.prod-tab-btn:first-child { border-radius: 6px 0 0 0; }
.prod-tab-btn:last-child:not(:first-child) { border-radius: 0 6px 0 0; }
.prod-tab-btn:only-child { border-radius: 6px 6px 0 0; }
.prod-tab-btn:hover { background: #e8e8e8; }
.prod-tab-btn.active { background: #fff; border-bottom-color: #fff; z-index: 1; }

.prod-tab-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: #bbb;
  border-radius: 5px;
  color: #fff;
  flex-shrink: 0;
  transition: background .15s;
}
.prod-tab-btn.active .prod-tab-icon { background: var(--gold); }

.prod-tab-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  color: #888;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  transition: color .15s;
}
.prod-tab-btn.active .prod-tab-label { color: var(--navy); }

.prod-tabs-content {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 6px 6px;
  padding: 28px;
  margin-top: -1px;
  min-height: 80px;
}

.prod-tab-panel { display: none; }
.prod-tab-panel.active { display: block; }
.prod-tab-panel > p {
  font-size: .88rem; color: var(--gray); line-height: 1.85; margin: 0;
}

/* Tabla de atributos */
.prod-atributos {
  width: 100%; border-collapse: collapse;
  font-size: .83rem;
}
.prod-atributos th,
.prod-atributos td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.prod-atributos th {
  color: var(--navy); font-weight: 700;
  background: #f8f8f8;
  width: 38%; white-space: nowrap;
}
.prod-atributos td { color: var(--gray); }
.prod-atributos tr:last-child th,
.prod-atributos tr:last-child td { border-bottom: none; }


.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 9px 24px;
  border-radius: 3px; font-family: inherit;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ════ RESPONSIVE ════ */
@media (max-width: 900px) {
  .prod-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

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

@media (max-width: 768px) {
  .interior-main {
    margin-top: calc(var(--header-h) + var(--navbar-h));
    padding: 24px 16px 48px;
  }
  .cat-children-grid { grid-template-columns: 1fr; }
  .mosaic-grid { grid-template-columns: repeat(2, 1fr); }
  .mosaic-img img,
  .mosaic-img-placeholder { height: 120px; }
  .mosaic-body { padding: 14px 14px 18px; }

  .prod-tab-icon { width: 36px; height: 36px; }
  .prod-tab-btn { padding: 12px 4px 10px; gap: 7px; }
  .prod-tab-label { font-size: .65rem; }
  .prod-tabs-content { padding: 20px 16px; }
}

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