/* =========================
   Stick23 — styles.css
   ✅ Chrome PC / Chrome Android / Safari iPhone
   ✅ Hero con placa/banner
   ✅ Logo topbar más chico
========================= */

:root{
  --bg: #0b0b0f;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.55);
  --border: rgba(255,255,255,.10);
  --shadow: 0 12px 32px rgba(0,0,0,.45);

  --radius: 16px;
  --radius2: 14px;

  --container: 1100px;
}

/* Better viewport on iOS Safari (dynamic bar) */
html, body{
  height: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* iPhone safe areas */
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);

  min-height: 100dvh;
}

a{ color: inherit; text-decoration: none; }
button{ font: inherit; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* =========================
   TOPBAR
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,11,15,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ✅ MOD 2: logo topbar más chico */
.logoImg{
  height: 48px;   /* antes ~40 */
  width: auto;
  display: block;
}

/* Chips / pills */
.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 13px;
}

.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease;
}

.btn:hover{ background: rgba(255,255,255,.09); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  font-weight: 700;
}

/* =========================
   HERO (Home)
========================= */
.hero{
  position: relative;
  padding: 26px 0 18px;
}

/* ✅ MOD 1: placa/banner detrás del hero (como antes) */
.hero::before{
  content:"";
  display:block;
  height: 240px;
  border-radius: 18px;
  margin-bottom: 18px;

  background:
    radial-gradient(900px 260px at 30% 20%, rgba(255,95,35,.18), transparent 60%),
    radial-gradient(700px 240px at 70% 30%, rgba(255,255,255,.07), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));

  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 46px rgba(0,0,0,.55);
}

/* Poner el contenido encima de la placa */
.heroKicker,
.heroLogo,
.heroSub{
  position: relative;
  z-index: 2;
}

/* Hacemos que el contenido "entre" en la placa */
.heroKicker{
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: -210px; /* sube el kicker sobre la placa */
}

.heroLogo{
  width: min(420px, 84vw);
  height: auto;
  display: block;
  margin: 16px 0 10px;
}

.heroSub{
  color: var(--muted);
  max-width: 64ch;
  line-height: 1.5;
}

/* Headings */
.sectionTitle{
  margin: 26px 0 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.h1{
  margin: 16px 0 6px;
  font-size: 30px;
  font-weight: 900;
}

.sub{
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.45;
}

.note{
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  padding: 14px;
  border-radius: 12px;
}

.small{
  font-size: 13px;
  color: var(--muted);
}

.price{
  margin-top: 8px;
  font-weight: 900;
}

.footer{
  margin: 26px 0 40px;
  color: var(--muted2);
  font-size: 13px;
}

/* =========================
   CATEGORY CARDS (Home)
========================= */
.catGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.catCard{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 150px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transform: translateZ(0); /* helps iOS */
}

.catOverlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.70));
}

.catContent{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
}

.catTitle{
  font-size: 18px;
  font-weight: 900;
}

.catHero{
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1.25;
}

/* =========================
   PRODUCT GRID + CARDS
========================= */
.grid.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card .img{
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,.04);
}

.card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .body{
  padding: 14px;
}

/* =========================
   CATEGORY BANNER (inside category page)
========================= */
.catHeroBanner{
  height: 260px;
  border-radius: var(--radius2);
  overflow: hidden;
  position: relative;
  margin: 16px 0 22px;

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  filter: saturate(1.05) contrast(1.05);
  transform: translateZ(0); /* helps iOS rendering */
}

.catBannerContent{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
}

.catBannerTitle{
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}

.catBannerSub{
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  max-width: 70ch;
}

.catHeroBanner .catOverlay{
  z-index: 1;
}

/* =========================
   Drawer / Cart
========================= */
.drawerBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 90;
}

.drawerBackdrop.open{
  opacity: 1;
  pointer-events: auto;
  touch-action: none;
}

.drawer{
  position: fixed;
  right: 0;
  top: 0;
  height: 100dvh;
  width: min(420px, 92vw);
  background: rgba(15,15,20,.92);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform .18s ease;
  z-index: 95;

  overflow: auto;
  -webkit-overflow-scrolling: touch;

  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.drawer.open{
  transform: translateX(0%);
}

.drawerHeader{
  position: sticky;
  top: 0;
  background: rgba(15,15,20,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  z-index: 2;
}

.drawerBody{
  padding: 14px;
}

.cartItem{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
}

.rowBetween{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.line{
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 12px 0;
}

.qty{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qty button{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
}

.formGrid{
  display: grid;
  gap: 12px;
}

select, input, textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

textarea{ resize: vertical; }

/* =========================
   WhatsApp Floating Button
========================= */
.wppFloat{
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 99;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(37, 211, 102, .18);
  color: rgba(255,255,255,.92);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: var(--shadow);
  font-weight: 800;
}

/* =========================
   Responsive Breakpoints
========================= */
@media (max-width: 900px){
  .catGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px){

  .container{
    width: calc(100% - 20px);
  }

  .row{
    padding: 10px 0;
    gap: 8px;
  }

  /* logo superior más chico */
  .logoImg{
    height: 5px;
  }

  /* pills más compactas */
  .pill{
    padding: 5px 7px;
    font-size: 9px;
    gap: 4px;
    white-space: nowrap;
  }

  /* botón carrito más chico */
  .btn{
    padding: 7px 9px;
    font-size: 12px;
  }

  /* hero banner */
  .hero::before{
    height: 200px;
    margin-bottom: 12px;
  }

  .heroKicker{
    margin-top: -170px;
  }

  .heroLogo{
    width: min(240px, 75vw);
    margin: 10px 0 6px;
  }

  .heroSub{
    font-size: 12px;
    line-height: 1.35;
    max-width: 40ch;
  }

  .catGrid{ 
    grid-template-columns: 1fr; 
  }

  .grid.cards{ 
    grid-template-columns: 1fr; 
  }

  .catHeroBanner{
    height: 170px;
  }

  .catBannerTitle{
    font-size: 22px;
  }
}
/* =========================
   Botón agregar al carrito
========================= */

.addCartBtn{
  width: 100%;
  margin-top: 10px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.addCartBtn:hover{
  background: rgba(255,255,255,.15);
}
/* =========================
   Mobile: Topbar más simple (lineal)
========================= */
@media (max-width: 600px){

  .row{
    align-items: center;
    gap: 10px;
  }

  /* Logo + contenido */
  .brand{ flex: 0 0 auto; }

  /* El contenedor derecho (pills + carrito) en una sola línea */
  .topbar .row > div:last-child{
    flex: 1 1 auto;
    min-width: 0;
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar .row > div:last-child::-webkit-scrollbar{ display:none; }

  /* Pills más compactas */
  .pill{
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Botón carrito más compacto */
  .btn{
    padding: 8px 10px;
    border-radius: 10px;
    white-space: nowrap;
  }
}
/* =========================
   Mobile: Hero más balanceado
========================= */
@media (max-width: 600px){

  /* Placa un poquito más alta para que entre todo cómodo */
  .hero::before{
    height: 210px;      /* antes 190 */
    margin-bottom: 12px;
  }

  /* Subimos menos el kicker para que no “empuje” el texto afuera */
  .heroKicker{
    margin-top: -182px; /* antes -165 */
  }

  /* Logo más chico en móvil */
  .heroLogo{
    width: min(260px, 78vw); /* antes min(340px, 86vw) */
    margin: 12px 0 8px;
  }

  /* Subtítulo dentro y más compacto */
  .heroSub{
    font-size: 13px;
    line-height: 1.35;
    max-width: 42ch;
    margin-bottom: 6px;
  }
}
/* =========================
   PRO HEADER: Info bar + topbar limpia
========================= */

.infoBar{
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.infoBarInner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.infoBarInner .dot{
  opacity: .5;
}

/* Topbar limpia */
.topbarClean{
  background: rgba(11,11,15,.78);
}

.rowClean{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

/* Logo un toque más chico y elegante */
.topbarClean .logoImg{
  height: 26px;
}

/* Móvil: info bar con scroll suave si no entra */
@media (max-width: 600px){
  .infoBarInner{
    justify-content: flex-start;
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .infoBarInner::-webkit-scrollbar{ display:none; }

  .topbarClean .logoImg{
    height: 22px;
  }

  .rowClean{
    padding: 10px 0;
  }

  #openCartBtn{
    padding: 8px 10px;
    font-size: 12px;
  }
}
/* =========================
   Header estilo "Shop Race"
   Logo (izq) + Carrito (der)
   InfoBar debajo
========================= */

.topbarMain{
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11,11,15,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.topbarRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 0;
  gap: 10px;
}

.topbarMain .logoImg{
  height: 26px; /* más chico y prolijo */
  width: auto;
  display:block;
}

.cartBtn{
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 12px;
}

/* Barra informativa debajo */
.infoBar{
  position: sticky;
  top: 54px; /* queda debajo del header principal */
  z-index: 59;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.infoBarRow{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 8px 0;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  white-space: nowrap;
}

/* En móvil: si no entra, scrollea horizontal suave */
@media (max-width: 600px){
  .topbarRow{
    padding: 12px 0;
  }

  .topbarMain .logoImg{
    height: 36px; /* aún más chico */
  }

  .cartBtn{
    padding: 8px 10px;
    font-size: 12px;
  }

  .infoBar{ top: 50px; }

  .infoBarRow{
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .infoBarRow::-webkit-scrollbar{ display:none; }

  .sep{ opacity: .55; }
}
.sizeRow{
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.sizeRow label{
  font-size: 12px;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
}

.sizeSelect{
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
}
/* ===== Galería en cards ===== */
.cardMedia{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}

.cardMedia img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* Botones laterales */
.imgNav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.imgNav:hover{ background: rgba(0,0,0,.50); }

.imgNav.prev{ left: 10px; }
.imgNav.next{ right: 10px; }

/* En móvil, un poco más chicos */
@media (max-width:600px){
  .imgNav{
    width: 34px;
    height: 34px;
  }
  .imgNav.prev{ left: 8px; }
  .imgNav.next{ right: 8px; }
}
