/*
  TEMA · FLOW CALLE
  ------------------------------------------------------------------
  Piel visual streetwear para el catálogo Castock.
  100% aditivo: todo vive bajo el selector html[data-theme="flow-calle"],
  así que si este archivo no se activa, el catálogo se ve exactamente
  igual que hoy. No modifica ni un selector de catalog-v1.css.

  Cómo se activa:
    document.documentElement.dataset.theme = "flow-calle";
  (la capa de personalización lo hace sola con un click).

  Motivo de diseño:
  El mundo de referencia es el de la ropa urbana: cinta de peligro,
  etiquetas de precio con pistola, stickers despegándose, aerosol.
  Todo el tema gira en torno a UN solo lenguaje visual repetido
  ("todo es una etiqueta/sticker pegado un poco torcido") en vez de
  mezclar diez efectos distintos.
*/

html[data-theme="flow-calle"]{
  /* ---- paleta: asfalto + dos neones (no "un solo verde ácido") ---- */
  --primary:#CFFF3D;        /* verde flúo - CTA, precios, activos */
  --on-primary:#0B0B0D;
  --accent:#FF2E7E;         /* magenta neón - ofertas, badges */
  --on-accent:#ffffff;
  --surface:#131316;        /* asfalto, no negro puro */
  --card:#1C1C21;
  --ink:#F4F4F1;
  --muted:#9C9CA6;
  --line:rgba(255,255,255,.14);
  --shadow:0 24px 70px rgba(0,0,0,.55);

  /* ---- variables propias del tema (controlables por la personalización) ---- */
  --fc-tilt:-1.5;            /* grados de inclinación en hover */
  --fc-motion-mult:1;        /* multiplicador de duración de transiciones */
  font-family:"Space Grotesk",Inter,ui-sans-serif,system-ui,sans-serif;
  color-scheme:dark;
}

/* Textura de grano sutil sobre el fondo, como una pared/afiche callejero */
html[data-theme="flow-calle"] body{
  background-color:var(--surface);
  background-image:
    radial-gradient(circle at 20% 0%, color-mix(in srgb,var(--accent) 10%,transparent), transparent 40%),
    radial-gradient(circle at 100% 30%, color-mix(in srgb,var(--primary) 8%,transparent), transparent 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/></svg>");
}

/* ---------------------------- Header ---------------------------- */
html[data-theme="flow-calle"] .catalog-header{
  background:color-mix(in srgb,var(--surface) 92%,black);
  border-bottom:1px solid var(--line);
}
html[data-theme="flow-calle"] .icon-button{
  border-radius:8px;
  border-color:var(--line);
}
html[data-theme="flow-calle"] .cart-button{
  border-radius:8px;
  box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 30%,transparent);
}
html[data-theme="flow-calle"] .cart-button b{
  border-radius:6px;
}

/* ----------------------------- Hero ------------------------------ */
html[data-theme="flow-calle"] .profile-wrap{
  position:relative;
}
html[data-theme="flow-calle"] .store-hero{
  margin-bottom:0;
  padding-bottom:clamp(34px,4.5vw,54px);
}
html[data-theme="flow-calle"] .hero-copy{
  display:grid;
  align-content:center;
  justify-items:start;
}
html[data-theme="flow-calle"] .catalog-rating-trigger{
  margin:0 0 12px;
}
html[data-theme="flow-calle"] .profile-wrap::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:50%;
  background:repeating-conic-gradient(from 0deg, var(--primary) 0deg 12deg, #0b0b0d 12deg 24deg);
  animation:fc-spin calc(18s * var(--fc-motion-mult,1)) linear infinite;
  z-index:-1;
}
html[data-theme="flow-calle"] .profile-avatar{
  border:6px solid var(--surface);
  box-shadow:0 14px 40px rgba(0,0,0,.5);
}
@keyframes fc-spin{to{transform:rotate(360deg)}}

html[data-theme="flow-calle"] .eyebrow{
  display:inline-block;
  padding:3px 9px;
  border:1px dashed color-mix(in srgb,var(--primary) 60%,var(--line));
  border-radius:5px;
  color:var(--primary);
  font-family:"Space Mono",monospace;
  letter-spacing:.14em;
  transform:rotate(-2deg);
}
html[data-theme="flow-calle"] .hero-copy h1{
  position:relative;
  display:inline-block;
  font-family:"Anton",Impact,"Archivo Black",sans-serif;
  text-transform:uppercase;
  letter-spacing:-.01em;
  line-height:.92;
}
html[data-theme="flow-calle"] .hero-copy h1::after{
  content:"";
  position:absolute;
  left:-2%;
  bottom:.05em;
  width:104%;
  height:.34em;
  background:color-mix(in srgb,var(--primary) 70%,transparent);
  transform:skewX(-8deg) rotate(-1deg);
  z-index:-1;
}
html[data-theme="flow-calle"] .hero-copy>p:last-child{
  color:var(--muted);
}
html[data-theme="flow-calle"] .whatsapp-link{
  border-radius:8px;
  border:1.5px solid var(--primary);
  color:var(--ink);
  background:transparent;
  transition:background calc(.2s*var(--fc-motion-mult,1)), color calc(.2s*var(--fc-motion-mult,1)), transform calc(.2s*var(--fc-motion-mult,1));
}
html[data-theme="flow-calle"] .whatsapp-link span{color:var(--primary)}
html[data-theme="flow-calle"] .whatsapp-link:hover{
  background:var(--primary);
  color:var(--on-primary);
  transform:translateY(-2px);
}
html[data-theme="flow-calle"] .whatsapp-link:hover span{color:var(--on-primary)}

/* ------------------------- Buscador / categorías ------------------------- */
html[data-theme="flow-calle"] .catalog-search-control .search-field,
html[data-theme="flow-calle"] .search-field{
  border-radius:8px;
  background:var(--card);
  border-color:var(--line);
}
html[data-theme="flow-calle"] .category-menu-trigger,
html[data-theme="flow-calle"] .catalog-search-trigger{
  border-radius:8px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
}
html[data-theme="flow-calle"] .category-strip button{
  border-radius:7px;
  font-family:"Space Mono",monospace;
  letter-spacing:.02em;
  border:1px dashed var(--line);
  background:var(--card);
  color:var(--muted);
  transition:transform calc(.15s*var(--fc-motion-mult,1)), border-color .15s;
}
html[data-theme="flow-calle"] .category-strip button:hover{
  transform:rotate(-2deg);
  border-color:var(--primary);
}
html[data-theme="flow-calle"] .category-strip button.active{
  border-style:solid;
  border-color:var(--primary);
  color:var(--on-primary);
  background:var(--primary);
}

/* ------------------------------ Grilla de productos ------------------------------ */
html[data-theme="flow-calle"] .section-heading h2{
  font-family:"Anton",sans-serif;
  text-transform:uppercase;
  letter-spacing:0;
}
html[data-theme="flow-calle"] .product-card{
  border-radius:10px;
  border-color:var(--line);
  background:var(--card);
  box-shadow:none;
  transition:transform calc(.25s*var(--fc-motion-mult,1)) cubic-bezier(.2,.8,.2,1),
             box-shadow calc(.25s*var(--fc-motion-mult,1));
}
html[data-theme="flow-calle"] .product-card:hover{
  transform:translateY(-6px) rotate(calc(var(--fc-tilt,-1.5)*1deg));
  box-shadow:0 18px 34px color-mix(in srgb,var(--primary) 20%,transparent),
             0 30px 60px rgba(0,0,0,.5);
  z-index:2;
}
/* esquina "despegada" de sticker sobre cada foto */
html[data-theme="flow-calle"] .product-media{
  border-radius:10px 10px 0 0;
}
html[data-theme="flow-calle"] .product-media::after{
  content:"";
  position:absolute;
  right:0;top:0;
  width:0;height:0;
  border-style:solid;
  border-width:0 20px 20px 0;
  border-color:transparent var(--surface) transparent transparent;
  filter:drop-shadow(-2px 2px 3px rgba(0,0,0,.4));
  pointer-events:none;
}
html[data-theme="flow-calle"] .product-placeholder{
  background:
    linear-gradient(145deg,color-mix(in srgb,var(--primary) 16%,var(--card)),color-mix(in srgb,var(--accent) 14%,var(--card)));
  color:var(--ink);
}
html[data-theme="flow-calle"] .stock-dot{
  border-color:var(--surface);
}
html[data-theme="flow-calle"] .product-category{
  display:inline-block;
  padding:2px 8px;
  border-radius:4px;
  background:var(--primary);
  color:var(--on-primary);
  transform:rotate(-2deg);
  font-family:"Space Mono",monospace;
  font-weight:700;
  letter-spacing:.02em;
}
html[data-theme="flow-calle"] .product-info h3{
  color:var(--ink);
  font-weight:600;
}
html[data-theme="flow-calle"] .product-variant{color:var(--muted)}
html[data-theme="flow-calle"] .price-wrap small{
  font-family:"Space Mono",monospace;
  color:var(--muted);
}
html[data-theme="flow-calle"] .price-wrap strong{
  display:inline-block;
  margin-top:2px;
  padding:2px 8px;
  border:1.5px dashed color-mix(in srgb,var(--primary) 55%,var(--line));
  border-radius:6px;
  color:var(--primary);
  background:color-mix(in srgb,var(--primary) 8%,transparent);
  font-family:"Space Mono",monospace;
  font-weight:700;
  transform:rotate(-2deg);
}
html[data-theme="flow-calle"] .add-button{
  border-radius:9px;
  background:var(--primary);
  color:var(--on-primary);
  box-shadow:0 8px 18px color-mix(in srgb,var(--primary) 35%,transparent);
  transition:transform calc(.15s*var(--fc-motion-mult,1));
}
html[data-theme="flow-calle"] .add-button:active{
  transform:scale(.9) rotate(-8deg);
}

/* --------------------------- Ofertas / badges --------------------------- */
html[data-theme="flow-calle"] .product-card.has-offer{
  border-color:color-mix(in srgb,var(--accent) 55%,var(--line));
}
html[data-theme="flow-calle"] .offer-label{
  border-radius:50%;
  width:58px; height:58px; min-width:0;
  display:grid; place-items:center;
  background:radial-gradient(circle,var(--accent) 62%,color-mix(in srgb,var(--accent) 80%,#000) 100%);
  border:2px dashed rgba(255,255,255,.7);
  transform:rotate(8deg);
  animation:fc-pulse calc(2.4s*var(--fc-motion-mult,1)) ease-in-out infinite;
}
@keyframes fc-pulse{0%,100%{transform:rotate(8deg) scale(1)}50%{transform:rotate(8deg) scale(1.06)}}

/* ------------------------------- Skeletons ------------------------------- */
html[data-theme="flow-calle"] .skeleton-card{background:var(--card)}
html[data-theme="flow-calle"] .skeleton-card>*{
  background:linear-gradient(90deg,#232328,#2b2b31,#232328);
  background-size:200% 100%;
}
html[data-theme="flow-calle"] .skeleton-card i{border-radius:10px}

/* --------------------------------- Sheets --------------------------------- */
html[data-theme="flow-calle"] .sheet-card{
  background:var(--card);
  color:var(--ink);
}
html[data-theme="flow-calle"] .sheet-close{
  background:var(--surface);
  color:var(--ink);
}
html[data-theme="flow-calle"] .variant-option{
  border-color:var(--line);
  border-radius:8px;
}
html[data-theme="flow-calle"] .variant-option:has(input:checked){
  border-color:var(--primary);
  background:color-mix(in srgb,var(--primary) 10%,var(--card));
}
html[data-theme="flow-calle"] .detail-add,
html[data-theme="flow-calle"] .checkout-button{
  border-radius:9px;
  background:var(--primary);
  color:var(--on-primary);
  font-family:"Space Grotesk",sans-serif;
  font-weight:700;
}
html[data-theme="flow-calle"] .checkout-button b{color:var(--primary)}
html[data-theme="flow-calle"] .cart-item{border-color:var(--line); border-radius:9px}
html[data-theme="flow-calle"] .cart-thumb{background:var(--surface)}
html[data-theme="flow-calle"] .qty-control{border-color:var(--line)}

/* --------------------------------- Toast --------------------------------- */
html[data-theme="flow-calle"] .toast{
  border-radius:8px;
  background:var(--primary);
  color:var(--on-primary);
  font-family:"Space Mono",monospace;
}

/* --------------------------------- Footer --------------------------------- */
html[data-theme="flow-calle"] footer{
  border-top-color:var(--line);
  color:var(--muted);
}
html[data-theme="flow-calle"] footer a{color:var(--ink)}

/* ------------------ Entrada escalonada de las cards al cargar ------------------ */
html[data-theme="flow-calle"] .product-grid .product-card{
  animation:fc-in calc(.5s*var(--fc-motion-mult,1)) both;
}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(1){animation-delay:.02s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(2){animation-delay:.06s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(3){animation-delay:.10s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(4){animation-delay:.14s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(5){animation-delay:.18s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(6){animation-delay:.22s}
html[data-theme="flow-calle"] .product-grid .product-card:nth-child(n+7){animation-delay:.26s}

/* Professional polish: cleaner streetwear geometry and calmer motion. */
html[data-theme="flow-calle"] .catalog-socials img {
  filter: brightness(0) saturate(100%) invert(92%) sepia(89%) saturate(1135%) hue-rotate(23deg) brightness(108%) contrast(104%);
  opacity: .96;
}

html[data-theme="flow-calle"] .catalog-location-link,
html[data-theme="flow-calle"] .catalog-socials a {
  color: var(--primary);
}

html[data-theme="flow-calle"] .hero-copy h1::after {
  bottom: -.08em;
  height: .22em;
  opacity: .82;
}

html[data-theme="flow-calle"] .product-media::after {
  display: none;
}

html[data-theme="flow-calle"] .product-category {
  padding: 0;
  border-radius: 0;
  color: var(--primary);
  background: transparent;
  transform: none;
}

html[data-theme="flow-calle"] .product-card {
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), box-shadow .32s ease, border-color .24s ease;
}

html[data-theme="flow-calle"] .product-card:hover {
  transform: translateY(-5px) rotate(-.35deg);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .4);
}

html[data-theme="flow-calle"] .product-card:hover .product-media img {
  transform: scale(1.035);
  transition-duration: .55s;
}

html[data-theme="flow-calle"] .add-button {
  transition: transform .28s cubic-bezier(.22, 1.35, .36, 1), background .2s ease;
}

html[data-theme="flow-calle"] .add-button:hover:not(:disabled) {
  transform: translateY(-2px) rotate(-3deg);
}

html[data-theme="flow-calle"] .add-button:active:not(:disabled) {
  transform: scale(.92);
}

html[data-theme="flow-calle"] .checkout-button,
html[data-theme="flow-calle"] .checkout-button span {
  color: #0b0b0d;
}

html[data-theme="flow-calle"] .checkout-button b {
  color: var(--primary);
  background: #0b0b0d;
}
@keyframes fc-in{from{opacity:0; transform:translateY(14px)}to{opacity:1; transform:translateY(0)}}

@media(max-width:700px){
  html[data-theme="flow-calle"] .store-hero{
    padding-bottom:24px;
  }
  html[data-theme="flow-calle"] .hero-copy{
    justify-items:center;
  }
  html[data-theme="flow-calle"] .catalog-rating-trigger{
    margin-bottom:10px;
  }
}
