/* layout.css — Topbar, header, nav, hero, promo strip, sidebar, brands, footer, mobile menu
   Tu-Librería */

/* ── TOP BAR ── */
  .topbar {
    background: var(--ink);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    padding: 8px 0;
    text-align: center;
  }
  .topbar a { color: #E8C87A; text-decoration: none; }
  .topbar strong { color: #fff; }

  /* ── HEADER ── */
  header {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
  }
  .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
  }
  .logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-decoration: none;
    flex-shrink: 0;
  }
  .logo-main {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .logo-sub {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }

  .search-bar {
    flex: 1;
    max-width: 520px;
    position: relative;
  }
  .search-bar input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
  }
  .search-bar input:focus {
    border-color: var(--accent);
    background: var(--warm-white);
  }
  .search-bar input::placeholder { color: var(--ink-light); }
  .search-btn {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    background: var(--accent); border: none; border-radius: 50px;
    width: 34px; height: 34px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: background var(--transition);
  }
  .search-btn:hover { background: var(--accent-hover); }
  .search-btn svg { width: 15px; height: 15px; color: white; }

  .header-actions {
    display: flex; align-items: center; gap: 6px; margin-left: auto;
  }
  .header-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--radius);
    background: none; border: 1px solid transparent;
    cursor: pointer; font-family: inherit; font-size: 13px;
    font-weight: 500; color: var(--ink-muted);
    transition: all var(--transition); text-decoration: none;
  }
  .header-btn:hover {
    background: var(--surface); border-color: var(--border);
    color: var(--ink);
  }
  .header-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
  .cart-btn {
    background: var(--accent); color: white; border-color: var(--accent);
    position: relative;
  }
  .cart-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; }
  .cart-count {
    position: absolute; top: -6px; right: -6px;
    background: var(--gold); color: var(--ink); font-size: 10px;
    font-weight: 600; border-radius: 50%; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
  }

  /* ── NAV ── */
  nav {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border-light);
  }
  .nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 12px 16px; font-size: 13px; font-weight: 500;
    color: var(--ink-muted); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition); cursor: pointer;
  }
  .nav-link:hover, .nav-link.active {
    color: var(--accent); border-bottom-color: var(--accent);
  }
  .nav-link svg { width: 15px; height: 15px; }

  /* ── HERO BANNER ── */
  .hero {
    background: var(--ink);
    overflow: hidden;
    position: relative;
  }
  .hero-inner {
    max-width: 1280px; margin: 0 auto; padding: 56px 24px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  }
  .hero-pattern {
    position: absolute; inset: 0; opacity: 0.04;
    background-image: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
    background-size: 24px 24px;
  }
  .hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(200,69,42,0.2); color: #FF9B84;
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 5px 12px; border-radius: 50px;
    margin-bottom: 20px;
  }
  .hero-label span { width: 6px; height: 6px; background: #FF9B84; border-radius: 50%; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
  .hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 48px; color: #fff; line-height: 1.1;
    letter-spacing: -0.03em; margin-bottom: 20px;
  }
  .hero h1 em { color: #E8C87A; font-style: italic; }
  .hero p { color: rgba(255,255,255,0.6); font-size: 16px; line-height: 1.7; margin-bottom: 32px; }
  .hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-primary {
    padding: 13px 28px; background: var(--accent); color: white;
    border: none; border-radius: 50px; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all var(--transition);
  }
  .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,69,42,0.3); }
  .btn-ghost {
    padding: 13px 28px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; font-family: inherit;
    font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all var(--transition);
  }
  .btn-ghost:hover { background: rgba(255,255,255,0.15); }
  .hero-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    position: relative; z-index: 1;
  }
  .hero-card {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); padding: 20px;
    transition: all var(--transition);
  }
  .hero-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
  .hc-icon { font-size: 28px; margin-bottom: 10px; }
  .hc-img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; margin-bottom: 10px; background: rgba(255,255,255,0.08); }
  .hc-name { color: rgba(255,255,255,0.9); font-weight: 600; font-size: 14px; margin-bottom: 4px; line-height: 1.3; }
  .hc-desc { color: rgba(255,255,255,0.45); font-size: 12px; }
  .hc-price { color: #E8C87A; font-weight: 700; font-size: 18px; margin-top: 10px; }
  .hero-card.hc-skeleton { min-height: 110px; background: rgba(255,255,255,0.04); animation: hc-pulse 1.4s ease-in-out infinite; }
  @keyframes hc-pulse { 0%,100% { opacity:.4 } 50% { opacity:.8 } }
  .hero-card { cursor: pointer; }

  /* ── PROMO STRIP ── */
  .promo-strip {
    background: var(--gold-light);
    border-top: 1px solid #E8D5A8; border-bottom: 1px solid #E8D5A8;
    padding: 14px 24px;
  }
  .promo-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  }
  .promo-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500; color: var(--ink);
  }
  .promo-item svg { width: 18px; height: 18px; color: var(--gold); }

  /* ── MAIN LAYOUT ── */
  .main-layout {
    max-width: 1280px; margin: 0 auto; padding: 32px 24px;
    display: grid; grid-template-columns: 240px 1fr; gap: 32px;
  }

  /* ── SIDEBAR ── */
  .sidebar { flex-shrink: 0; min-width: 0; overflow: hidden; }
  .sidebar-section { margin-bottom: 28px; }
  .sidebar-title {
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--ink-light);
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .cat-list { list-style: none; }
  .cat-item a, .cat-item button {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 10px; border-radius: var(--radius);
    font-size: 13px; color: var(--ink-muted); text-decoration: none;
    background: none; border: none; width: 100%; text-align: left;
    cursor: pointer; font-family: inherit; transition: all var(--transition);
  }
  .cat-item a:hover, .cat-item button:hover,
  .cat-item.active a, .cat-item.active button {
    background: var(--accent-light); color: var(--accent);
  }
  .cat-count {
    font-size: 11px; background: var(--tag-bg); color: var(--ink-light);
    padding: 2px 7px; border-radius: 20px; font-weight: 500;
  }
  .cat-item.active .cat-count { background: var(--accent-light); color: var(--accent); }

  .price-range { padding: 4px 0; }
  .price-inputs { display: flex; gap: 8px; margin-bottom: 10px; }
  .price-input {
    flex: 1 1 0; min-width: 0;
    padding: 8px 10px; border: 1px solid var(--border);
    border-radius: var(--radius); font-family: inherit; font-size: 13px;
    background: var(--warm-white); color: var(--ink); outline: none;
    transition: border-color var(--transition);
    box-sizing: border-box;
  }
  .price-input:focus { border-color: var(--accent); }
  .apply-btn {
    width: 100%; padding: 9px; background: var(--ink); color: white;
    border: none; border-radius: var(--radius); font-family: inherit;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background var(--transition);
  }
  .apply-btn:hover { background: #2C2820; }

  .reset-filters-btn {
    display: flex; align-items: center; gap: 7px;
    width: 100%; padding: 9px 14px;
    background: none; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-family: inherit;
    font-size: 13px; font-weight: 600; color: var(--ink-muted);
    cursor: pointer; transition: all var(--transition);
    margin-top: 4px;
  }
  .reset-filters-btn:hover {
    border-color: var(--accent); color: var(--accent); background: var(--accent-light);
  }

  .brand-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .brand-tag {
    padding: 4px 10px; background: var(--tag-bg); border: 1px solid transparent;
    border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--ink-muted);
    cursor: pointer; transition: all var(--transition);
  }
  .brand-tag:hover, .brand-tag.active {
    background: var(--accent-light); border-color: var(--accent);
    color: var(--accent);
  }

  /* ── BRAND LOGOS ── */
  .brands-section {
    background: var(--warm-white); border-top: 1px solid var(--border);
    padding: 32px 24px;
  }
  .brands-inner { max-width: 1280px; margin: 0 auto; }
  .brands-title {
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--ink-light);
    text-align: center; margin-bottom: 24px;
  }
  .brand-logos {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  }
  .brand-logo-tag {
    padding: 6px 16px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 50px; font-size: 12px; font-weight: 600; color: var(--ink-muted);
    letter-spacing: 0.05em; transition: all var(--transition); cursor: pointer;
  }
  .brand-logo-tag:hover { background: var(--ink); color: white; border-color: var(--ink); }

  /* ── FOOTER ── */
  footer {
    background: var(--ink); color: rgba(255,255,255,0.65);
    padding: 48px 24px 24px;
  }
  .footer-inner {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .footer-logo {
    font-family: 'DM Serif Display', serif; font-size: 24px;
    color: white; margin-bottom: 12px;
  }
  .footer-desc { font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
  .footer-contact { font-size: 12px; line-height: 2; }
  .footer-contact strong { color: rgba(255,255,255,0.85); }
  .footer-col h4 {
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: rgba(255,255,255,0.4);
    margin-bottom: 16px;
  }
  .footer-links { list-style: none; }
  .footer-links li { margin-bottom: 8px; }
  .footer-links a {
    font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: none;
    transition: color var(--transition);
  }
  .footer-links a:hover { color: white; }
  .footer-bottom {
    max-width: 1280px; margin: 24px auto 0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; flex-wrap: wrap; gap: 12px;
  }
  .payment-icons { display: flex; gap: 8px; align-items: center; }
  .payment-icon {
    background: rgba(255,255,255,0.1); border-radius: 4px;
    padding: 4px 10px; font-size: 11px; font-weight: 600;
    color: rgba(255,255,255,0.7);
  }

  /* ── MOBILE HAMBURGER ── */
  .hamburger { display:none; background:none; border:none; cursor:pointer; padding:8px; color:var(--ink); }
  .hamburger svg { width:22px; height:22px; display:block; }

  /* ── MOBILE MENU ── */
  .mobile-menu {
    display: none;
    position: fixed; inset: 0;
    background: var(--warm-white);
    z-index: 500;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  .mobile-menu.open { transform: translateX(0); }

  .mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 60px; flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
  }
  .mobile-menu-logo {
    font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--ink);
  }
  .mobile-menu-close {
    background: none; border: none; cursor: pointer; padding: 8px;
    color: var(--ink-muted); display: flex; align-items: center;
  }

  /* Buscador dentro del menú mobile */
  .mobile-search-wrap {
    position: relative; padding: 14px 20px; flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
  }
  .mobile-search-wrap input {
    width: 100%; padding: 11px 42px 11px 40px;
    border: 1.5px solid var(--border); border-radius: 50px;
    font-family: inherit; font-size: 14px;
    background: var(--surface); outline: none; color: var(--ink);
    transition: border-color var(--transition), background var(--transition);
  }
  .mobile-search-wrap input:focus {
    border-color: var(--accent); background: var(--warm-white);
  }
  .mobile-search-icon {
    position: absolute; left: 34px; top: 50%; transform: translateY(-50%);
    color: var(--ink-light); pointer-events: none;
  }
  .mobile-search-go {
    position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
    background: var(--accent); border: none; border-radius: 50%;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: white;
  }

  /* Cuerpo scrollable del menú */
  .mobile-menu-body { flex: 1; overflow-y: auto; padding: 8px 0; }
  .mobile-menu-section-title {
    font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-light);
    padding: 16px 20px 6px;
  }
  .mobile-nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px; font-size: 15px; font-weight: 500;
    color: var(--ink); border-bottom: 1px solid var(--border-light);
    text-decoration: none; cursor: pointer; transition: background var(--transition);
  }
  .mobile-nav-link:hover { background: var(--surface); }
  .mnl-icon { font-size: 18px; width: 24px; text-align: center; }

  /* Footer del menú */
  .mobile-menu-footer {
    display: flex; gap: 10px; padding: 16px 20px; flex-shrink: 0;
    border-top: 1px solid var(--border-light);
  }
  .mmf-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 13px; border: none; border-radius: 50px;
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all var(--transition);
  }
  .mmf-cart { background: var(--accent); color: white; }
  .mmf-cart:hover { background: var(--accent-hover); }
  .mmf-wish { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
  .mmf-wish:hover { background: var(--border); }

  /* ── MOBILE FILTER BAR ── */
  .mob-filter-bar { display: none; } /* solo visible en mobile, ver @media abajo */

  /* ── MOBILE FILTERS DRAWER ── */
  .mob-filters-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(26,24,20,0.55); z-index: 490;
    backdrop-filter: blur(2px);
  }
  .mob-filters-backdrop.open { display: block; }

  .mob-filters-drawer {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--warm-white);
    border-radius: 20px 20px 0 0;
    z-index: 495;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: 0 -8px 32px rgba(26,24,20,0.12);
  }
  .mob-filters-drawer.open { transform: translateY(0); }

  .mfd-handle {
    width: 36px; height: 4px; background: var(--border);
    border-radius: 2px; margin: 12px auto 0; flex-shrink: 0;
  }
  .mfd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 14px; border-bottom: 1px solid var(--border-light); flex-shrink: 0;
  }
  .mfd-header span { font-size: 17px; font-weight: 700; color: var(--ink); }
  .mfd-close {
    background: none; border: none; cursor: pointer;
    color: var(--ink-muted); padding: 4px;
    display: flex; align-items: center;
  }
  .mfd-body { flex: 1; overflow-y: auto; padding: 20px; }
  .mfd-section { margin-bottom: 28px; }
  .mfd-section-title {
    font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-light); margin-bottom: 14px;
  }
  .mfd-footer {
    display: flex; gap: 10px; padding: 16px 20px;
    border-top: 1px solid var(--border-light); flex-shrink: 0;
  }
  .mfd-btn-reset {
    flex: 1; padding: 13px; background: none;
    border: 1.5px solid var(--border); border-radius: 50px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--ink-muted); cursor: pointer;
    transition: all var(--transition);
  }
  .mfd-btn-reset:hover { border-color: var(--accent); color: var(--accent); }
  .mfd-btn-apply {
    flex: 2; padding: 13px; background: var(--accent); border: none;
    border-radius: 50px; font-family: inherit; font-size: 14px;
    font-weight: 600; color: white; cursor: pointer;
    transition: background var(--transition);
  }
  .mfd-btn-apply:hover { background: var(--accent-hover); }

  /* ── BREAKPOINTS ── */
  @media (max-width: 768px) {
    /* Topbar: simplificado en mobile */
    .topbar { font-size: 11px; padding: 6px 12px; }

    /* Header */
    .hamburger { display: flex; }
    .mobile-menu { display: flex; }
    .search-bar { display: none; }
    .header-btn span { display: none; }
    .header-inner { gap: 6px; height: 56px; }

    /* Nav horizontal → oculto, reemplazado por mob-filter-bar */
    nav { display: none; }

    /* Hero más compacto */
    .hero-inner { grid-template-columns: 1fr; padding: 28px 16px 24px; }
    .hero-cards { display: none; }
    .hero h1 { font-size: 30px; margin-bottom: 12px; }
    .hero p { font-size: 14px; margin-bottom: 20px; }
    .hero-label { font-size: 10px; margin-bottom: 14px; }
    .btn-primary, .btn-ghost { padding: 11px 22px; font-size: 13px; }

    /* Promo strip: solo 2 items */
    .promo-inner { gap: 16px; }
    .promo-item { font-size: 12px; }
    .promo-item:nth-child(3),
    .promo-item:nth-child(4) { display: none; }

    /* Mobile filter bar */
    .mob-filter-bar {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px;
      background: var(--warm-white);
      border-bottom: 1px solid var(--border);
      position: sticky; top: 56px; z-index: 50;
      overflow: hidden;
    }
    .mob-filter-trigger {
      flex-shrink: 0; display: flex; align-items: center; gap: 6px;
      padding: 8px 14px; background: var(--ink); color: white;
      border: none; border-radius: 50px; font-family: inherit;
      font-size: 13px; font-weight: 600; cursor: pointer;
      white-space: nowrap; transition: background var(--transition);
    }
    .mob-filter-trigger:hover { background: #2C2820; }
    .mob-filter-badge {
      background: var(--accent); color: white;
      font-size: 10px; font-weight: 700;
      border-radius: 50%; width: 18px; height: 18px;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .mob-cat-pills {
      display: flex; gap: 8px; overflow-x: auto;
      scrollbar-width: none; flex: 1;
    }
    .mob-cat-pills::-webkit-scrollbar { display: none; }
    .mob-cat-pill {
      flex-shrink: 0; padding: 7px 14px;
      background: var(--surface); border: 1.5px solid transparent;
      border-radius: 50px; font-family: inherit;
      font-size: 13px; font-weight: 500; color: var(--ink-muted);
      cursor: pointer; white-space: nowrap;
      transition: all var(--transition);
    }
    .mob-cat-pill.active {
      background: var(--accent-light); border-color: var(--accent);
      color: var(--accent); font-weight: 600;
    }

    /* Main layout */
    .main-layout { grid-template-columns: 1fr; padding: 16px 12px; }
    .sidebar { display: none; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    .cart-drawer { width: 100%; }
  }

  @media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .hero-inner { grid-template-columns: 1fr; padding: 40px 20px; }
    .hero-cards { display: none; }
    .hero h1 { font-size: 36px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .cart-drawer { width: 100%; }
  }
  @media (max-width: 600px) {
    .footer-inner { grid-template-columns: 1fr; }
  }
