/* =====================================================
   HatLand — Shop: product card, shop layout, filters, toolbar
   ===================================================== */

/* ---------- Product card ---------- */
.hl-product-card {
  position: relative; background: var(--hl-surface);
  border: 1px solid var(--hl-line); border-radius: var(--hl-radius-lg);
  overflow: hidden; transition: all .3s ease; display: flex; flex-direction: column;
}
.hl-product-card:hover { box-shadow: var(--hl-shadow-lg); transform: translateY(-5px); border-color: transparent; }
.hl-product-card__imgwrap { position: relative; aspect-ratio: 1 / 1.05; background: var(--hl-bg); overflow: hidden; }
.hl-product-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .45s ease, transform .6s ease;
}
.hl-product-card__img--second { opacity: 0; transform: scale(1.06); }
.hl-product-card:hover .hl-product-card__img--second { opacity: 1; }
.hl-product-card:hover .hl-product-card__img--first { opacity: 0; }

.hl-product-card__badges { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hl-badge-sale { background: var(--hl-danger); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.hl-badge-new { background: var(--hl-ink); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.hl-badge-out { position: absolute; inset: 0; z-index: 4; background: rgba(250,246,240,.72); backdrop-filter: blur(2px); display: grid; place-items: center; }
.hl-badge-out span { background: var(--hl-ink); color: #fff; padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 800; }

.hl-product-card__quick {
  position: absolute; bottom: 0; inset-inline: 0; z-index: 5;
  transform: translateY(110%); transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.hl-product-card:hover .hl-product-card__quick { transform: translateY(0); }
.hl-product-card__quick a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(33,29,25,.88); backdrop-filter: blur(6px); color: #fff;
  font-weight: 700; font-size: 13.5px; padding: 13px; transition: background .2s;
}
.hl-product-card__quick a:hover { background: var(--hl-primary); color: #fff; }
.hl-product-card__quick .hl-icon { width: 16px; height: 16px; }

.hl-product-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hl-product-card__cat { color: var(--hl-ink-soft); font-size: 12px; font-weight: 600; }
.hl-product-card__title { font-size: 15px; font-weight: 700; line-height: 1.75; }
.hl-product-card__title a:hover { color: var(--hl-primary); }
.hl-product-card__rate { display: flex; align-items: center; gap: 4px; color: var(--hl-accent); }
.hl-product-card__rate .hl-icon { width: 14px; height: 14px; }
.hl-product-card__rate .hl-rate-count { color: var(--hl-ink-soft); font-size: 12px; margin-inline-start: 4px; }
.hl-product-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.hl-product-card__price { display: flex; flex-direction: column; gap: 2px; }
.hl-price-old { color: var(--hl-ink-soft); font-size: 12.5px; text-decoration: line-through; opacity: .75; }
.hl-price-now { color: var(--hl-ink); font-size: 16.5px; font-weight: 800; display: flex; align-items: baseline; gap: 5px; }
.hl-price-now .hl-unit { font-size: 11.5px; font-weight: 600; color: var(--hl-ink-soft); }
.hl-product-card--sale .hl-price-now { color: var(--hl-primary); }
.hl-add-cart {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--hl-primary-soft); color: var(--hl-primary);
  transition: all .25s ease; flex-shrink: 0; font-size: 13px; font-weight: 800;
}
.hl-add-cart:hover { background: var(--hl-primary); color: #fff; }
.hl-add-cart .hl-icon { width: 19px; height: 19px; }
.hl-add-cart.added { background: var(--hl-success); color: #fff; }
.hl-add-cart.loading { opacity: .6; pointer-events: none; }

/* ---------- Shop header band ---------- */
.hl-shop-head {
  background: var(--hl-surface); border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-lg); padding: 26px 30px; margin-bottom: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.hl-shop-head h1 { font-size: clamp(21px, 3vw, 28px); }
.hl-shop-head__sub { color: var(--hl-ink-soft); font-size: 13.5px; margin-top: 6px; }
.hl-shop-head__count { font-size: 13px; color: var(--hl-ink-soft); background: var(--hl-bg); padding: 8px 16px; border-radius: 999px; font-weight: 600; }

/* ---------- Toolbar ---------- */
.hl-shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.hl-shop-toolbar__left { display: flex; align-items: center; gap: 12px; }
.hl-filters-toggle { display: none; align-items: center; gap: 8px; background: var(--hl-surface); border: 1.5px solid var(--hl-line); border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 13.5px; }
.hl-filters-toggle .hl-icon { width: 17px; height: 17px; }
.hl-shop-toolbar .hl-select { width: auto; min-width: 190px; border-radius: 999px; padding: 11px 18px; font-size: 13.5px; cursor: pointer; }

/* ---------- Shop layout ---------- */
.hl-shop-layout { display: grid; grid-template-columns: 276px 1fr; gap: 26px; align-items: start; }
.hl-shop-layout > .hl-products-wrap { min-width: 0; }

/* ---------- Sidebar / filters ---------- */
.hl-filters { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--hl-header-h) + 66px); }
.hl-filter {
  background: var(--hl-surface); border: 1px solid var(--hl-line);
  border-radius: var(--hl-radius-lg); padding: 20px 22px;
}
.hl-filter__title { font-weight: 800; font-size: 14.5px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.hl-filter__list li a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; margin-inline: -10px; border-radius: var(--hl-radius-sm);
  font-size: 14px; font-weight: 500; transition: all .18s;
}
.hl-filter__list li a:hover { background: var(--hl-bg); color: var(--hl-primary); }
.hl-filter__list li.is-active > a { color: var(--hl-primary); font-weight: 700; background: var(--hl-primary-soft); margin-inline: -10px; border-radius: var(--hl-radius-sm); padding-inline: 10px; }
.hl-filter__list .hl-count { font-size: 11.5px; color: var(--hl-ink-soft); background: var(--hl-bg); padding: 2px 9px; border-radius: 999px; }
.hl-filter__list .children { margin-inline-start: 16px; border-inline-start: 1.5px dashed var(--hl-line); padding-inline-start: 8px; }
.hl-filter__list .children a { font-size: 13px; padding-block: 6px; }

.hl-filter__price { display: flex; gap: 10px; align-items: center; }
.hl-filter__price .hl-input { padding: 10px 14px; font-size: 13.5px; border-radius: var(--hl-radius-sm); }
.hl-filter__price .hl-dash { color: var(--hl-ink-soft); flex-shrink: 0; }
.hl-filter__submit { width: 100%; margin-top: 12px; }

.hl-check {
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
  cursor: pointer; user-select: none;
}
.hl-check input { width: 18px; height: 18px; accent-color: var(--hl-primary); cursor: pointer; }

.hl-filter__banner { border-radius: var(--hl-radius-lg); overflow: hidden; position: relative; min-height: 210px; display: flex; align-items: flex-end; isolation: isolate; }
.hl-filter__banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.hl-filter__banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(33,29,25,.55), transparent 60%); z-index: 0; }
.hl-filter__banner-t { position: relative; z-index: 1; color: #fff; padding: 20px; font-weight: 800; font-size: 16px; }

/* Products grid */
.hl-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hl-products-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.hl-products-grid.home-grid { grid-template-columns: repeat(4, 1fr); }

/* ---------- Mobile filters drawer ---------- */
.hl-filters-mobile-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(33,29,25,.5); opacity: 0; visibility: hidden; transition: all .3s; }
.hl-filters-mobile {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 96; max-height: 82vh; overflow-y: auto;
  background: var(--hl-surface); border-radius: 24px 24px 0 0; padding: 22px 20px 30px;
  transform: translateY(105%); transition: transform .35s cubic-bezier(.22,1,.36,1);
}
body.hl-filters-open .hl-filters-mobile-overlay { opacity: 1; visibility: visible; }
body.hl-filters-open .hl-filters-mobile { transform: none; }
body.hl-filters-open { overflow: hidden; }
.hl-filters-mobile__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.hl-filters-mobile__head h3 { font-size: 16px; }
.hl-filters-mobile .hl-filters { position: static; }

/* ---------- Empty state ---------- */
.hl-shop-empty { text-align: center; padding: 70px 20px; background: var(--hl-surface); border: 1px dashed var(--hl-line); border-radius: var(--hl-radius-lg); }
.hl-shop-empty .hl-icon { width: 52px; height: 52px; color: var(--hl-ink-soft); margin-inline: auto; margin-bottom: 16px; }
.hl-shop-empty h3 { font-size: 18px; margin-bottom: 8px; }
.hl-shop-empty p { color: var(--hl-ink-soft); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hl-products-grid.home-grid, .hl-products-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .hl-shop-layout { grid-template-columns: 1fr; }
  .hl-filters { display: none; }
  .hl-filters-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .hl-products-grid, .hl-products-grid.cols-4, .hl-products-grid.home-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hl-shop-head { padding: 20px; }
}
@media (max-width: 430px) {
  .hl-products-grid, .hl-products-grid.home-grid { gap: 12px; }
  .hl-product-card__title { font-size: 13.5px; }
  .hl-price-now { font-size: 14.5px; }
  .hl-add-cart { width: 38px; height: 38px; }
}
