@import url('https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=Manrope:wght@400;600;700;800;900&display=swap');

:root{
  --hpm-ink:#09090d;
  --hpm-red-lacquer:#d42012;
  --hpm-gold:#ffd166;
  --hpm-bg:#0b0b0f;
  --hpm-card:#141420;
  --hpm-card2:#19192a;
  --hpm-text:#f4f4f7;
  --hpm-muted:#a7a7b6;
  --hpm-accent:#ff4d2e;
  --hpm-accent2:#ffd166;
  --hpm-line:rgba(255,255,255,.08);
  --hpm-shadow:0 18px 60px rgba(0,0,0,.45);
  --hpm-ease:cubic-bezier(.2,.8,.2,1);
}

.hpm-app{color:var(--hpm-text);background:radial-gradient(900px 520px at 10% 0%, rgba(255,77,46,.18), transparent 60%), radial-gradient(900px 520px at 90% 0%, rgba(255,209,102,.14), transparent 60%), var(--hpm-bg); border-radius:18px; overflow:hidden; position:relative; font-family:Manrope, system-ui, -apple-system, Segoe UI, Arial, sans-serif}
.hpm-app.is-overlay{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  border-radius:0;
  z-index:999999;
}
.hpm-app.is-overlay .hpm-shell{min-height:100vh;height:100vh}
.hpm-app.is-overlay .hpm-content{min-height:0;height:100%}
.hpm-app.is-overlay .hpm-content{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
.hpm-app.is-overlay .hpm-aside{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
.hpm-app::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.075;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,209,102,.55), transparent 60%),
    radial-gradient(1px 1px at 80% 40%, rgba(255,77,46,.55), transparent 60%),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.28), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='rgba(255,209,102,.25)' stroke-width='1.25'%3E%3Cpath d='M20 70c35-35 75-35 110 0'/%3E%3Cpath d='M90 70c35-35 75-35 110 0'/%3E%3Cpath d='M20 110c35-35 75-35 110 0'/%3E%3Cpath d='M90 110c35-35 75-35 110 0'/%3E%3Cpath d='M20 150c35-35 75-35 110 0'/%3E%3Cpath d='M90 150c35-35 75-35 110 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size:auto, auto, auto, 220px 220px;
  background-repeat:repeat;
  mix-blend-mode:screen;
}
.hpm-shell{min-height:70vh; display:flex; flex-direction:column}

/* View-only mode */
.hpm-app.is-view-only .hpm-qty{display:none !important}
.hpm-app.is-view-only [data-hpm-order-card]{display:none !important}
.hpm-app.is-view-only .hpm-cartbar{display:none !important}
.hpm-app.is-view-only .hpm-drawer{display:none !important}

.hpm-topbar{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px;
  align-items:center;
  padding:16px 14px;
  border-bottom:1px solid var(--hpm-line);
  background:linear-gradient(180deg, rgba(255,255,255,.06), transparent);
}
.hpm-topbar-block{
  display:flex;
  align-items:center;
  min-width:0;
}
.hpm-topbar-left{justify-content:flex-start}
.hpm-topbar-center{justify-content:center}
.hpm-topbar-right{justify-content:flex-end}
.hpm-title{font-size:18px;font-weight:800;letter-spacing:.2px; font-family:"ZCOOL XiaoWei", serif}
.hpm-subtitle{font-size:12px;color:var(--hpm-muted);margin-top:2px;margin-bottom:10px}
.hpm-logo{display:block;height:56px;max-width:260px;width:auto;object-fit:contain;filter:drop-shadow(0 10px 24px rgba(0,0,0,.3)) drop-shadow(0 0 16px rgba(255,224,168,.28))}
.hpm-logo-right{margin-left:auto}
.hpm-center-logo{
  display:block;
  height:46px;
  max-width:152px;
  width:auto;
  object-fit:contain;
  filter:
    drop-shadow(0 8px 18px rgba(0,0,0,.28))
    drop-shadow(0 0 14px rgba(255,130,98,.46))
    drop-shadow(0 0 26px rgba(255,228,176,.44));
  transition:filter 180ms var(--hpm-ease), transform 180ms var(--hpm-ease);
}
.hpm-topbar-center:hover .hpm-center-logo{
  filter:
    drop-shadow(0 10px 22px rgba(0,0,0,.3))
    drop-shadow(0 0 18px rgba(255,130,98,.56))
    drop-shadow(0 0 32px rgba(255,233,190,.5));
  transform:translateY(-1px);
}

@media (max-width: 420px){
  .hpm-topbar{grid-template-columns:repeat(3, minmax(0,1fr));gap:8px}
  .hpm-title{font-size:16px}
  .hpm-center-logo{height:38px;max-width:120px}
  .hpm-logo{height:38px;max-width:120px}
}
.hpm-top-total{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.hpm-top-total-label{font-size:11px;color:var(--hpm-muted);font-weight:800}
.hpm-top-total-sum{font-size:16px;font-weight:1000}
.hpm-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hpm-label{display:block;font-size:11px;color:var(--hpm-muted);margin-bottom:6px}
.hpm-select,.hpm-input,.hpm-textarea{
  width:100%;
  background:rgba(255,255,255,.06);
  border:1px solid var(--hpm-line);
  color:var(--hpm-text);
  border-radius:12px;
  padding:12px 12px; /* выше по высоте */
  outline:none;
  font-size:16px;
  transition:border-color 160ms var(--hpm-ease), box-shadow 160ms var(--hpm-ease), background 160ms var(--hpm-ease);
}
.hpm-cats .hpm-select{
  font-size:16px;
  line-height:1.2;
  padding:14px 12px; /* ещё шире/выше именно у категорий */
  border-color:rgba(255,209,102,.22);
  box-shadow:0 0 0 1px rgba(255,77,46,.10) inset, 0 0 22px rgba(255,77,46,.10);
}
.hpm-cats .hpm-select:focus{
  border-color:rgba(255,209,102,.38);
  box-shadow:0 0 0 1px rgba(255,209,102,.18) inset, 0 0 28px rgba(255,209,102,.18), 0 0 0 4px rgba(255,77,46,.10);
}
.hpm-select{color-scheme:dark}
.hpm-select option{background:var(--hpm-card2);color:var(--hpm-text)}
.hpm-input{min-width:180px}
.hpm-textarea{min-height:84px;resize:vertical}
.hpm-toggle{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--hpm-text);user-select:none}
.hpm-toggle input{width:18px;height:18px}

.hpm-tabs{display:flex;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--hpm-line);position:relative}
.hpm-tab{
  background:transparent;
  border:1px solid var(--hpm-line);
  color:var(--hpm-muted);
  border-radius:999px;
  padding:10px 12px;
  font-weight:700;
  font-size:13px;
  transition:border-color 160ms var(--hpm-ease), box-shadow 160ms var(--hpm-ease), background 160ms var(--hpm-ease), transform 160ms var(--hpm-ease);
}
.hpm-tab:hover{border-color:rgba(255,255,255,.16); transform:translateY(-1px)}
.hpm-tab.is-active{
  color:var(--hpm-text);
  border-color:rgba(255,209,102,.26);
  background:rgba(255,255,255,.06);
  box-shadow:0 0 0 1px rgba(255,77,46,.10) inset, 0 0 26px rgba(255,77,46,.12);
}

/* search icon + popup */
.hpm-search-btn{
  margin-left:auto;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:transparent;
  border:0;
  color:var(--hpm-text);
  cursor:pointer;
  font-size:22px;
  transition:box-shadow 160ms var(--hpm-ease), background 160ms var(--hpm-ease), transform 160ms var(--hpm-ease), filter 160ms var(--hpm-ease);
  box-shadow:none;
}
.hpm-search-btn span{font-size:22px; line-height:1}
.hpm-search-btn:hover{transform:translateY(-1px);background:rgba(255,255,255,.05);box-shadow:0 0 0 4px rgba(255,77,46,.08), 0 0 26px rgba(255,209,102,.16)}
.hpm-search-btn.is-active{
  background:rgba(255,255,255,.07);
  box-shadow:0 0 0 4px rgba(255,77,46,.12), 0 0 34px rgba(255,77,46,.18), 0 0 42px rgba(255,209,102,.10);
}
.hpm-search-pop{
  position:absolute;
  right:12px;
  top:calc(100% + 10px);
  width:min(420px, calc(100% - 24px));
  max-width:calc(100% - 24px);
  box-sizing:border-box;
  display:none;
  z-index:30;
  padding:10px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.10);
  box-shadow:var(--hpm-shadow);
  backdrop-filter:blur(10px);
}
.hpm-search-pop.is-open{display:block}
.hpm-search-pop .hpm-input{min-width:0}
.hpm-search-pop .hpm-search-input{padding-right:46px}
.hpm-search-close{
  position:absolute;
  right:10px;
  top:50%;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(11,11,15,.35);
  color:var(--hpm-text);
  cursor:pointer;
  font-size:24px;
  line-height:30px;
  display:grid;
  place-items:center;
  transform:translateY(-50%);
}
.hpm-search-close:hover{
  border-color:rgba(255,255,255,.22);
  transform:translateY(calc(-50% - 1px));
}

.hpm-content{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:0;
  min-height:0;
  flex:1;
  position:relative;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
/* Важно: dropdown категорий должен перекрывать соседнюю колонку */
.hpm-cats{
  border-right:1px solid var(--hpm-line);
  padding:12px;
  overflow:visible;
  position:relative;
  z-index:5;
  width:260px;
  flex:0 0 260px;
  min-width:260px;
  max-width:260px;
}
.hpm-list{padding:12px;overflow:visible;position:relative;z-index:1}
.hpm-loading{padding:14px;border:1px dashed var(--hpm-line);border-radius:16px;color:var(--hpm-muted)}
.hpm-aside{display:none;border-left:1px solid var(--hpm-line);padding:12px;overflow:auto}
.hpm-aside-card{position:sticky;bottom:12px;border:1px solid var(--hpm-line);border-radius:18px;padding:14px;background:linear-gradient(180deg, rgba(255,255,255,.05), transparent 70%), rgba(255,255,255,.02)}
.hpm-aside-title{font-weight:1000}
.hpm-aside-meta{margin-top:6px;color:var(--hpm-muted);font-size:12px}
.hpm-aside-open{width:100%;margin-top:12px}
.hpm-section-title{font-weight:1000;margin:4px 2px 10px;color:var(--hpm-text); position:relative; display:inline-block}
.hpm-section-title::after{
  content:"";
  display:block;
  height:6px;
  margin-top:6px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,77,46,.0), rgba(255,77,46,.75), rgba(255,209,102,.65), rgba(255,209,102,.0));
  filter:blur(.15px);
  transform:skewX(-18deg);
  opacity:.7;
}

.hpm-cat{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:auto;
  flex:0 0 auto;
  text-align:left;
  background:transparent;
  border:1px solid rgba(255,255,255,.12);
  color:var(--hpm-text);
  padding:10px 10px;
  border-radius:14px;
  font-size:16px;
}
.hpm-cat:hover{background:rgba(255,255,255,.05)}
.hpm-cat.is-active{background:rgba(255,77,46,.14);border-color:rgba(255,77,46,.25)}
.hpm-pill{font-size:11px;color:var(--hpm-muted);border:1px solid var(--hpm-line);border-radius:999px;padding:2px 8px}

.hpm-catlist{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:6px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  max-height:none;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none; /* Firefox */
  scrollbar-color: transparent transparent; /* иногда помогает при оставшемся треке */
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-x;
  padding-right:6px;
}

.hpm-catlist::-webkit-scrollbar{
  height:0;
  width:0;
  background:transparent;
}
.hpm-catlist::-webkit-scrollbar-thumb{
  background:transparent;
}
.hpm-catlist::-webkit-scrollbar-track{
  background:transparent;
}

/* custom categories dropdown (scrollable) */
.hpm-catdd{position:relative}
.hpm-catdd-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 12px;
  border-radius:12px;
  border:1px solid rgba(255,209,102,.22);
  background:rgba(255,255,255,.06);
  color:var(--hpm-text);
  font-weight:800;
  cursor:pointer;
  box-shadow:0 0 0 1px rgba(255,77,46,.10) inset, 0 0 22px rgba(255,77,46,.10);
  transition:border-color 160ms var(--hpm-ease), box-shadow 160ms var(--hpm-ease), transform 160ms var(--hpm-ease);
}
.hpm-catdd-btn:hover{transform:translateY(-1px); border-color:rgba(255,209,102,.32)}
.hpm-catdd-btn:active{transform:translateY(0) scale(.99)}
.hpm-catdd-caret{opacity:.75}
.hpm-catdd-panel{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  z-index:999;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(25,25,42,.88), rgba(20,20,32,.96));
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  max-height:min(52vh, 420px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
  padding:8px;
  display:none;
}
.hpm-catdd.is-open .hpm-catdd-panel{display:block}
.hpm-catopt{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--hpm-text);
  cursor:pointer;
  text-align:left;
}
.hpm-catopt:hover{background:rgba(255,255,255,.06)}
.hpm-catopt.is-active{background:rgba(255,77,46,.12); border-color:rgba(255,77,46,.22)}

.hpm-tip{
  position:absolute;
  left:12px;
  top:10px;
  z-index:5;
  max-width:240px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,209,102,.30);
  background:linear-gradient(180deg, rgba(255,209,102,.16), rgba(25,25,42,.92));
  box-shadow:0 18px 60px rgba(0,0,0,.40);
  color:var(--hpm-text);
  font-weight:800;
  font-size:13px;
  letter-spacing:.1px;
  backdrop-filter:blur(10px);
  transform-origin:20px 0;
  animation:hpmTipIn 220ms var(--hpm-ease);
}
.hpm-tip::after{
  content:"";
  position:absolute;
  left:18px;
  top:100%;
  width:0;
  height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-top:10px solid rgba(255,209,102,.18);
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
.hpm-tip .hpm-tip-sub{display:block;margin-top:4px;color:rgba(244,244,247,.78);font-weight:700;font-size:12px}
@keyframes hpmTipIn{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

.hpm-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:10px}
.hpm-card{background:linear-gradient(180deg, rgba(255,255,255,.06), transparent 65%), var(--hpm-card);border:1px solid var(--hpm-line);border-radius:18px;overflow:hidden;box-shadow:0 12px 28px rgba(0,0,0,.25); transition:transform 160ms var(--hpm-ease), border-color 160ms var(--hpm-ease), box-shadow 160ms var(--hpm-ease);display:flex;flex-direction:column;height:100%}
.hpm-card:hover{transform:translateY(-2px); border-color:rgba(255,255,255,.14); box-shadow:0 18px 48px rgba(0,0,0,.35)}
.hpm-card-top{display:flex;gap:12px;padding:12px;flex:1 1 auto;min-height:0}
.hpm-img{width:82px;height:82px;border-radius:14px;background:rgba(255,255,255,.06);flex:0 0 auto;overflow:hidden}
.hpm-img img{width:100%;height:100%;object-fit:cover;display:block}
.hpm-card-title{font-weight:900;line-height:1.12; letter-spacing:.15px}
.hpm-card-sub{color:var(--hpm-muted);font-size:12px;margin-top:4px}
.hpm-card-price{font-weight:400;font-size:14px;letter-spacing:.1px}
.hpm-card-foot-left{display:flex;align-items:center;gap:10px;min-width:0}
.hpm-card-foot-right{display:flex;align-items:center;gap:10px}
.hpm-foot-chips{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.hpm-badge-glow{
  box-shadow:
    0 10px 26px rgba(212,32,18,.14),
    0 0 0 1px rgba(212,32,18,.18) inset,
    0 0 22px rgba(212,32,18,.18);
}
.hpm-card-foot{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:12px;border-top:1px solid var(--hpm-line);background:rgba(255,255,255,.03);margin-top:auto}

.hpm-badge{
  display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:1000;letter-spacing:.3px;
  padding:6px 10px;border-radius:10px;
  border:1px solid rgba(212,32,18,.55);
  background:linear-gradient(180deg, rgba(212,32,18,.32), rgba(212,32,18,.16));
  color:var(--hpm-text);
  box-shadow:0 10px 26px rgba(212,32,18,.12);
  position:relative;
  text-transform:uppercase;
}
.hpm-badge::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.12;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='56' viewBox='0 0 160 56'%3E%3Cg fill='none' stroke='rgba(255,255,255,.9)' stroke-width='1'%3E%3Cpath d='M5 20c12 10 22 10 34 0s22-10 34 0 22 10 34 0 22-10 34 0'/%3E%3Cpath d='M5 36c12 10 22 10 34 0s22-10 34 0 22 10 34 0 22-10 34 0 22 10 34 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size:160px 56px;
  background-repeat:repeat;
  mix-blend-mode:overlay;
}

.hpm-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--hpm-muted);
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.hpm-chip.is-hot{border-color:rgba(255,77,46,.25); color:rgba(255,209,102,.92); background:rgba(255,77,46,.08)}

.hpm-chip.is-hot{cursor:pointer}

.hpm-spicy-tip{
  position:fixed;
  z-index:50000;
  background:linear-gradient(180deg, rgba(25,25,42,.92), rgba(11,11,15,.96));
  border:1px solid rgba(255,209,102,.22);
  color:var(--hpm-text);
  padding:10px 12px;
  border-radius:14px;
  font-weight:500;
  font-size:13px;
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  max-width:220px;
  text-align:left;
  user-select:none;
}

.hpm-qty{display:flex;align-items:center;gap:10px}
.hpm-qty button{width:30px;height:30px;border-radius:11px;border:1px solid var(--hpm-line);background:rgba(255,255,255,.06);color:var(--hpm-text);font-size:17px;font-weight:900; transition:transform 120ms var(--hpm-ease), border-color 120ms var(--hpm-ease), background 120ms var(--hpm-ease)}
.hpm-qty button:hover{border-color:rgba(255,255,255,.18); transform:translateY(-1px)}
.hpm-qty button:active{transform:translateY(0) scale(.98)}
.hpm-qty .hpm-qtyval{min-width:40px;text-align:center;font-weight:900}
.hpm-small{font-size:11px;color:var(--hpm-muted)}

.hpm-btn{border-radius:14px;border:1px solid var(--hpm-line);background:rgba(255,255,255,.06);color:var(--hpm-text);padding:12px 14px;font-weight:900; position:relative; overflow:hidden; transition:transform 140ms var(--hpm-ease), border-color 140ms var(--hpm-ease), background 140ms var(--hpm-ease)}
.hpm-btn:hover{border-color:rgba(255,255,255,.16); transform:translateY(-1px)}
.hpm-btn:active{transform:translateY(0) scale(.99)}
.hpm-btn-primary{background:linear-gradient(180deg, rgba(255,77,46,.92), rgba(212,32,18,.72));border-color:rgba(255,77,46,.45)}
.hpm-btn-primary::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background:linear-gradient(120deg, rgba(255,255,255,0), rgba(255,255,255,.22), rgba(255,255,255,0));
  transform:translateX(-60%) rotate(12deg);
  transition:transform 420ms var(--hpm-ease);
  pointer-events:none;
}
.hpm-btn-primary:hover::before{transform:translateX(60%) rotate(12deg)}
.hpm-btn-primary:disabled{opacity:.55}

.hpm-list{padding-bottom:110px}

.hpm-to-top{
  position:fixed;
  right:14px;
  bottom:calc(12px + env(safe-area-inset-bottom) + 86px);
  z-index:10000;
  width:44px;
  height:44px;
  border-radius:16px;
  border:1px solid var(--hpm-line);
  background:rgba(11,11,15,.72);
  backdrop-filter:blur(10px);
  color:var(--hpm-text);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transform:translateY(6px);
  transition:opacity 160ms var(--hpm-ease), transform 160ms var(--hpm-ease), border-color 160ms var(--hpm-ease);
}

.hpm-to-top.is-visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.hpm-to-top:hover{
  border-color:rgba(255,209,102,.30);
}

.hpm-to-top span{
  font-size:22px;
  line-height:1;
}

.hpm-footer-signature{
  margin-top:12px;
  padding:10px 0 6px;
  text-align:center;
  color:var(--hpm-muted);
  font-size:11px;
  line-height:1.2;
}
.hpm-footer-signature a{
  color:#FBBA00;
  text-decoration:underline;
  text-underline-offset:2px;
}
.hpm-footer-signature a:hover{
  filter:brightness(1.08);
}

.hpm-cartbar{
  position:fixed;
  left:12px;
  right:12px;
  bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid var(--hpm-line);
  border-radius:18px;
  background:rgba(11,11,15,.86);
  backdrop-filter:blur(10px);
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  max-width:980px;
  margin:0 auto;
}
.hpm-cartbar.has-items{
  border-color:rgba(255,77,46,.22);
  box-shadow:0 18px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,77,46,.12) inset, 0 0 26px rgba(255,77,46,.12);
}
.hpm-cart-count.is-pop, .hpm-cart-sum.is-pop{animation:hpmPop 220ms var(--hpm-ease)}
@keyframes hpmPop{0%{transform:scale(1)}50%{transform:scale(1.09)}100%{transform:scale(1)}}
.hpm-cartbar-title{font-weight:900}
.hpm-cartbar-meta{font-size:12px;color:var(--hpm-muted)}

.hpm-drawer{position:fixed;inset:0;display:none;z-index:20000}
.hpm-drawer.is-open{display:block}
.hpm-drawer-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45);z-index:0}
.hpm-drawer-sheet{position:absolute;left:0;right:0;bottom:0;max-height:86vh;border-top-left-radius:22px;border-top-right-radius:22px;background:var(--hpm-card2);border:1px solid var(--hpm-line);box-shadow:var(--hpm-shadow);display:flex;flex-direction:column;z-index:1}
.hpm-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:14px;border-bottom:1px solid var(--hpm-line)}
.hpm-drawer-title{font-weight:1000}
.hpm-x{border:none;background:transparent;color:var(--hpm-muted);font-size:28px;line-height:1}
.hpm-drawer-body{padding:12px;overflow:auto}
.hpm-drawer-foot{padding:12px;border-top:1px solid var(--hpm-line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.hpm-total-label{font-size:12px;color:var(--hpm-muted)}
.hpm-total-sum{font-weight:1000;font-size:18px}

.hpm-cart-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--hpm-line);border-radius:16px;background:rgba(255,255,255,.04);margin-bottom:8px}
.hpm-cart-row-title{font-weight:800}
.hpm-cart-row-sub{font-size:12px;color:var(--hpm-muted);margin-top:2px}

.hpm-modal{position:fixed;inset:0;display:none;z-index:20000}
.hpm-modal.is-open{display:block}
.hpm-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);z-index:0}
.hpm-modal-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(980px, calc(100vw - 24px));max-height:min(86vh, 720px);background:var(--hpm-card2);border:1px solid var(--hpm-line);border-radius:20px;box-shadow:var(--hpm-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:1}
.hpm-modal.is-open .hpm-modal-card{
  box-shadow:var(--hpm-shadow), 0 0 0 1px rgba(255,92,61,.14), 0 0 46px 18px rgba(255,176,102,.16);
  animation:hpmModalEnterGlow 420ms var(--hpm-ease), hpmModalHaloIn 680ms ease-out 120ms both;
}
@keyframes hpmModalEnterGlow{
  0%{
    opacity:.92;
    transform:translate(-50%,-50%) scale(.975);
  }
  100%{
    opacity:1;
    transform:translate(-50%,-50%) scale(1);
  }
}
@keyframes hpmModalHaloIn{
  0%{
    box-shadow:var(--hpm-shadow), 0 0 0 0 rgba(255,92,61,.55), 0 0 0 0 rgba(255,176,102,.42);
  }
  100%{
    box-shadow:var(--hpm-shadow), 0 0 0 6px rgba(255,92,61,.10), 0 0 50px 20px rgba(255,176,102,.18);
  }
}
@media (prefers-reduced-motion: reduce){
  .hpm-modal.is-open .hpm-modal-card{animation:none}
}
.hpm-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border-bottom:1px solid var(--hpm-line)}
.hpm-modal-title{font-weight:1000}
.hpm-modal-body{padding:12px;overflow:auto;display:grid;grid-template-columns:280px 1fr;gap:12px}
.hpm-modal-media{width:100%;aspect-ratio:1/1;border-radius:16px;background:rgba(255,255,255,.06);overflow:hidden;border:1px solid rgba(255,255,255,.10); box-shadow:0 18px 60px rgba(0,0,0,.35)}
.hpm-modal-media img{width:100%;height:100%;object-fit:cover;display:block}

/* gallery */
.hpm-gal{position:relative;width:100%;height:100%;touch-action:none}
.hpm-gal-track{height:100%;display:flex;transition:transform 240ms var(--hpm-ease);transform:translateX(calc(var(--hpm-gal-i) * -100%))}
.hpm-gal-slide{flex:0 0 100%;height:100%}
.hpm-gal-slide img{width:100%;height:100%;object-fit:cover;display:block;user-select:none;-webkit-user-drag:none;pointer-events:none}
.hpm-gal-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(11,11,15,.55);
  color:var(--hpm-text);
  font-weight:900;
  font-size:22px;
  line-height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.hpm-gal-nav.is-prev{left:10px}
.hpm-gal-nav.is-next{right:10px}
.hpm-gal-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px}
.hpm-gal-dot{width:8px;height:8px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.12)}
.hpm-gal-dot.is-active{background:rgba(255,209,102,.82);border-color:rgba(255,209,102,.65)}

@media (max-width: 599px){
  .hpm-gal-nav{
    width:34px;
    height:34px;
    font-size:20px;
    line-height:30px;
    background:rgba(11,11,15,.42);
    opacity:.88;
  }
  .hpm-gal-nav.is-prev{left:8px}
  .hpm-gal-nav.is-next{right:8px}
}
.hpm-modal-desc{line-height:1.35;color:var(--hpm-text)}
.hpm-modal-desc .muted{color:var(--hpm-muted);font-size:13px;margin-top:6px}
.hpm-modal-foot{padding:12px;border-top:1px solid var(--hpm-line);display:flex;justify-content:flex-end; background:linear-gradient(180deg, rgba(25,25,42,.55), rgba(25,25,42,.92))}

@media (max-width: 599px){
  .hpm-modal-body{grid-template-columns:1fr}
  .hpm-modal-media{aspect-ratio:16/9}
  .hpm-modal-foot{position:sticky; bottom:0}
}

@media (max-width: 599px){
  .hpm-content{grid-template-columns:1fr}
  .hpm-cats{
    border-right:none;
    border-bottom:1px solid var(--hpm-line);
    padding:12px;
    width:100%;
    flex:1 1 auto;
    min-width:0;
    max-width:none;
  }
  .hpm-grid{grid-template-columns:1fr}
  .hpm-input{min-width:0}
}

/* планшеты в вертикальном положении: ограничиваем ширину до 800px */
@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait){
  .hpm-app:not(.is-overlay){
    width:100%;
    max-width:800px;
    margin-left:auto;
    margin-right:auto;
  }
  .hpm-cartbar{max-width:800px}
  .hpm-modal-card{width:min(800px, calc(100vw - 24px))}
}

/* планшеты: 2 колонки карточек, компактный интерфейс */
@media (min-width: 600px) and (max-width: 1024px){
  .hpm-topbar{padding:14px 12px}
  .hpm-tabs{padding:8px 10px}
  .hpm-content{grid-template-columns:1fr}
  .hpm-cats{
    border-right:none;
    border-bottom:1px solid var(--hpm-line);
    padding:10px 12px;
    width:100%;
    flex:1 1 auto;
    min-width:0;
    max-width:none;
  }
  .hpm-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .hpm-img{width:84px;height:84px}
  .hpm-list{padding:10px 10px 120px}
  .hpm-cartbar{left:10px;right:10px}
  .hpm-modal-body{grid-template-columns:1fr}
  .hpm-modal-media{aspect-ratio:16/9}
}

/* небольшие десктопы/ноутбуки: 3 колонки карточек */
@media (min-width: 1025px) and (max-width: 1366px){
  .hpm-topbar{padding:12px}
  .hpm-tabs{padding:8px 10px}
  .hpm-content{grid-template-columns:220px 1fr}
  .hpm-cats{
    width:220px;
    flex:0 0 220px;
    min-width:220px;
    max-width:220px;
    border-right:1px solid var(--hpm-line);
    border-bottom:none;
    padding:10px;
  }
  .hpm-list{padding:10px 10px 108px}
  .hpm-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}
  .hpm-img{width:74px;height:74px}
  .hpm-card-top{padding:10px}
  .hpm-card-foot{padding:10px}
  .hpm-modal-body{grid-template-columns:320px 1fr}
  .hpm-modal-card{max-height:84vh}
  .hpm-cartbar{max-width:1060px}
}

@media (min-width: 1100px){
  .hpm-shell{min-height:78vh}
  .hpm-content{grid-template-columns:260px 1fr 320px}
  .hpm-cats{
    width:260px;
    flex:0 0 260px;
    min-width:260px;
    max-width:260px;
  }
  .hpm-aside{display:block}
  .hpm-cartbar{display:none}
  .hpm-list{padding-bottom:24px}
}

/* планшет 1280x800 и похожие: больше контента по высоте, 3 колонки карточек */
@media (min-width: 1200px) and (max-width: 1399px) and (max-height: 850px){
  .hpm-shell{min-height:100vh}
  .hpm-topbar{padding:12px 14px}
  .hpm-tabs{padding:8px 10px}
  .hpm-cats{padding:10px}
  .hpm-cats{
    width:240px;
    flex:0 0 240px;
    min-width:240px;
    max-width:240px;
  }
  .hpm-list{padding:10px}

  .hpm-content{grid-template-columns:240px 1fr 300px}
  .hpm-grid{grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px}
  .hpm-card-top{padding:10px}
  .hpm-card-foot{padding:10px}
  .hpm-img{width:76px;height:76px}

  .hpm-modal-card{max-height:84vh}
  .hpm-modal-body{grid-template-columns:360px 1fr}
  .hpm-drawer-sheet{max-height:84vh}
}

/* Единый планшетный вид на ПК: сохраняем знакомую компоновку */
@media (min-width: 1025px){
  .hpm-topbar{padding:14px 12px}
  .hpm-tabs{padding:8px 10px}

  .hpm-content{grid-template-columns:1fr}
  .hpm-cats{
    border-right:none;
    border-bottom:1px solid var(--hpm-line);
    padding:10px 12px;
    width:100%;
    flex:1 1 auto;
    min-width:0;
    max-width:none;
  }

  .hpm-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .hpm-img{width:84px;height:84px}
  .hpm-list{padding:10px 10px 120px}

  .hpm-aside{display:none}
  .hpm-cartbar{display:flex;left:10px;right:10px}
  .hpm-modal-body{grid-template-columns:1fr}
  .hpm-modal-media{aspect-ratio:16/9}
}

