/* ==========================================================================
   Patio – cabecera «Buscador con zonas»
   ========================================================================== */
.pt-header { position: sticky; top: 0; z-index: 1000; background: rgba(251, 247, 241, .97); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid #EADFD0; transition: box-shadow .3s ease; }
.admin-bar .pt-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pt-header { top: 0; } }
.pt-header.is-scrolled, .pt-header.is-compact { box-shadow: 0 10px 30px rgba(58, 42, 32, .1); }

.pt-header__main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(14px, 2.4vw, 34px); align-items: center; padding-top: 14px; padding-bottom: 12px; transition: padding .3s ease; }
.pt-header.is-compact .pt-header__main { padding-top: 8px; padding-bottom: 8px; }

/* Marca */
.pt-brand { display: flex; flex-direction: column; min-width: 0; }
.pt-brand__name { font: 400 clamp(26px, 2.4vw, 32px)/1 var(--fr-display); color: var(--pt-ink) !important; text-decoration: none; letter-spacing: -.01em; }
.pt-brand img { max-height: 52px; width: auto; display: block; }
.pt-brand__tag { margin-top: 4px; font-size: 12.5px; color: #7A6A5E; white-space: nowrap; }
.pt-header.is-compact .pt-brand__tag { display: none; }

/* Buscador */
.pt-search { position: relative; display: flex; align-items: center; max-width: 720px; width: 100%; justify-self: center; background: #fff; border: 2px solid var(--pt-ink); border-radius: 999px; padding: 5px 5px 5px 46px; transition: box-shadow .2s ease, border-color .2s ease; }
.pt-search:focus-within { box-shadow: 0 0 0 5px rgba(196, 98, 58, .22); border-color: var(--pt-terra); }
.pt-search__icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #7A6A5E; display: flex; }
.pt-search__input { flex: 1 1 auto; min-width: 0; border: 0 !important; outline: none !important; background: transparent !important; box-shadow: none !important; padding: 9px 8px !important; font: 500 16px/1.2 var(--fr-font) !important; color: var(--pt-ink); }
.pt-search__input::placeholder { color: #9A8A7E; }
.pt-search__go { flex: none; border: 0; cursor: pointer; padding: 11px 22px; border-radius: 999px; background: var(--pt-terra); color: #fff; font: 700 15px/1 var(--fr-font); transition: background .2s ease, transform .25s var(--ms-ease, ease); }
.pt-search__go:hover { background: var(--pt-ink); transform: translateY(-1px); }

/* Accesos */
.pt-tools { display: flex; align-items: center; gap: 4px; }
.pt-tool { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 8px; border-radius: 16px; color: var(--pt-ink) !important; text-decoration: none; font-size: 12.5px; font-weight: 600; transition: background .2s ease, transform .25s var(--ms-ease, ease); }
.pt-tool:hover { background: #F4EBDD; transform: translateY(-2px); }
.pt-tool--cart { color: var(--pt-terra-dark) !important; }
.pt-tool__n { position: absolute; top: 0; right: 10px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--pt-terra); color: #fff; font: 700 11px/19px var(--fr-font); text-align: center; }
.pt-tool--cart .pt-tool__n { background: var(--pt-ink); }
.pt-tool__n[hidden] { display: none; }
.pt-secure { display: none; }

/* Zonas + menú */
.pt-header__bar { border-top: 1px solid #EADFD0; }
.pt-header__barin { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 8px; padding-bottom: 8px; }
.pt-zchips { list-style: none; margin: 0; padding: 2px 0; display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pt-zchips::-webkit-scrollbar { display: none; }
.pt-zchip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; color: var(--pt-ink) !important; text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 14px; transition: background .2s ease, transform .25s var(--ms-ease, ease); }
.pt-zchip__n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--z-bg); color: var(--z-ink); font: 700 14px/1 var(--fr-font); transition: transform .3s var(--ms-ease, ease); }
.pt-zchip:hover { background: #F4EBDD; }
.pt-zchip:hover .pt-zchip__n { transform: rotate(-10deg) scale(1.08); }
.pt-zchip.is-on { background: #fff; box-shadow: inset 0 0 0 2px var(--z-bg); }
.pt-header.is-compact .pt-header__barin { padding-top: 4px; padding-bottom: 4px; }
.pt-header.is-compact .pt-zchip__n { width: 26px; height: 26px; font-size: 12px; }

.pt-hnav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.pt-hnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: #6E5E52 !important; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .2s ease, background .2s ease; }
.pt-hnav a:hover { color: var(--pt-ink) !important; background: #F4EBDD; }
.pt-hnav__sale a { color: var(--pt-terra-dark) !important; }

.pt-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: #F4EBDD; cursor: pointer; position: relative; }
.pt-burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--pt-ink); transition: transform .3s ease, opacity .2s ease; }
.pt-burger span:nth-child(1) { top: 15px; } .pt-burger span:nth-child(2) { top: 21px; } .pt-burger span:nth-child(3) { top: 27px; }
.pt-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.pt-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pt-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hasta 1280 px: el menú de texto pasa al botón; las zonas ocupan toda la barra */
@media (max-width: 1280px) {
  .pt-header__main { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .pt-burger { display: block; }
  .pt-hnav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: #FBF7F1; border-bottom: 1px solid #EADFD0; box-shadow: 0 18px 30px rgba(58, 42, 32, .14); padding: 8px max(16px, calc((100vw - 1280px) / 2)) 16px; }
  .pt-hnav.is-open { display: block; animation: pt-drop .3s ease both; }
  .pt-hnav ul { flex-direction: column; align-items: stretch; max-width: 520px; }
  .pt-hnav a { padding: 13px 12px; font-size: 17px; color: var(--pt-ink) !important; }
  .pt-zchips { flex: 1 1 auto; justify-content: space-between; }
}
@keyframes pt-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
/* Tableta */
@media (max-width: 1100px) {
  .pt-tool { min-width: 52px; }
  .pt-tool--fav .pt-tool__l, .pt-tool--account .pt-tool__l { display: none; }
  .pt-zchip { font-size: 13.5px; gap: 6px; padding-right: 8px; }
  .pt-zchip__n { width: 28px; height: 28px; font-size: 13px; }
}

/* Móvil */
@media (max-width: 900px) {
  .pt-header__main { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "burger brand tools" "search search search"; row-gap: 10px; padding-top: 10px; }
  .pt-burger { display: block; grid-area: burger; }
  .pt-brand { grid-area: brand; }
  .pt-brand__tag { display: none; }
  .pt-search { grid-area: search; max-width: none; padding-left: 42px; }
  .pt-search__go { padding: 10px 16px; }
  .pt-tools { grid-area: tools; }
  .pt-tool { min-width: 0; padding: 6px; }
  .pt-tool__l { display: none; }
  .pt-tool--fav { display: none; }
  .pt-tool__n { right: -2px; }
  .pt-header.is-compact .pt-search { display: none; }
  .pt-header__barin { padding-top: 6px; padding-bottom: 8px; }
  .pt-zchip { flex-direction: column; gap: 4px; padding: 2px 4px; font-size: 11.5px; background: none !important; box-shadow: none !important; }
  .pt-zchip__n { width: 40px; height: 40px; font-size: 15px; }
  .pt-zchip.is-on .pt-zchip__n { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--z-bg); }
  .pt-hnav { padding: 8px 16px 16px; }
  .pt-zchips { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-hnav.is-open { animation: none; }
}
