* { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: #1a1a1a;
      color: #e0e0e0;
      line-height: 1.6;
      overflow-x: hidden;
    }

    /* =========================
       HEADER — responsive
       ========================= */
    .header-nav {
      background: #2d2d2d;
      padding: 16px 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 5px 20px rgba(0,0,0,0.3);
      position: sticky;
      top: 0;
      z-index: 1000;
      flex-wrap: wrap;
      gap: 10px;
      min-height: 64px;
    }

    .logo {
      font-size: 28px;
      font-weight: bold;
      color: #8b7355;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
      flex-shrink: 0;
    }

    .nav-links {
      display: flex;
      gap: 28px;
      align-items: center;
      transition: .3s;
      flex-shrink: 0;
    }

    .nav-links a {
      color: #e0e0e0;
      text-decoration: none;
      transition: color 0.3s;
      font-weight: 500;
      white-space: nowrap;
    }

    .nav-links a:hover { color: #8b7355; }

    .login-btn {
      background: #8b7355;
      color: white;
      padding: 10px 25px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      transition: all 0.3s;
      text-decoration: none;
      font-weight: 600;
      display: inline-block;
      white-space: nowrap;
    }

    .login-btn:hover {
      background: #a0865f;
      transform: scale(1.05);
    }

    .cart-icon {
      position: relative;
      text-decoration: none;
      font-size: 22px;
      color: #fff;
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }

    .cart-badge {
      position: absolute;
      top: -6px;
      right: -10px;
      background: #c0392b;
      color: white;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 50%;
      font-weight: 600;
    }

    /* Botón hamburguesa — oculto por defecto */
    .menu-toggle {
      display: none;
      background: transparent;
      border: 2px solid #3d3d3d;
      color: #e0e0e0;
      font-size: 22px;
      padding: 8px 12px;
      border-radius: 10px;
      cursor: pointer;
      transition: .3s;
      margin-left: auto;
      font-family: inherit;
    }
    .menu-toggle:hover {
      border-color: #8b7355;
      color: #8b7355;
    }

    /* =========================
       CONTENIDO
       ========================= */
    .container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 60px 40px; }

    /* .product-detail layout handled by Bootstrap row g-4 / col-md-6 */

    .gallery { display: flex; flex-direction: column; gap: 15px; }

    .main-image {
      width: 100%;
      aspect-ratio: 4/5;           /* Ratio vertical para muebles de baño */
      background: linear-gradient(135deg, #3d3d3d, #2a2a2a);
      border-radius: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #777;
      font-size: 18px;
      overflow: hidden;
      border: 2px solid #3d3d3d;
      box-shadow: 0 10px 25px rgba(0,0,0,.25);
    }

    .main-image img {
      width: 100%;
      height: 100%;
      object-fit: contain;         /* Mostrar imagen COMPLETA sin recortar */
      object-position: center center;
      display: block;
      padding: 6px;               /* pequeño margen para que no toque los bordes */
      box-sizing: border-box;
      background: linear-gradient(135deg, #3d3d3d, #2a2a2a);
    }

    /* .thumbnails layout handled by Bootstrap row row-cols-4 g-2 */

    .thumbnail, .thumb {
      height: 80px;
      background: linear-gradient(135deg, #3d3d3d, #2d2d2d);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #777;
      font-size: 12px;
      cursor: pointer;
      border: 2px solid #3d3d3d;
      transition: all 0.3s;
      overflow: hidden;
    }
    .thumbnail:hover, .thumb:hover {
      border-color: #8b7355;
      box-shadow: 0 10px 25px rgba(139,115,85,.18);
      transform: translateY(-2px);
    }
    .thumbnail.active, .thumb.active { border-color: #8b7355; box-shadow: 0 0 0 2px #8b7355; }
    .thumbnail img { width: 100%; height: 100%; object-fit: cover; }

    .product-info { display: flex; flex-direction: column; gap: 20px; }

    .product-title { font-size: clamp(24px, 4vw, 32px); color: #8b7355; font-weight: bold; }

    .rating { display: flex; align-items: center; gap: 10px; color: #ffa500; }
    .rating span { color: #a0a0a0; }

    .price-large { font-size: clamp(32px, 5vw, 42px); color: #8b7355; font-weight: bold; }

    .stock-indicator {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      background: #2d4a2d;
      border-radius: 12px;
      color: #7fdb7f;
      border: 2px solid rgba(127,219,127,.18);
    }

    .description { color: #a0a0a0; line-height: 1.8; font-size: 16px; }

    .features-box {
      background: #2d2d2d;
      padding: 20px;
      border-radius: 15px;
      border: 2px solid #3d3d3d;
      box-shadow: 0 10px 25px rgba(0,0,0,.2);
    }
    .features-box h3 { color: #8b7355; margin-bottom: 15px; }

    .feature-item {
      display: flex;
      align-items: center;
      gap: 15px;
      padding: 12px 0;
      border-bottom: 1px solid #3d3d3d;
    }
    .feature-item:last-child { border-bottom: none; }
    .feature-icon { font-size: 24px; color: #8b7355; }

    .cart-section {
      background: #2d2d2d;
      padding: 25px;
      border-radius: 15px;
      border: 2px solid #3d3d3d;
      box-shadow: 0 10px 25px rgba(0,0,0,.2);
    }
    .cart-section h3 { color: #8b7355; margin-bottom: 15px; }

    .quantity-selector {
      display: flex;
      align-items: center;
      gap: 15px;
      margin: 20px 0;
      flex-wrap: wrap;
    }

    .quantity-btn {
      width: 40px;
      height: 40px;
      background: #3d3d3d;
      border: 2px solid #4a4a4a;
      border-radius: 10px;
      color: #e0e0e0;
      font-size: 20px;
      cursor: pointer;
      transition: all 0.3s;
    }
    .quantity-btn:hover {
      background: #8b7355;
      border-color: #8b7355;
      transform: translateY(-2px);
    }

    .quantity-display { font-size: 24px; min-width: 50px; text-align: center; }

    .btn-add-cart {
      width: 100%;
      padding: 15px;
      background: #8b7355;
      color: white;
      border: none;
      border-radius: 12px;
      font-size: 18px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s;
      margin-bottom: 10px;
    }
    .btn-add-cart:hover {
      background: #a0865f;
      transform: translateY(-2px);
      box-shadow: 0 5px 20px rgba(139, 115, 85, 0.35);
    }

    .shipping-note { text-align: center; color: #a0a0a0; font-size: 14px; margin-top: 10px; }

    .tabs { margin-top: 50px; }

    .tabs-header {
      display: flex;
      gap: 10px;
      border-bottom: 2px solid #3d3d3d;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    /* ===== TABS ===== */
    /* El HTML usa .tab-button y .tab-pane */
    .tab-button {
      padding: 14px 22px;
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      color: #a0a0a0;
      font-size: 15px;
      cursor: pointer;
      transition: all 0.3s;
      font-weight: 700;
    }
    /* alias para compatibilidad */
    .tab-btn { padding: 14px 22px; background: transparent; border: none; border-bottom: 3px solid transparent; color: #a0a0a0; font-size: 15px; cursor: pointer; transition: all 0.3s; font-weight: 700; }

    .tab-button.active, .tab-btn.active { color: #8b7355; border-bottom-color: #8b7355; }

    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

    /* ===== ESPECIFICACIONES ===== */
    /* El JS genera .spec-key y .spec-val, el CSS viejo tenía .spec-label y .spec-value */
    /* Unificamos ambos */
    .spec-table {
      background: #2d2d2d;
      padding: 24px;
      border-radius: 15px;
      border: 2px solid #3d3d3d;
    }

    .spec-section-title {
      font-size: 12px;
      font-weight: 700;
      color: #8b7355;
      text-transform: uppercase;
      letter-spacing: .6px;
      padding: 14px 0 6px;
      margin-top: 4px;
      border-top: 1px solid #333;
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .spec-section-title:first-child { border-top: none; padding-top: 0; }

    .spec-row {
      display: grid;
      grid-template-columns: 180px 1fr;
      padding: 10px 0;
      border-bottom: 1px solid #2a2a2a;
      gap: 12px;
      align-items: start;
    }
    .spec-row:last-child { border-bottom: none; }

    /* Clases generadas por el JS */
    .spec-key, .spec-label {
      color: #aaa;
      font-size: 13px;
      font-weight: 600;
    }
    .spec-val, .spec-value {
      color: #e0e0e0;
      font-size: 13px;
      line-height: 1.5;
    }
    .spec-row-highlight {
      background: rgba(139,115,85,.08);
      border-radius: 6px;
      padding: 10px 8px;
      margin: 0 -8px;
    }
    .spec-row-highlight .spec-key,
    .spec-row-highlight .spec-label { color: #8b7355; }

    /* Feature items */
    .feature-key { color: #aaa; font-size: 13px; font-weight: 600; }
    .feature-val { color: #e0e0e0; font-size: 13px; }
    .feature-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid #3d3d3d;
    }
    .feature-item:last-child { border-bottom: none; }
    .feature-icon { font-size: 20px; color: #8b7355; }

    /* Btn ver carrito */
    .btn-ver-carrito {
      display: inline-block;
      width: 100%;
      text-align: center;
      padding: 12px;
      background: transparent;
      color: #8b7355;
      border: 2px solid #8b7355;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 700;
      text-decoration: none;
      transition: all .3s;
      margin-bottom: 10px;
    }
    .btn-ver-carrito:hover { background: #8b7355; color: #fff; }

    @media (max-width: 500px) {
      .spec-row { grid-template-columns: 1fr; gap: 2px; }
      .spec-key, .spec-label { font-size: 11px; color: #8b7355; }
    }

    /* =========================
       RESPONSIVE
       ========================= */
    /* Móvil/tablet — barra inferior maneja la navegación */
    @media (max-width: 992px) {
      .header-nav { padding: 12px 16px; }
      .container { padding: 24px 16px; }
      .thumbnail { height: 70px; }
      .footer { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    }

    @media (max-width: 640px) {
      .container { padding: 16px 12px; }
      .product-title { font-size: 22px; }
      .price-large { font-size: 28px; }
      .spec-row { grid-template-columns: 1fr; gap: 4px; }
      .spec-key { font-size: 11px; color: #8b7355; }
    }

    @media (max-width: 520px) {
      .spec-row { grid-template-columns: 1fr; }
    }

    @media (max-width: 400px) {
      .main-image { aspect-ratio: 1/1; }
      .thumbnail, .thumb { height: 60px; }
    }
    /* ===== Especificaciones por secciones (modelos reales) ===== */
    .spec-section-title {
      font-size: 13px;
      font-weight: 700;
      color: #8b7355;
      text-transform: uppercase;
      letter-spacing: .6px;
      padding: 14px 0 6px;
      margin-top: 4px;
      border-top: 1px solid #2a2a2a;
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .spec-section-title:first-child { border-top: none; padding-top: 0; }

    .spec-row {
      display: grid;
      grid-template-columns: 190px 1fr;
      padding: 10px 0;
      border-bottom: 1px solid #2a2a2a;
      gap: 12px;
      align-items: start;
    }
    .spec-row:last-child { border-bottom: none; }
    .spec-key {
      color: #aaa;
      font-size: 13px;
      font-weight: 600;
    }
    .spec-val {
      color: #e0e0e0;
      font-size: 13px;
      line-height: 1.5;
    }
    .spec-row-highlight {
      background: rgba(139,115,85,.08);
      border-radius: 6px;
      padding: 10px 8px;
      margin: 0 -8px;
    }
    .spec-row-highlight .spec-key { color: #8b7355; }

    @media (max-width: 520px) {
      .spec-row { grid-template-columns: 1fr; gap: 4px; }
    }
    @media (max-width: 500px) {
      .spec-row { grid-template-columns: 1fr; gap: 2px; }
      .spec-key { font-size: 11px; color: #8b7355; }
    }
    /* ===== BREADCRUMB ===== */
    .breadcrumb-bar {
      background: #232323;
      border-bottom: 1px solid #2a2a2a;
      padding: 10px 0;
      font-size: 13px;
    }
    .breadcrumb-bar .container { padding-top: 0; padding-bottom: 0; }
    .breadcrumb-bar a {
      color: #8b7355;
      text-decoration: none;
      transition: color .2s;
    }
    .breadcrumb-bar a:hover { color: #a0865f; text-decoration: underline; }
    .breadcrumb-bar span { color: #aaa; }

    /* ===== QUANTITY INPUT — ocultar número, solo usar +/- ===== */
    .quantity-input {
      width: 52px;
      text-align: center;
      background: #3d3d3d;
      border: 2px solid #4a4a4a;
      border-radius: 8px;
      color: #e0e0e0;
      font-size: 16px;
      font-weight: 700;
      padding: 6px 4px;
      /* quitar flechas nativas */
      appearance: textfield;
      -moz-appearance: textfield;
    }
    .quantity-input::-webkit-inner-spin-button,
    .quantity-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
    .quantity-input:focus {
      outline: none;
      border-color: #8b7355;
    }

    /* ===== RELATED SECTION ===== */
    .related-section {
      margin-top: 60px;
      padding-top: 40px;
      border-top: 2px solid #2a2a2a;
    }
    .related-section h2 {
      color: #8b7355;
      font-size: 22px;
      font-weight: 800;
      margin-bottom: 24px;
    }
    /* .related-grid — JS fills this; keep CSS grid for auto-fill */
    .related-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 18px;
    }
    .related-card {
      background: #2d2d2d;
      border-radius: 12px;
      overflow: hidden;
      border: 2px solid #3d3d3d;
      text-decoration: none;
      color: inherit;
      transition: all .3s;
      display: block;
    }
    .related-card:hover {
      border-color: #8b7355;
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(139,115,85,.2);
    }
    .related-img {
      width: 100%;
      aspect-ratio: 3/4;
      overflow: hidden;
      background: #232323;
    }
    .related-img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
    }
    .placeholder-img-small {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #555;
      font-size: 32px;
    }
    .related-info { padding: 12px; }
    .related-name {
      color: #e0e0e0;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 4px;
      line-height: 1.3;
    }
    .related-price {
      color: #8b7355;
      font-size: 14px;
      font-weight: 700;
    }

    /* ===== TAB DELIVERY (tab-pane contenido) ===== */
    .tab-pane {
      background: #2d2d2d;
      padding: 28px;
      border-radius: 14px;
      border: 2px solid #3d3d3d;
    }
    .tab-pane h3 {
      color: #8b7355;
      font-size: 17px;
      font-weight: 800;
      margin-bottom: 18px;
    }
    .tab-pane ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .tab-pane ul li {
      color: #c0c0c0;
      font-size: 14px;
      line-height: 1.6;
      padding: 10px 14px;
      background: #232323;
      border-radius: 8px;
      border-left: 3px solid #8b7355;
    }
    .tab-pane ul li strong { color: #e0e0e0; }
    .tab-pane p {
      color: #888;
      font-size: 14px;
      margin-top: 14px;
    }
    .tab-pane p a {
      color: #8b7355;
      text-decoration: none;
      font-weight: 600;
    }
    .tab-pane p a:hover { text-decoration: underline; }

    /* ===== PRODUCT BADGES ===== */
    .product-category-badge {
      display: inline-block;
      background: rgba(139,115,85,.15);
      color: #8b7355;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      padding: 3px 10px;
      border-radius: 6px;
      border: 1px solid rgba(139,115,85,.3);
      margin-bottom: 8px;
    }
    .product-etiqueta {
      display: inline-block;
      background: #8b7355;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 6px;
      margin-left: 8px;
    }
    .product-header { display: flex; flex-direction: column; gap: 4px; }

    @media (max-width: 360px) {
      .main-image { aspect-ratio: 1/1; }
      .tab-btn { padding: 10px 12px; font-size: 13px; }
      .product-title { font-size: 20px; }
      .price-large { font-size: 26px; }
    }

    /* Espacio para la barra inferior fija en móvil */
    @media (max-width: 900px) {
      .footer, body > .container:last-of-type { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    }
