/* ===========================================================
   LyJ Servicios — estilos de componentes
   =========================================================== */

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); box-shadow: var(--shadow-sm); }
.topbar { background: var(--primary); color: rgba(255,255,255,.92); font-size: 13px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar-right { display: flex; align-items: center; gap: 22px; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; color: inherit; font-weight: 500; white-space: nowrap; }
.topbar-item:hover { color: #fff; }

.header-main { display: flex; align-items: center; gap: 28px; padding: 16px 24px; }
.logo-btn { background: none; border: none; padding: 0; }
.searchbar {
  flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0 16px; height: 46px; color: var(--muted);
  transition: border-color .15s ease, background .15s ease;
}
.searchbar:focus-within { border-color: var(--primary); background: var(--surface); color: var(--ink); }
.searchbar input { flex: 1; border: none; background: none; outline: none; font-family: var(--font-body); font-size: 15px; color: var(--ink); }
.search-clear { border: none; background: none; color: var(--muted); display: grid; place-items: center; padding: 2px; }
.search-clear:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 11px 18px; font-family: var(--font-display); font-weight: 700; font-size: 14px;
  transition: filter .15s ease;
}
.cart-btn:hover { filter: brightness(1.15); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--surface);
}
.hamburger { background: none; border: none; color: var(--ink); display: none; padding: 4px; }
.iconbtn { background: none; border: none; color: var(--ink); display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.iconbtn:hover { background: var(--surface-2); }

/* ---------- Nav + megamenú ---------- */
.mainnav { border-top: 1px solid var(--line-soft); position: relative; }
.mainnav-in { display: flex; align-items: center; gap: 4px; height: 52px; }
.navlink {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 8px 14px; border-radius: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-soft);
  position: relative;
}
.navlink:hover { color: var(--ink); background: var(--surface-2); }
.navlink.active { color: var(--primary-ink); }
.navlink.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--accent); border-radius: 3px; }
.nav-spacer { flex: 1; }
.nav-wsp { color: var(--ok); font-weight: 700; }
.nav-wsp:hover { color: var(--ok); background: oklch(0.62 0.13 155 / 0.08); }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); box-shadow: var(--shadow-lg); border-top: 1px solid var(--line-soft); animation: fadeUp .18s ease both; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 18px 24px; }
.mega-cat { text-align: left; background: none; border: none; padding: 14px 16px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 3px; }
.mega-cat:hover { background: var(--surface-2); }
.mega-cat-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.mega-cat-desc { font-size: 13px; color: var(--muted); }

/* ---------- Mobile nav ---------- */
.mobile-overlay { position: fixed; inset: 0; z-index: 100; background: oklch(0.2 0.02 250 / 0.45); display: flex; justify-content: flex-end; }
.mobile-panel { width: min(320px, 86vw); background: var(--surface); height: 100%; overflow-y: auto; padding: 18px; animation: slideIn .22s ease both; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.mobile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mobile-link { display: block; width: 100%; text-align: left; background: none; border: none; padding: 13px 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.mobile-sub-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 16px 8px 4px; font-weight: 700; }
.mobile-sublink { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 8px; font-size: 15px; color: var(--ink-soft); }
.mobile-sublink:hover { color: var(--ink); }

/* ---------- Product card ---------- */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
.pcard-img { position: relative; border: none; background: none; padding: 0; display: block; }
.pcard-img .badge { position: absolute; top: 12px; left: 12px; }
.pcard-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); }
.pcard-title { font-size: 16.5px; font-weight: 700; cursor: pointer; line-height: 1.2; }
.pcard-title:hover { color: var(--primary-ink); }
.pcard-meta { font-size: 13px; color: var(--muted); }
.pcard-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard-foot .price { font-size: 18px; }

/* ---------- Drawer carrito ---------- */
.drawer-root { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.drawer-root.open { pointer-events: auto; }
.drawer-scrim { position: absolute; inset: 0; background: oklch(0.2 0.02 250 / 0.4); opacity: 0; transition: opacity .25s ease; }
.drawer-root.open .drawer-scrim { opacity: 1; }
.drawer { position: absolute; top: 0; right: 0; height: 100%; width: min(430px, 92vw); background: var(--surface); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.3,.8,.3,1); box-shadow: var(--shadow-lg); }
.drawer-root.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 20px; }
.drawer-empty { padding: 48px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.drawer-ship { padding: 14px 22px; background: var(--surface-2); font-size: 14px; display: flex; flex-direction: column; gap: 9px; }
.ship-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s ease; }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-item { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.di-name { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.qty { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty button { width: 28px; height: 28px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 7px; display: grid; place-items: center; color: var(--ink); }
.qty button:hover { border-color: var(--ink-soft); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 15px; }
.di-remove { width: auto !important; border: none !important; color: var(--muted) !important; font-size: 12.5px; margin-left: 6px; padding: 0 4px; }
.di-remove:hover { color: var(--accent-ink) !important; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); }
.drawer-subtotal { display: flex; align-items: center; justify-content: space-between; }
.cart-wsp { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; color: var(--ok); font-weight: 700; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 24px 40px; }
.footer-contact { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 9px; color: rgba(255,255,255,.8); font-size: 14.5px; }
.footer-contact a:hover { color: #fff; }
.footer-col h4 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.footer-col button { display: block; background: none; border: none; color: rgba(255,255,255,.82); padding: 6px 0; font-size: 14.5px; text-align: left; }
.footer-col button:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-in { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- responsive helpers ---------- */
.show-md { display: none; }
@media (max-width: 900px) {
  .hide-md { display: none !important; }
  .show-md { display: inline-flex; }
  .hamburger { display: grid; place-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 620px) {
  .hide-sm { display: none !important; }
  .header-main { gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
  .searchbar { order: 3; flex-basis: 100%; max-width: none; height: 44px; }
  .wrap { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-in { flex-direction: column; gap: 6px; text-align: center; }
}
