/* ===== Tienda Barbería Hugo ===== */
:root {
  --bg: #0f1220;
  --card: #0d1027;
  --soft: #141937;
  --text: #eef2ff;
  --muted: #a5b4fc;
  --accent: #f6c90e;
  --accent2: #ffdb4d;
  --border: rgba(255, 255, 255, .12);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', system-ui, Arial, sans-serif
}

.shop-header{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center; /* <— antes ponía space-center (no existe) */
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(13,16,39,.95), rgba(13,16,39,.8));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* El botón del carrito se ancla a la derecha sin descentrar el título */
.shop-header .cart-btn{
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}



.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(246, 201, 14, .7)
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap
}

.shop-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px
}

.shop-nav a:hover {
  background: rgba(255, 255, 255, .06)
}

.cart-btn {
  position: relative;
  border: 1px solid var(--border);
  background: var(--soft);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: #111;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .75rem;
  font-weight: 900;
  border: 1px solid rgba(0, 0, 0, .2)
}

.container {
  max-width: 1100px;
  margin: 22px auto;
  padding: 0 16px
}

.hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow)
}

.hero h1 {
  margin: 0 0 6px
}

.hero p {
  margin: 0;
  color: var(--muted)
}

.filters {
  display: flex;
  gap: 10px;
  margin: 16px 0 10px;
  flex-wrap: wrap
}

.filters input[type="search"],
.filters select {
  background: var(--soft);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px
}

.filters input {
  flex: 1 1 260px
}

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

@media (max-width:1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media (max-width:720px) {
  .grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:460px) {
  .grid {
    grid-template-columns: repeat(1, 1fr)
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.card .thumb {
  aspect-ratio: 1/1;
  background: #111;
  display: block;
  overflow: hidden
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s
}

.card:hover img {
  transform: scale(1.04)
}

.card .body {
  padding: 12px
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem
}

.card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .95rem
}

.price {
  font-weight: 900;
  margin-bottom: 10px
}

.qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto
}

.qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: #fff;
  cursor: pointer
}

.add-btn {
  margin-left: auto;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #111;
  border: 0;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer
}

.cart-drawer {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  pointer-events: none
}

.cart-drawer .backdrop {
  grid-column: 1;
  background: rgba(0, 0, 0, .55);
  border: 0;
  margin: 0;
  padding: 0;
  display: none
}

.cart-panel {
  grid-column: 2;
  width: min(96vw, 480px);
  background: var(--card);
  border-left: 1px solid var(--border);
  height: 100%;
  transform: translateX(100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column
}

.cart-drawer[aria-hidden="false"] {
  pointer-events: auto
}

.cart-drawer[aria-hidden="false"] .backdrop {
  display: block
}

.cart-drawer[aria-hidden="false"] .cart-panel {
  transform: none
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border)
}

.icon-btn {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer
}

.cart-items {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto
}

.item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px
}

.item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px
}

.item h4 {
  margin: 0 0 2px;
  font-size: .98rem
}

.item .muted {
  color: var(--muted);
  font-size: .9rem
}

.item .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px
}

.item .actions button {
  border: 1px solid var(--border);
  background: var(--soft);
  color: #fff;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer
}

.item .remove {
  margin-left: auto;
  background: #441e1e
}

.cart-summary {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--soft)
}

.cart-summary .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0
}

.cart-summary .row.small {
  font-size: .92rem;
  color: var(--muted)
}

.cart-summary .row.total {
  font-size: 1.08rem;
  font-weight: 900
}

.checkout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid var(--border)
}

.btn.wa {
  background: linear-gradient(90deg, #25D366, #128C7E);
  color: #fff
}

.btn.disabled {
  opacity: .6;
  cursor: not-allowed
}

.pickup {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted)
}

.shop-footer {
  margin: 24px 0;
  text-align: center;
  color: var(--muted)
}

.notice {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(246, 201, 14, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  text-align: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .cart-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border)
  }

  .cart-drawer[aria-hidden="false"] .cart-panel {
    transform: translateY(-100%);
    height: 100vh;
    border-radius: 16px 16px 0 0
  }
}

/* Estado activo del enlace actual (igual que en la home) */
.shop-nav a.active {
  position: relative;
}

.shop-nav a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* Selector de idioma (copiado de styles.css y simplificado) */
.lang-switch {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.lang-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem;
  border: 2px solid var(--accent);
  border-radius: 9999px;
  background: #fff;
  cursor: pointer;
  line-height: 0;
  transition: transform .15s, background .15s, border-color .15s;
}

.lang-switch button:hover {
  transform: scale(1.05);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

.lang-switch button img {
  display: block;
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: .25rem;
}

/* ===== Asistente Virtual (solo tienda) ===== */
.va-btn {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 2200;
  font-size: 22px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #111;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  font-weight: 900;
}

@media (max-width:560px) {
  .va-btn {
    bottom: 134px;
  }
}

.va-drawer {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  pointer-events: none;
  z-index: 2300;
}

.va-backdrop {
  grid-column: 1;
  display: none;
  background: rgba(0, 0, 0, .55);
  border: 0;
}

.va-panel {
  grid-column: 2;
  width: min(96vw, 420px);
  height: 100%;
  transform: translateX(100%);
  transition: transform .25s;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.va-drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.va-drawer[aria-hidden="false"] .va-backdrop {
  display: block;
}

.va-drawer[aria-hidden="false"] .va-panel {
  transform: none;
}

.va-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.va-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.va-close {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer
}

.va-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.va-greeting {
  margin: 0;
  color: var(--muted);
}

.va-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.va-quick button {
  background: var(--soft);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}

.va-search label {
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

.va-row {
  display: flex;
  gap: 8px;
}

.va-row input {
  flex: 1 1 auto;
  background: var(--soft);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.va-row button {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #111;
  border: 0;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.va-output {
  min-height: 24px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
}

/* ===== Chat Hugo (solo tienda) ===== */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 2400;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.chat-launcher .chat-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  background: #111;
}

.chat-launcher .chat-bubble {
  background: #fff;
  color: #111;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.chat-launcher .chat-bubble::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-left-color: #fff;
}

/* Caja de chat */
.chat-box {
  position: fixed;
  right: 20px;
  bottom: 160px;
  width: min(92vw, 380px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2500;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.chat-box[aria-hidden="false"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
}

.chat-head-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-avatar.sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  background: #111;
}

.chat-sub {
  font-size: .82rem;
  color: var(--muted);
}

.chat-close {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  max-height: 45vh;
  overflow: auto;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.msg-user {
  justify-content: flex-end;
}

.msg-user .msg-bubble {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #111;
}

.msg-hugo .msg-bubble {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border: 1px solid var(--border);
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: #111;
}

.msg-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.msg-bubble .quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg-bubble .quick button {
  background: var(--soft);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: .9rem;
}

.chat-form {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  display: flex;
  gap: 8px;
  padding: 10px;
}

.chat-form input {
  flex: 1 1 auto;
  background: var(--soft);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.chat-send {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #111;
  border: 0;
  font-weight: 900;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* móvil: que no tape los botones sociales */
@media (max-width:560px) {
  .chat-launcher {
    bottom: 134px;
  }

  .chat-box {
    bottom: 200px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}

/* ====== Asistente Hugo ====== */
.assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  z-index: 1000;
}

.assistant-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.assistant-bubble {
  background: var(--soft);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  position: relative;
  max-width: 200px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.assistant-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 20px;
  border-width: 8px;
  border-style: solid;
  border-color: var(--soft) transparent transparent transparent;
}