:root{--bg:#0f1115;--panel:#171a21;--muted:#9ca3af;--text:#f7f7f8;--line:#2a2f3a;--accent:#f2c94c;--danger:#ff6b6b;--ok:#43d17a}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(180deg,#0d0f13,#12151b 40%,#0d0f13);color:var(--text);min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.wrap{width:min(1180px,calc(100% - 28px));margin:auto}.topbar{position:sticky;top:0;z-index:10;background:rgba(15,17,21,.88);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:70px}.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.08em}.logo{width:42px;height:42px;border-radius:13px;background:var(--accent);color:#111;display:grid;place-items:center;font-weight:1000}.nav-actions{display:flex;gap:10px;align-items:center}.btn{border:1px solid var(--line);background:#1c2028;color:var(--text);padding:11px 15px;border-radius:12px;cursor:pointer;font-weight:700}.btn:hover{transform:translateY(-1px);border-color:#4a5261}.btn.primary{background:var(--accent);color:#111;border-color:var(--accent)}.btn.danger{background:#2a1719;color:#ff9d9d}.hero{padding:64px 0 34px}.eyebrow{color:var(--accent);font-size:.85rem;font-weight:900;text-transform:uppercase;letter-spacing:.18em}.hero h1{font-size:clamp(2.4rem,7vw,5.6rem);line-height:.92;margin:14px 0 18px;max-width:850px}.hero p{color:var(--muted);font-size:1.12rem;max-width:680px;line-height:1.6}.toolbar{display:grid;grid-template-columns:1fr auto;gap:12px;margin:24px 0}.search{width:100%;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px 16px;color:var(--text)}.chips{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:24px}.chip{background:#171a21;border:1px solid var(--line);color:#ddd;padding:9px 13px;border-radius:999px;cursor:pointer}.chip.active{background:var(--accent);color:#111;border-color:var(--accent)}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;padding-bottom:70px}.card{background:var(--panel);border:1px solid var(--line);border-radius:20px;overflow:hidden;display:flex;flex-direction:column;min-height:100%;transition:.18s}.card:hover{transform:translateY(-3px);border-color:#434b5a}.card-img{aspect-ratio:1/1;background:#0b0d11;display:grid;place-items:center;overflow:hidden}.card-img img{width:100%;height:100%;object-fit:cover}.placeholder{color:#5c6472;font-weight:800}.card-body{padding:16px;display:flex;flex-direction:column;gap:9px;flex:1}.kicker{font-size:.78rem;color:var(--accent);font-weight:800;text-transform:uppercase}.card h3{margin:0;font-size:1.06rem}.muted{color:var(--muted)}.price{font-size:1.25rem;font-weight:900;margin-top:auto}.stock{font-size:.86rem;color:var(--ok)}.stock.out{color:#ff9a9a}.notice{padding:16px;border-radius:14px;background:#171a21;border:1px solid var(--line);color:var(--muted)}.modal{position:fixed;inset:0;background:rgba(0,0,0,.72);display:none;align-items:center;justify-content:center;padding:20px;z-index:30}.modal.open{display:flex}.modal-card{background:#15181f;border:1px solid var(--line);border-radius:22px;width:min(480px,100%);padding:22px}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal h2{margin:0 0 16px}.form{display:grid;gap:12px}.field{display:grid;gap:7px}.field label{font-size:.86rem;color:#c9ced8;font-weight:700}.field input,.field select,.field textarea{width:100%;background:#0f1217;color:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}.field textarea{min-height:110px;resize:vertical}.msg{min-height:22px;color:#ffaaaa}.admin-shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}.sidebar{border-right:1px solid var(--line);padding:22px;position:sticky;top:0;height:100vh;background:#101218}.side-links{display:grid;gap:8px;margin-top:26px}.side-links button{width:100%;text-align:left}.main{padding:28px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0}.stat{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px}.stat strong{font-size:2rem;display:block}.table-wrap{overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:18px}.table{width:100%;border-collapse:collapse;min-width:780px}.table th,.table td{padding:13px;border-bottom:1px solid var(--line);text-align:left}.table th{color:#cbd0d8;font-size:.82rem;text-transform:uppercase}.row-actions{display:flex;gap:8px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;margin-bottom:20px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.hidden{display:none!important}.thumbs{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.thumb{width:94px}.thumb img{width:94px;height:94px;object-fit:cover;border-radius:12px}.thumb small{display:block;margin-top:5px}.footer{border-top:1px solid var(--line);padding:26px 0;color:var(--muted)}@media(max-width:900px){.grid{grid-template-columns:repeat(2,1fr)}.admin-shell{display:block}.sidebar{height:auto;position:static;border-right:0;border-bottom:1px solid var(--line)}.side-links{grid-template-columns:repeat(3,1fr)}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.grid{grid-template-columns:1fr}.toolbar{grid-template-columns:1fr}.hero{padding-top:40px}.nav{align-items:flex-start;padding:12px 0}.nav-actions{flex-wrap:wrap;justify-content:flex-end}.two,.three{grid-template-columns:1fr}.main{padding:18px}.stats{grid-template-columns:1fr 1fr}.side-links{grid-template-columns:1fr 1fr}.btn{padding:10px 12px}}


/* ======================================================
   VISOR DE PRODUCTO
   ====================================================== */

.product-image-button {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: inherit;
  background: inherit;
}

.product-image-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body.product-modal-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-modal.open {
  display: flex;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .76);
}

.product-detail {
  position: relative;
  z-index: 2;
  width: min(100%, 580px);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: var(--card, #151515);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.product-detail-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  color: white;
  cursor: pointer;
  font-size: 1rem;
}

.product-detail-image {
  width: 100%;
  background: #0b0b0b;
}

.product-detail-image img {
  width: 100%;
  height: auto;
  max-height: 68dvh;
  display: block;
  object-fit: contain;
}

.product-detail-placeholder {
  min-height: 350px;
  display: grid;
  place-items: center;
  font-size: 4rem;
  font-weight: 900;
}

.product-detail-body {
  padding: 1.35rem;
}

.product-detail-body h2 {
  margin: .45rem 0;
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.05;
}

.product-detail-price {
  margin-top: 1rem;
  font-size: 1.65rem;
  font-weight: 900;
}

.product-detail-description {
  margin: 1.25rem 0;
  line-height: 1.6;
  white-space: pre-line;
}

.product-detail-whatsapp {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

@media (max-width: 600px) {
  .product-modal {
    padding: 0;
    align-items: end;
  }

  .product-detail {
    width: 100%;
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
  }
}

/* Banners editables */
.banner-area{position:relative;overflow:hidden;border-radius:24px;margin-top:24px;padding:48px 56px;min-height:330px;background:#11151c;background-image:linear-gradient(90deg,rgba(8,10,14,.96),rgba(8,10,14,.62),rgba(8,10,14,.18)),var(--banner-image);background-size:cover;background-position:center}.banner-stage{position:relative;z-index:1;max-width:760px}.banner-stage h1{margin-top:12px}.banner-cta{display:inline-flex;margin-top:8px}.banner-arrow,.gallery-arrow{position:absolute;z-index:4;width:44px;height:44px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(0,0,0,.58);color:#fff;font-size:2rem;line-height:1;display:grid;place-items:center;cursor:pointer}.banner-arrow{top:50%;transform:translateY(-50%)}.banner-arrow.prev{left:12px}.banner-arrow.next{right:12px}.banner-dots,.gallery-dots{display:flex;justify-content:center;gap:7px}.banner-dots{position:absolute;z-index:3;left:0;right:0;bottom:14px}.banner-dot,.gallery-dot{width:9px;height:9px;border:0;border-radius:50%;padding:0;background:rgba(255,255,255,.38);cursor:pointer}.banner-dot.active,.gallery-dot.active{background:var(--accent);transform:scale(1.2)}

/* Panel de banners y categorías */
.admin-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-card{overflow:hidden;background:var(--panel);border:1px solid var(--line);border-radius:18px}.admin-card-image{width:100%;height:190px;object-fit:cover;background:#0b0d11}.admin-card-image.empty{display:grid;place-items:center;font-size:3rem;font-weight:900;color:#555}.admin-card-body{display:grid;gap:9px;padding:16px}.banner-preview{display:block;width:min(100%,620px);max-height:280px;object-fit:cover;border-radius:16px}.check-row{display:flex;align-items:center;gap:9px;padding-top:28px}.check-row input{width:auto}.side-links{grid-auto-rows:min-content}

/* Galería de producto */
.product-gallery{position:relative;background:#0b0b0b;overflow:hidden}.product-gallery-stage{position:relative;width:100%;min-height:320px;max-height:68dvh}.product-gallery-image{display:none;width:100%;height:auto;max-height:68dvh;object-fit:contain;margin:auto}.product-gallery-image.active{display:block}.gallery-arrow{top:50%;transform:translateY(-50%)}.gallery-arrow.prev{left:10px}.gallery-arrow.next{right:10px}.gallery-counter{position:absolute;right:12px;bottom:12px;z-index:4;padding:6px 10px;border-radius:999px;background:rgba(0,0,0,.68);font-size:.8rem}.gallery-dots{position:absolute;left:0;right:0;bottom:14px;z-index:3;pointer-events:none}.gallery-dot{pointer-events:auto}.product-detail-close{position:fixed}

@media(max-width:900px){.admin-cards{grid-template-columns:1fr}.side-links{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.banner-area{margin-top:12px;padding:34px 28px;min-height:300px;border-radius:20px}.banner-arrow{width:38px;height:38px}.banner-arrow.prev{left:6px}.banner-arrow.next{right:6px}.product-gallery-stage{min-height:260px}.gallery-arrow{width:40px;height:40px}.gallery-dots{bottom:12px}.gallery-counter{bottom:38px}}
