/* =========================
   CATALOGO
========================= */
.catalog { 
  padding: 26px 18px 40px 18px;
}

.catalog__layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}

.catalog__sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 18px 14px;
}

.catalog__sidebarHeader h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.catalog__categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalog__catItem {
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #374151;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease;
}

.catalog__catItem:hover {
  background: #f3f4f6;
}

.catalog__catItem.is-active {
  background: #11182710;
  color: #111827;
  font-weight: 600;
}

.catalog__content {
  min-width: 0;
}

.catalog__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.catalog__titleRow {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.catalog__titleRow h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.catalog__count {
  color: #6b7280;
  font-size: 13px;
}

.catalog__filterBtn {
  display: none; /* se activa en mobile */
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #111827;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.catalog__empty {
  margin-top: 20px;
  padding: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  color: #374151;
}

/* =========================
   GRILLA + CARDS
========================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-card__imgWrap {
  position: relative;
  width: 100%;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 12px;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #ec3039;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.product-card__body {
  padding: 12px 12px 14px 12px;
}

.product-card__title {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px; 
}

.product-card__prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.product-card__price {
  color: #ec3039;
  font-weight: 600;
  font-size: 14px;
}

.product-card__old {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 12px;
}

/* ===== BOTÓN CERRAR FILTROS (MOBILE) ===== */
.catalog__sidebarTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.catalog__closeFilters {
  display: none; /* solo se ve en mobile */
  background: #ffffff;
  border: 1px solid #e5e7eb;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111827;
}

/* Mostrar X solo en mobile */
@media (max-width: 900px) {
  .catalog__closeFilters {
    display: inline-flex;
  }
}

/* =========================
   PRODUCTO (FICHA)
========================= */
.product-page{ 
  padding: 26px 18px 50px 18px;
  margin-top: 50px;
}

.product-shell{
  max-width: 1200px;
  margin: 0 auto;
}

.product-grid2{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

/* Galería */
.product-gallery{
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
}

.product-thumbs{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thumb{
  width: 62px;
  height: 62px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb.is-active{
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17,24,39,0.12);
}

.product-main{
  position: relative;
  border: 1px solid #e5e7eb;
  background: #fff;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-main img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

.nav-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow--left{ left: 12px; }
.nav-arrow--right{ right: 12px; }

/* Info */
.product-info{
  background: #fff;
}

.product-breadcrumbs{
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.product-breadcrumbs a{
  color: #6b7280;
  text-decoration: none;
}
.product-breadcrumbs a:hover{
  text-decoration: underline;
}

.product-title{
  margin: 0 0 10px 0;
  font-size: 26px;
  font-weight: 600;
  color: #111827;
  line-height: 1.15;
}

.product-prices{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.product-price{
  color: #ec3039;
  font-weight: 700;
  font-size: 22px;
}

.product-old{
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 14px;
}

.product-discount{
  background: #ec3039;
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
}

/* Acciones */
.product-actions{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.qty{
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  border: 1px solid #e5e7eb;
  height: 44px;
}

.qty__btn{
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 18px;
}

.qty__input{
  border: none;
  text-align: center;
  font-size: 14px;
  outline: none;
  width: 100%;
}

/* Botones base (si no tenés uno ya) */
.btn{
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
}

.btn--primary{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.btn--secondary{
  background: #ffffff;
  color: #111827;
}

.btn--secondary:hover{
  background: #f3f4f6;
}

/* Acordeones */
.product-accordions{
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}

.acc{
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 0;
}

.acc__sum{
  cursor: pointer;
  font-weight: 600;
  color: #111827;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.acc__sum::-webkit-details-marker{
  display: none;
}

.acc__sum::after{
  content: "▾";
  color: #6b7280;
  font-weight: 700;
}

.acc[open] .acc__sum::after{
  content: "▴";
}

.acc__body{
  padding: 10px 2px 6px 2px;
  color: #374151;
  font-size: 13.5px;
  line-height: 1.55;
}

.acc__list{
  margin: 0;
  padding-left: 18px;
}

/* Not found */
.product-notfound{
  max-width: 900px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 18px;
}

/* =========================
   SUGERENCIAS (RELATED)
========================= */
.related{
  max-width: 1200px;
  margin: 70px auto 0 auto;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.related__title{
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.related__wrap{
  position: relative;
}

.related__track{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

/* Card */
.rel-card{
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rel-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.rel-card__imgWrap{
  position: relative;
  height: 170px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rel-card__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rel-card__badge{
  position: absolute;
  left: 10px;
  top: 10px;
  background: #ec3039;
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
}

.rel-card__body{
  padding: 10px 10px 12px 10px;
}

.rel-card__title{
  font-size: 13px;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
  margin-bottom: 8px;
}

.rel-card__prices{
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rel-card__price{
  color: #ec3039;
  font-weight: 700;
  font-size: 14px;
}

.rel-card__old{
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 12px;
}

/* Flechas (solo mobile) */
.related__nav{
  display: none;
}

/* MOBILE: carrusel de a 1 */
@media (max-width: 900px){
  .related__track{
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 38px; /* espacio para flechas */
    -webkit-overflow-scrolling: touch;
  }

  .rel-card{
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .related__nav{
    display: inline-flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: rgba(255,255,255,0.95);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
  }

  .related__nav--left{ left: 6px; }
  .related__nav--right{ right: 6px; }
}


/* Responsive */
@media (max-width: 980px){
 .product-page{
    margin-top: 0 !important;
  }

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

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

  /* ✅ Principal arriba */
  .product-main{
    order: 1;
    height: 420px;
  }

  /* ✅ Miniaturas debajo */
  .product-thumbs{
    order: 2;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 0 0; /* arriba en vez de abajo */
  }

  .thumb{
    flex: 0 0 auto;
  }

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


@media (max-width: 520px){
  .product-title{ font-size: 22px; }
  .product-main{ height: 360px; }
}

/* =========================
   CARRITO
========================= */

/* DEBUG: asegurarnos que nada tape el botón Comprar */

#checkoutBtn {
  position: relative; 
}

/* Si existe un overlay (menu mobile), lo mandamos atrás */
.mobile-menu__overlay {
  pointer-events: none;
}

.cart-page{ 
  padding: 26px 18px 90px 18px;
}

.cart-layout{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}

.cart-left{
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 18px;
}

.cart-right{
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 18px;
  position: relative; 
}

.cart-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cart-head h1{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.cart-itemsCount{
  color: #6b7280;
  font-size: 13px;
}

.cart-tableHeader{
  display: grid;
  grid-template-columns: 1.2fr 160px 120px 120px;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.cart-list{
  display: flex;
  flex-direction: column;
}

.cart-item{
  display: grid;
  grid-template-columns: 1.2fr 160px 120px 120px;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
}

.cart-prod{
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-thumb{
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  padding: 6px;
  background: #fff;
}

.cart-prodTitle{
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 6px;
}

.cart-remove{
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.cart-remove:hover{ text-decoration: underline; }

.cart-qty{
  display: grid;
  grid-template-columns: 34px 60px 34px; /* <- más chico el input */
  border: 1px solid #e5e7eb;
  height: 36px; /* un poco más bajo */
  max-width: 130px; /* evita que se estire */
}

.cart-qtyBtn{
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
}

 

.cart-qtyInput{
  border: none;
  text-align: center;
  font-size: 13px;
  outline: none;
  width: 100%;
}
.cart-price, .cart-total{
  font-size: 13px;
  color: #111827; 
}

.cart-continue{
  margin-top: 14px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
}

.cart-empty{
  padding: 16px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  margin-top: 16px;
}

.cart-summaryTitle{
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.cart-summaryRow{
  display: flex;
  justify-content: space-between;
  color: #374151;
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-summaryRow--strong{
  font-weight: 700;
  color: #111827;
  border-bottom: none;
  padding-top: 14px;
}

.cart-checkoutBtn{
  width: 100%;
  margin-top: 14px;
}

.cart-note{
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 980px){
  .cart-layout{
    grid-template-columns: 1fr;
  }

  .cart-tableHeader{
    display: none;
  }

  .cart-item{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cart-price, .cart-total{
    text-align: left;
  }

  .cart-qty{
    max-width: 220px;
  }
}





/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .catalog__filterBtn {
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }

  /* sidebar como panel desplegable */
  .catalog__sidebar {
    display: none;
  }

  .catalog__sidebar.is-open {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 160px;
    z-index: 300;
  }

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

@media (max-width: 520px) {
  .product-card__imgWrap {
    height: 190px;
  }
}
