/*
Theme Name: Astra Child
Theme URI: https://tusitio.cl
Description: Child theme para tienda personalizada estilo moderno
Author: Tu Nombre
Template: astra
Version: 1.0
*/

/* === VARIABLES BASE (estilo index) === */
:root{
  --bg-main:#020617;
  --bg-top:#0b1220;
  --panel: rgba(15,23,42,.92);
  --border: rgba(148,163,184,.25);
  --text-main:#f9fafb;
  --text-muted:#9ca3af;
  --accent:#f97316;
  --accent-2:#facc15;
}

body{
  background:
    radial-gradient(circle at top, var(--bg-top) 0%, var(--bg-main) 45%);
  color: var(--text-main);
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ===== AJUSTE GRID WOOCOMMERCE ===== */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Responsive */
@media (max-width: 1024px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}
/* Limitar ancho de sección productos */
.woocommerce ul.products {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Imagen del producto */
.woocommerce ul.products li.product img {
  max-height: 240px;
  object-fit: contain;
  margin-bottom: 12px;
}
/* Fuerza grid aunque Astra/Woo apliquen floats */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
@media (max-width: 1024px){
  .woocommerce ul.products,
  .woocommerce-page ul.products{
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}
@media (max-width: 600px){
  .woocommerce ul.products,
  .woocommerce-page ul.products{
    grid-template-columns: 1fr !important;
  }
}
/* Tarjeta estilo premium */
.woocommerce ul.products li.product{
  background: rgba(15,23,42,.72) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.woocommerce ul.products li.product:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(0,0,0,.35);
  border-color: rgba(250,204,21,.35);
}

/* Imagen bien contenida */
.woocommerce ul.products li.product img{
  width: 100% !important;
  height: 240px !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  margin: 0 0 12px !important;
  background: rgba(255,255,255,.03);
}

/* Textos visibles */
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  color: #f9fafb !important;
  font-weight: 650;
}

.woocommerce ul.products li.product .price{
  color: #facc15 !important;
  font-weight: 800;
}

/* Botón “Añadir al carrito” con gradiente */
.woocommerce ul.products li.product a.button{
  background: linear-gradient(90deg, #f97316, #facc15) !important;
  border: 0 !important;
  color: #0b1220 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-weight: 800 !important;
}
.woocommerce ul.products{
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* ===== HEADER GLASS ===== */
.site-header{
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.site-header a,
.site-header .ast-menu-toggle{
  color: #f9fafb;
}

/* Badge del carrito */
.ast-woo-header-cart .count{
  background: linear-gradient(90deg,#f97316,#facc15);
  color:#0b1220;
  border-radius: 999px;
  font-weight: 800;
}
/* ===== CART DRAWER ===== */
.cart-drawer{ position: fixed; inset: 0; z-index: 99999; display:none; }
.cart-drawer.is-open{ display:block; }
.cart-drawer__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.cart-drawer__panel{
  position:absolute; top:0; right:0;
  width: min(420px, 92vw);
  height: 100%;
  background: rgba(15,23,42,.92);
  border-left: 1px solid rgba(255,255,255,.12);
  box-shadow: -30px 0 60px rgba(0,0,0,.45);
  display:flex; flex-direction:column;
}

.cart-drawer__header{
  padding: 16px 16px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid rgba(255,255,255,.10);
  color:#f9fafb;
}

.cart-drawer__close{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color:#f9fafb;
  border-radius: 10px;
  padding: 6px 10px;
  cursor:pointer;
}

.cart-drawer__body{
  padding: 14px 16px;
  overflow:auto;
  color:#f9fafb;
}

.cart-drawer__footer{
  margin-top:auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.cart-drawer__btn{
  text-align:center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color:#f9fafb;
  font-weight: 800;
}

.cart-drawer__btn--primary{
  background: linear-gradient(90deg,#f97316,#facc15);
  color:#0b1220;
  border: 0;
}
/* HERO afinado tipo index */
.page-id- .wp-block-group:first-of-type{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-id- .wp-block-group:first-of-type h1{
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.15;
  max-width: 720px;
}

.page-id- .wp-block-group:first-of-type p{
  max-width: 640px;
  font-size: 1.05rem;
}
/* Cards más compactas */
.woocommerce ul.products li.product{
  padding: 14px !important;
}

.woocommerce ul.products li.product img{
  height: 200px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size: .95rem;
  margin-bottom: 6px;
}

.woocommerce ul.products li.product .price{
  font-size: 1rem;
  margin-bottom: 8px;
}
/* Botón más discreto */
.woocommerce ul.products li.product a.button{
  background: rgba(255,255,255,.08) !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}

.woocommerce ul.products li.product a.button:hover{
  background: linear-gradient(90deg,#f97316,#facc15) !important;
  color:#0b1220 !important;
}
/* Categorías tipo chips */
.woocommerce ul.products{
  list-style: none;
}

.woocommerce ul.products li.product-category{
  background: rgba(15,23,42,.7);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 10px 18px;
  text-align: center;
}

.woocommerce ul.products li.product-category h2{
  font-size: .9rem;
  color:#f9fafb;
}
/* ===== CHIPS CATEGORÍAS (estilo index) ===== */
.chips-categorias{
  max-width: 1200px;
  margin: 10px auto 26px;
  padding: 0 24px;
}

.chips-categorias__track{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.chips-categorias__track::-webkit-scrollbar{ height: 10px; }
.chips-categorias__track::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}
.chips-categorias__track::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}

.chips-categorias .chip{
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15,23,42,.70);
  border: 1px solid rgba(255,255,255,.14);
  color: #f9fafb;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  white-space: nowrap;
}

.chips-categorias .chip:hover{
  transform: translateY(-2px);
  border-color: rgba(250,204,21,.35);
  background: rgba(15,23,42,.85);
}
/* Fade en bordes (izq/der) */
.chips-categorias{
  position: relative;
}

.chips-categorias::before,
.chips-categorias::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width: 42px;
  pointer-events:none;
  z-index: 2;
}

.chips-categorias::before{
  left:0;
  background: linear-gradient(90deg, rgba(2,6,23,1) 0%, rgba(2,6,23,0) 100%);
}

.chips-categorias::after{
  right:0;
  background: linear-gradient(270deg, rgba(2,6,23,1) 0%, rgba(2,6,23,0) 100%);
}
/* Chip activo */
.chips-categorias .chip.is-active{
  background: linear-gradient(90deg,#f97316,#facc15);
  color:#0b1220;
  border: 0;
}
/* ===== HERO ===== */
.hero-block{
  max-width:1200px;
  margin:0 auto;
}
.hero-block h1{
  font-size:clamp(2.2rem,4vw,3.2rem);
  line-height:1.15;
  letter-spacing:-.02em;
}
.hero-block p{
  max-width:640px;
  color:rgba(249,250,251,.72);
  font-size:1.05rem;
}

/* ===== SECTION HEADERS ===== */
.section-head{
  max-width:1200px;
  margin:26px auto 14px;
  padding:0 24px;
}
.section-head h2{
  margin:0 0 6px;
  font-size:clamp(1.35rem,2vw,1.8rem);
}
.section-head p{
  margin:0;
  color:rgba(249,250,251,.72);
}
.section-head .wp-block-column:last-child{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
.section-head .wp-block-button__link{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
}
.section-head .wp-block-button__link:hover{
  background:linear-gradient(90deg,#f97316,#facc15);
  color:#0b1220;
  border-color:transparent;
}

/* ===== CATEGORY CHIPS ===== */
.chips-categorias{
  max-width:1200px;
  margin:10px auto 26px;
  padding:0 24px;
  position:relative;
}
.chips-categorias__track{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:8px 2px 14px;
  scroll-snap-type:x mandatory;
}
.chips-categorias .chip{
  padding:10px 16px;
  border-radius:999px;
  background:rgba(15,23,42,.7);
  border:1px solid rgba(255,255,255,.14);
  color:#f9fafb;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}
.chips-categorias .chip:hover{
  transform:translateY(-2px);
  border-color:rgba(250,204,21,.35);
}

/* Fade bordes */
.chips-categorias::before,
.chips-categorias::after{
  content:"";
  position:absolute;
  top:0;bottom:0;width:42px;
  pointer-events:none;
}
.chips-categorias::before{
  left:0;
  background:linear-gradient(90deg,#020617 0%,transparent 100%);
}
.chips-categorias::after{
  right:0;
  background:linear-gradient(270deg,#020617 0%,transparent 100%);
}

/* ===== PRODUCT GRID ===== */
.woocommerce ul.products{
  max-width:1200px;
  margin:0 auto;
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:28px!important;
}
@media(max-width:1024px){
  .woocommerce ul.products{grid-template-columns:repeat(2,1fr)!important;}
}
@media(max-width:600px){
  .woocommerce ul.products{grid-template-columns:1fr!important;}
}
.hero-block h1{
  color: #f9fafb;
  text-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.chips-categorias{
  margin-top: -20px;
}
.section-head .wp-block-button__link{
  font-size: .9rem;
  padding: 8px 14px;
}


