@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root{
  --blue:#0A8CEF;
  --blue2:#028DF1;
  --blueDark:#076FBE;
  --bg:#F5F7FA;
  --text:#1D1E23;
  --muted:#3A3D46;
  --white:#ffffff;
  --soft:#E6F3FF;
  --border: rgba(0,0,0,.10);
  --shadow: 0 10px 22px rgba(0,0,0,.10);
}

*{ margin:0; padding:0; box-sizing:border-box; text-decoration:none; list-style:none; }

body{
  font-family:'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container{ max-width: 1200px; margin: 0 auto; }

/* HEADER */
.shop-header{
  background:#fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.menu{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
}

.logo img{ height: 35px; width:auto; display:block; }

.menu .navbar ul li{ position: relative; float:left; }

.menu .navbar ul li a{
  font-size: 16px;
  padding: 16px;
  font-weight: 700;
  color: var(--text);
  display:block;
  border-radius: 12px;
}

.menu .navbar ul li a:hover{
  color: var(--blue);
  background: var(--soft);
}

.menu .navbar ul li a.active{
  color: var(--blue);
  background: var(--soft);
}

#menu{ display:none; }
.menu-icono{ width: 25px; }
.menu label{ cursor:pointer; display:none; }

/* CARRITO DROPDOWN */
.shop-cart ul{ display:flex; align-items:center; gap:10px; }
.submenu{ position: relative; }
#img-carrito{ width: 28px; cursor: pointer; }

.cart-badge{
  position:absolute;
  top:-8px;
  right:-10px;
  background: var(--blue);
  color:#fff;
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
}

.submenu #carrito{ display:none; }
.submenu:hover #carrito{
  display:block;
  position:absolute;
  right:0;
  top:100%;
  z-index: 10;
  background: rgba(58, 61, 70, 0.90);
  backdrop-filter: blur(10px);
  padding: 18px;
  min-width: 400px;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,.25);
}

table{ width:100%; border-collapse: collapse; }
th, td{ color:#fff; font-size: 13px; padding: 8px 6px; }
th{ font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.2); }

.mini-img{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}

.borrar{
  background: var(--blue);
  border-radius: 50%;
  padding: 4px 9px;
  color:#fff;
  font-weight: 800;
}

.btn-3{
  display:inline-block;
  padding: 8px 16px;
  background: var(--blue);
  color:#fff;
  border-radius: 12px;
  font-weight: 800;
  margin-top: 12px;
  text-align:center;
}

.btn-3:hover{ background: var(--blueDark); }

/* MAIN */
.shop-main{ padding: 18px 16px 50px 16px; }

.shop-layout{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
}

.shop-title{
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.shop-subtitle{
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

/* SIDEBAR */
.shop-sidebar{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 86px;
  height: fit-content;
}

.shop-filter{ margin-top: 12px; }
.shop-filter label{
  display:block;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
}

.shop-filter input,
.shop-filter select{
  width:100%;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  outline:none;
  font-weight: 700;
  background:#fff;
}

.shop-filter small{
  display:block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

.shop-filter input:focus,
.shop-filter select:focus{
  border-color: rgba(10,140,239,.55);
  box-shadow: 0 0 0 4px rgba(10,140,239,.12);
}

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

.chip{
  border:1px solid var(--border);
  background:#fff;
  border-radius: 999px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 800;
  font-size: 12px;
}

.chip:hover{ background: var(--soft); }

.chip.active{
  background: var(--blue);
  border-color: var(--blue);
  color:#fff;
}

.shop-note{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f0f8ff;
  border: 1px solid rgba(10,140,239,.22);
  color: #24425f;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

/* PRODUCTS */
.shop-products-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

/* CARD */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  border-top: 3px solid var(--blue);
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

.card-img{ position: relative; background: #e9eef6; }

.card-img img{
  width:100%;
  height: 220px;
  object-fit: cover;
  display:block;
}

.card-actions{
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display:flex;
  gap: 8px;
}

.card-body{ padding: 12px; }

.card-body h3{
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 8px;
}

.card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blueDark);
  font-weight: 900;
  font-size: 12px;
}

.price{ color: var(--blue); font-weight: 900; }

/* BUTTONS */
.btn{
  border:0;
  cursor:pointer;
  background: var(--blue);
  color:#fff;
  font-weight: 900;
  border-radius: 14px;
  padding: 10px 12px;
  width: 100%;
}

.btn:hover{ background: var(--blue2); }

.btn-ghost{
  background: rgba(255,255,255,.95);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover{ background:#fff; }

/* MODAL */
.modal{ position: fixed; inset: 0; display:none; z-index: 1200; }
.modal.open{ display:block; }

.modal-overlay{ position:absolute; inset:0; background: rgba(0,0,0,.40); }

.modal-panel{
  position: relative;
  max-width: 980px;
  margin: 40px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(0,0,0,.20);
  padding: 14px;
  width: calc(100% - 24px);
}

.modal-x{
  position:absolute;
  top: 10px;
  right: 10px;
  border:1px solid var(--border);
  background:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 900;
}

.modal-content{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 18px;
}

.modal-img{
  width:100%;
  height: 340px;
  object-fit: cover;
  border-radius: 16px;
  background: #e9eef6;
  border: 1px solid rgba(0,0,0,.06);
}

.thumbs{ display:flex; gap: 10px; margin-top: 10px; }
.thumb{ border:0; background: transparent; padding:0; cursor:pointer; }

.thumb img{
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(10,140,239,.15);
}

.muted{ color: var(--muted); font-weight: 600; line-height: 1.35; }

.modal-priceRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin: 10px 0 12px;
}

.priceBig{ font-weight: 900; color: var(--blue); font-size: 20px; }

.modal-btns{ display:flex; gap: 10px; }

.divider{ height:1px; border:0; background: rgba(0,0,0,.10); margin: 14px 0; }

.subtitle{ margin:0 0 10px 0; font-size: 14px; font-weight: 900; }

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

.sim{
  border:1px solid var(--border);
  background:#fff;
  border-radius: 16px;
  padding: 0;
  cursor:pointer;
  overflow:hidden;
  text-align:left;
  box-shadow: 0 8px 16px rgba(0,0,0,.08);
}

.sim img{
  width:100%;
  height: 110px;
  object-fit: cover;
  display:block;
}

.sim-t{ padding: 10px 10px 2px 10px; font-weight: 900; font-size: 13px; }
.sim-p{ padding: 0 10px 10px 10px; color: var(--blue); font-weight: 900; font-size: 12px; }

.smallNote{ margin-top: 10px; font-size: 12px; color: #6b7280; font-weight: 600; }

.empty{
  padding: 12px;
  color: var(--muted);
  font-weight: 700;
  background: #f7fbff;
  border: 1px dashed rgba(10,140,239,.25);
  border-radius: 14px;
}

/* RESPONSIVE */
@media (max-width: 980px){
  .shop-layout{ grid-template-columns: 1fr; }
  .shop-sidebar{ position: static; top:auto; }
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .modal-content{ grid-template-columns: 1fr; }
  .modal-img{ height: 280px; }
}

@media (max-width: 911px){
  .menu{ padding: 16px; }
  .menu label{ display: initial; }

  .menu .navbar{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    display:none;
    padding-bottom: 8px;
  }

  .menu .navbar ul li{ width:100%; }

  .menu .navbar ul li a{
    color:#fff;
    border-radius: 0;
  }

  .menu .navbar ul li a:hover{
    background: rgba(255,255,255,.12);
    color:#fff;
  }

  #menu:checked ~ .navbar{ display:block; }

  .submenu:hover #carrito{
    width:100%;
    min-width: unset;
  }

  .grid{ grid-template-columns: 1fr; }
}

/* ===== FIX: el header global es fijo, entonces shop necesita espacio arriba ===== */
.shop-header{
  padding-top: 96px; /* igual que .header */
}

/* en móvil el header suele ser más alto */
@media (max-width: 911px){
  .shop-header{
    padding-top: 112px;
  }
}

/* ===== Badge de carrito GLOBAL ===== */
.submenu{
  position: relative;
}

.cart-badge{
  position: absolute;
  top: -8px;
  right: -10px;

  min-width: 18px;
  height: 18px;
  padding: 0 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: #00A3FF; /* o tu azul */
  color: #fff;
  font-weight: 900;
  font-size: 12px;

  box-shadow: 0 8px 14px rgba(0,0,0,.20);
  border: 2px solid rgba(255,255,255,.85);
}

/* ===== Empuje global para páginas con header fijo ===== */
body{
  padding-top: 96px;
}

@media (max-width: 911px){
  body{
    padding-top: 112px;
  }
}

/* Evita doble empuje en páginas que ya usan .header */
.header{
  padding-top: 0 !important;
}
