/* ===================================================================
   VENTLY · Product mockups embebidos (visor por pestañas)
   Recrea pantallas reales del programa en estética Vestos.
   Depende de los tokens de vently.css
   =================================================================== */

/* Segmented control */
.showcase-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0 auto 34px;
  padding: 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.showcase-tabs button {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  color: var(--fg-mute); padding: 9px 18px; border-radius: 999px;
  transition: background .16s, color .16s;
}
.showcase-tabs button svg { width: 16px; height: 16px; }
.showcase-tabs button:hover { color: var(--ink); }
.showcase-tabs button.active { background: var(--violet); color: #fff; }

/* App frame */
.app-frame {
  max-width: 1080px; margin-inline: auto;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-card);
}
.app-chrome { display: flex; align-items: center; gap: 7px; padding: 11px 15px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.app-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #d7d7df; }
.app-chrome i:nth-child(1){ background:#ff5f57; } .app-chrome i:nth-child(2){ background:#febc2e; } .app-chrome i:nth-child(3){ background:#28c840; }
.app-chrome .addr { margin-left: 12px; font-family: var(--font-mono); font-size: .74rem; color: var(--fg-faint); display: inline-flex; align-items: center; gap: 7px; }
.app-chrome .addr svg { width: 12px; height: 12px; color: var(--mint-2); }

.app-shell { display: grid; grid-template-columns: 198px 1fr; min-height: 520px; }
.app-frame.shop-mode .app-shell { grid-template-columns: 1fr; }

/* Sidebar (shell violeta profundo — igual que el panel real) */
.app-side { background: var(--violet-deep); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.app-frame.shop-mode .app-side { display: none; }
.app-side .s-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.app-side .s-brand img { width: auto; height: 23px; }
.app-side .s-sec { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #7e74a0; padding: 12px 10px 6px; font-weight: 700; }
.app-side a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: #c3bcda; font-size: .84rem; font-weight: 500; transition: background .14s, color .14s; }
.app-side a svg { width: 17px; height: 17px; opacity: .9; }
.app-side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-side a.on { background: var(--violet-vivid); color: #fff; }
.app-side a.on svg { opacity: 1; }

/* Body */
.app-body { display: flex; flex-direction: column; background: var(--canvas); min-width: 0; position: relative; }
.store-wa { display: none; position: absolute; right: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; background: #25d366; place-items: center; box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .6); z-index: 6; transition: transform .16s; }
.store-wa svg { width: 24px; height: 24px; color: #fff; }
.store-wa:hover { transform: scale(1.07); }
.app-frame.shop-mode .store-wa { display: grid; }
.app-top { height: 54px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.app-top h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; }
.app-top .t-search { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--fg-faint); font-size: .8rem; min-width: 160px; }
.app-top .t-search svg { width: 15px; height: 15px; }
.app-top .t-av { width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .78rem; flex: none; }
.app-content { padding: 18px; overflow: auto; flex: 1; }
.app-frame.shop-mode .app-top { display: none; }
.app-frame.shop-mode .app-content { padding: 0; }

/* View switching */
.app-view { display: none; }
.app-view.active { display: block; animation: fadeView .25s ease; }
@keyframes fadeView { from { opacity: 0; transform: translateY(6px); } }

/* ---------- POS view ---------- */
.pos-layout { display: grid; grid-template-columns: 1fr 270px; gap: 16px; }
.pos-search { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg-faint); font-size: .85rem; margin-bottom: 14px; }
.pos-search svg { width: 16px; height: 16px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.pp-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 10px; position: relative; box-shadow: var(--shadow-sm); }
.pp-card .pp-thumb { height: 62px; border-radius: 8px; margin-bottom: 9px; display: grid; place-items: center; color: #fff; }
.pp-card .pp-thumb svg { width: 22px; height: 22px; opacity: .9; }
.pp-card .pp-name { font-size: .82rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.pp-card .pp-price { font-family: var(--font-mono); font-weight: 600; font-size: .9rem; color: var(--violet); margin-top: 3px; }
.pp-badge { position: absolute; top: 8px; right: 8px; font-family: var(--font-display); font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; }
.pp-badge.promo { background: var(--violet-100); color: var(--violet); }
.pp-badge.off { background: #fde9c8; color: #92600a; }
.pp-badge.out { background: #f1d6d6; color: #a13333; }

.pos-cart { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.pos-cart h5 { font-family: var(--font-display); font-weight: 700; font-size: .9rem; padding: 14px 15px; border-bottom: 1px solid var(--line); color: var(--ink); }
.pos-cart .lines { padding: 6px 15px; flex: 1; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: .82rem; color: var(--fg-soft); border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line .q { font-family: var(--font-mono); color: var(--fg-faint); margin-right: 6px; }
.cart-line .lp { font-family: var(--font-mono); color: var(--ink); white-space: nowrap; }
.pos-cart .totals { padding: 13px 15px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pos-cart .trow { display: flex; justify-content: space-between; font-size: .8rem; color: var(--fg-mute); padding: 2px 0; }
.pos-cart .trow.grand { color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-top: 6px; }
.pos-cart .trow.grand b { font-family: var(--font-mono); }
.pos-cart .pay { margin: 13px 15px 15px; background: var(--violet); color: #fff; text-align: center; padding: 11px; border-radius: 9px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }

/* ---------- Inventory view ---------- */
.inv-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.inv-toolbar .pos-search { margin-bottom: 0; flex: 1; max-width: 280px; }
.inv-add { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; background: var(--violet); color: #fff; padding: 9px 15px; border-radius: 9px; font-family: var(--font-display); font-weight: 600; font-size: .82rem; }
.inv-add svg { width: 15px; height: 15px; }
.inv-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { font-family: var(--font-display); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.inv-table td { padding: 11px 15px; border-bottom: 1px solid var(--line); font-size: .83rem; color: var(--fg-soft); }
.inv-table tr:last-child td { border-bottom: none; }
.inv-table td.sku { font-family: var(--font-mono); color: var(--fg-mute); font-size: .78rem; }
.inv-table td.prod { color: var(--ink); font-weight: 600; }
.inv-table td.num { font-family: var(--font-mono); color: var(--ink); }
.inv-table tr:hover td { background: var(--violet-50); }
.st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.st.ok { background: var(--mint-50); color: var(--mint-2); } .st.ok::before { background: var(--mint-2); }
.st.low { background: #fdf0d8; color: #92600a; } .st.low::before { background: #c98a16; }
.st.out { background: #f6e0e0; color: #a13333; } .st.out::before { background: #c14545; }

/* ---------- Stats view ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px; box-shadow: var(--shadow-sm); }
.kpi .kl { font-size: .72rem; color: var(--fg-mute); font-weight: 500; }
.kpi .kv { font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem; color: var(--ink); margin-top: 4px; letter-spacing: -0.02em; }
.kpi .kd { font-family: var(--font-mono); font-size: .72rem; margin-top: 3px; font-weight: 600; }
.kpi .kd.up { color: var(--mint-2); } .kpi .kd.down { color: #c14545; }
.stats-lower { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.stats-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px; box-shadow: var(--shadow-sm); }
.stats-card h5 { font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--ink); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.stats-card h5 span { font-family: var(--font-mono); font-weight: 500; font-size: .72rem; color: var(--fg-faint); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 6px; }
.bars .bar { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--violet-vivid), var(--violet)); position: relative; min-width: 0; }
.bars .bar.alt { background: linear-gradient(180deg, #16b48a, var(--mint-2)); }
.bars .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: .62rem; color: var(--fg-faint); }
.bars-x { height: 18px; }
.top-list { display: grid; gap: 11px; }
.top-item { display: flex; align-items: center; gap: 11px; }
.top-item .ti-rank { width: 22px; height: 22px; border-radius: 6px; background: var(--violet-50); color: var(--violet); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: .72rem; flex: none; }
.top-item .ti-name { font-size: .8rem; color: var(--ink); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-item .ti-val { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-mute); flex: none; }

/* ---------- Storefront view ---------- */
.store-top { display: flex; align-items: center; gap: 16px; padding: 13px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.store-top .st-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.store-top .st-brand img { width: auto; height: 21px; }
.store-top nav { display: flex; gap: 18px; margin-left: 14px; }
.store-top nav a { font-size: .8rem; color: var(--fg-soft); font-weight: 500; }
.store-top .st-cart { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--ink); font-weight: 600; }
.store-top .st-cart svg { width: 18px; height: 18px; }
.store-top .st-cart .badge { background: var(--violet); color: #fff; font-family: var(--font-mono); font-size: .64rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.store-hero { padding: 26px 20px; background: linear-gradient(120deg, var(--violet-deep), var(--violet-deep-2)); color: #fff; }
.store-hero .sh-eye { font-family: var(--font-display); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #cbb6ec; font-weight: 700; }
.store-hero h3 { color: #fff; font-size: 1.4rem; margin-top: 6px; }
.store-hero p { color: #d4cee4; font-size: .82rem; margin-top: 4px; }
.store-body { padding: 18px 20px 22px; }
.store-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.store-cat { font-size: .78rem; font-weight: 600; color: var(--fg-soft); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.store-cat.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.store-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.store-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--fg-mute); }
.store-trust svg { width: 15px; height: 15px; color: var(--mint-2); flex: none; }
.store-secrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 13px; }
.store-secrow + .store-secrow, .store-grid + .store-secrow { margin-top: 22px; }
.store-secrow h5 { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--ink); }
.store-secrow a { font-size: .76rem; color: var(--violet); font-weight: 600; }
.store-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.sc-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.sc-card .sc-img { height: 92px; display: grid; place-items: center; color: #fff; }
.sc-card .sc-img svg { width: 26px; height: 26px; opacity: .9; }
.sc-card .sc-info { padding: 11px; }
.sc-card .sc-name { font-size: .8rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.sc-card .sc-bot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.sc-card .sc-price { font-family: var(--font-mono); font-weight: 600; font-size: .88rem; color: var(--ink); }
.sc-card .sc-add { width: 28px; height: 28px; border-radius: 8px; background: var(--violet); color: #fff; display: grid; place-items: center; }
.sc-card .sc-add svg { width: 15px; height: 15px; }

/* thumbs tints */
.t-violet { background: linear-gradient(135deg, #5b2e9e, #3b1f5c); }
.t-mint { background: linear-gradient(135deg, #16b48a, #0b7e60); }
.t-slate { background: linear-gradient(135deg, #5b5b68, #2a2a32); }
.t-gold { background: linear-gradient(135deg, #d29a2a, #a8761a); }
.t-plum { background: linear-gradient(135deg, #8a4fb0, #5b2e9e); }

/* ===================================================================
   STOREFRONT v2 — fiel al demo real (demo.vently.mx)
   Header oscuro, logo V central, categorías circulares, precios violeta
   =================================================================== */
.store2 { font-family: var(--font-body); background: #fff; }
.bcond { font-family: "Barlow Condensed", var(--font-display); }

/* Header oscuro */
.s2-top { display: flex; align-items: center; gap: 14px; padding: 13px 22px; background: #15101f; }
.s2-grp { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.s2-grp:last-child { justify-content: flex-end; }
.s2-search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 999px; background: #fff; color: #9a9aa6; font-size: .72rem; flex: none; width: 148px; }
.s2-search svg { width: 14px; height: 14px; color: #6e45b0; }
.s2-nav { display: flex; gap: 13px; }
.s2-nav a { color: #e7e4f0; font-size: .68rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.s2-logo { height: 30px; width: auto; flex: none; }
.s2-icons { display: flex; align-items: center; gap: 13px; color: #e7e4f0; }
.s2-icons svg { width: 18px; height: 18px; }
.s2-cart { position: relative; display: inline-flex; }
.s2-cart i { position: absolute; top: -7px; right: -8px; background: #6e45b0; color: #fff; font-size: .58rem; font-family: var(--font-mono); width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; }

/* Hero dramático */
.s2-hero { position: relative; overflow: hidden; padding: 42px 30px; min-height: 232px; display: flex; align-items: center; background: radial-gradient(120% 150% at 82% 50%, #4a2585, transparent 58%), linear-gradient(115deg, #100b1c 30%, #1e1535 65%, #2c1c52); }
.s2-hero-copy { position: relative; z-index: 3; max-width: 62%; }
.s2-eye { display: inline-block; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; color: #c9b6ec; border: 1px solid rgba(201, 182, 236, .4); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.s2-hero h3 { font-weight: 700; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: .94; color: #fff; letter-spacing: .005em; }
.s2-sub { color: #d4cee4; font-size: .9rem; margin-top: 12px; max-width: 34ch; }
.s2-cta { display: inline-block; margin-top: 18px; background: #6e45b0; color: #fff; font-weight: 700; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; padding: 11px 22px; border-radius: 7px; }
.s2-mark { position: absolute; right: 1%; top: 50%; transform: translateY(-50%); opacity: .15; z-index: 1; }
.s2-mark img { height: 220px; width: auto; }
.s2-neon { position: absolute; right: 30%; top: -10%; bottom: -10%; width: 3px; background: #8a5cff; box-shadow: 0 0 26px 5px rgba(138, 92, 255, .8); opacity: .55; transform: rotate(8deg); z-index: 1; }
.s2-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; color: #fff; z-index: 4; }
.s2-arrow svg { width: 16px; height: 16px; }
.s2-arrow.l { left: 14px; } .s2-arrow.r { right: 14px; }
.s2-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 4; }
.s2-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.s2-dots i.on { width: 20px; border-radius: 4px; background: #fff; }

/* Categorías circulares */
.s2-cats { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; padding: 26px 20px; background: #fff; position: relative; }
.s2-catarrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: #eeeef2; color: #6e6e7a; display: grid; place-items: center; }
.s2-catarrow svg { width: 15px; height: 15px; }
.s2-catarrow.l { left: 16px; } .s2-catarrow.r { right: 16px; }
.s2-cat { text-align: center; }
.s2-ring { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; border: 2px solid #6e45b0; padding: 4px; margin: 0 auto 10px; box-sizing: border-box; }
.s2-cthumb { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; }
.s2-cthumb svg { width: 26px; height: 26px; }
.s2-cat b { display: block; font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .04em; color: var(--ink); }

/* Slots de FOTO: cubren el placeholder cuando existe el archivo */
.s2-cthumb img, .s2-pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Secciones de productos */
.s2-section { padding: 26px 24px 30px; }
.s2-section.dark { background: #1b1430; }
.s2-section.light { background: var(--canvas); }
.s2-sechead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.s2-section h4 { font-weight: 700; text-transform: uppercase; font-size: 1.55rem; letter-spacing: .02em; }
.s2-section.dark h4 { color: #fff; }
.s2-section.light h4 { color: var(--ink); }
.s2-section .s2-vertodo { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6e45b0; }
.s2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.s2-pcard { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .5); }
.s2-pimg { height: 138px; display: grid; place-items: center; background: #f1f1f5; color: #c2c2cc; position: relative; }
.s2-pimg svg { width: 42px; height: 42px; }
.s2-fav { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .14); display: grid; place-items: center; color: #9a9aa6; }
.s2-fav svg { width: 13px; height: 13px; }
.s2-pinfo { padding: 11px 12px 13px; }
.s2-pname { font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-pprice { font-family: var(--font-mono); font-weight: 600; color: #6e45b0; font-size: .92rem; margin-top: 3px; }
.s2-sw { display: flex; gap: 5px; margin-top: 9px; justify-content: flex-end; }
.s2-sw i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }

/* Responsive */
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .stats-lower { grid-template-columns: 1fr; }
  .inv-table-wrap { overflow-x: auto; }
  .inv-table { min-width: 540px; }
  .s2-nav, .s2-search { display: none; }
  .s2-grid { grid-template-columns: repeat(2, 1fr); }
  .s2-hero-copy { max-width: 100%; }
}
