:root{
  --bg:#f8edf2;
  --paper:#fffafc;
  --panel:#fdf4f7;
  --panel2:#f5e3eb;
  --line:rgba(88,28,55,.14);
  --line2:rgba(88,28,55,.24);
  --text:#351522;
  --muted:#7b5e6b;
  --muted2:#9a7d89;
  --rose:#c63c73;
  --rose2:#e56d9d;
  --wine:#6f2748;
  --deep:#4a1b33;
  --success:#258765;
  --shadow:0 24px 64px rgba(88,35,58,.13);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 0%,rgba(198,60,115,.12),transparent 31%),
    radial-gradient(circle at 100% 24%,rgba(111,39,72,.08),transparent 27%),
    linear-gradient(180deg,#fbf4f7 0%,#f7eaf0 52%,#f1e0e8 100%);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
.container{width:min(1240px,calc(100% - 40px));margin-inline:auto}

.site-header{
  position:sticky;top:0;z-index:40;
  background:rgba(255,250,252,.88);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line);
}
.header-inner{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{
  width:42px;height:42px;display:grid;place-items:center;border-radius:14px;
  background:linear-gradient(145deg,#d65c8e,#7f2a50);
  color:#fff;font:italic 700 22px Georgia,serif;
  box-shadow:0 12px 26px rgba(126,42,80,.22);
}
.brand-copy{display:grid;line-height:1}
.brand-name{font:700 26px Georgia,serif}
.brand-tagline{margin-top:5px;color:var(--muted2);font-size:9px;letter-spacing:.22em;text-transform:uppercase}
.age-badge{padding:5px 9px;border:1px solid rgba(198,60,115,.24);border-radius:999px;background:#f9e6ee;color:#9d315d;font-size:11px;font-weight:700}
.header-actions{display:flex;gap:10px}
.icon-btn{
  position:relative;width:44px;height:44px;border:1px solid var(--line);
  border-radius:14px;background:#fff8fb;color:var(--deep);font-size:19px;
  box-shadow:0 8px 20px rgba(92,31,60,.08);
}
.counter{
  position:absolute;top:-6px;right:-5px;min-width:19px;height:19px;padding:0 5px;
  display:grid;place-items:center;border:2px solid var(--paper);border-radius:999px;
  background:var(--rose);color:#fff;font-size:10px;font-weight:800;
}

.catalog-page{padding:24px 0 84px}
.hero{padding:40px 0 34px}
.hero-kicker,.section-kicker{color:var(--rose);font-size:10px;font-weight:800;letter-spacing:.25em}
.hero h1{max-width:780px;margin:16px 0 18px;font:700 clamp(44px,5.7vw,74px)/.98 Georgia,serif;letter-spacing:-.04em}
.hero h1 em{color:var(--rose);font-weight:500}
.hero p{max-width:620px;margin:0;color:var(--muted);font-size:15px;line-height:1.7}

.catalog-shell{
  padding:26px;border:1px solid var(--line);border-radius:30px;
  background:rgba(255,250,252,.88);box-shadow:var(--shadow);
}
.catalog-shell__head{
  display:grid;grid-template-columns:.62fr 1.38fr;gap:24px;align-items:end;
}
.catalog-shell__head h2{margin:8px 0 7px;font:700 34px Georgia,serif}
.catalog-shell__head p{margin:0;color:var(--muted2);font-size:13px}
.search-sort{display:grid;grid-template-columns:1fr 190px;gap:10px}
.search-field{
  min-height:50px;display:flex;align-items:center;gap:10px;padding:0 15px;
  border:1px solid var(--line);border-radius:15px;background:#fff8fb;
}
.search-field span{color:var(--rose);font-size:23px}
.search-field input{width:100%;border:0;outline:0;background:transparent;color:var(--text)}
.search-field input::placeholder{color:#a18490}
.search-sort select{
  min-height:50px;padding:0 14px;border:1px solid var(--line);
  border-radius:15px;outline:0;background:#fff8fb;color:var(--text);
}

.category-block{
  margin-top:24px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.category-block__head{
  display:flex;align-items:end;justify-content:space-between;gap:20px;
  margin-bottom:14px;
}
.category-block__head h3{margin:7px 0 0;font:700 26px Georgia,serif}
.category-block__head p{margin:0;color:var(--muted2);font-size:12px}
.category-gallery{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
}
.category-card{
  position:relative;
  min-height:78px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:#efd2de;
  color:#fff;
  text-align:left;
  box-shadow:0 9px 24px rgba(92,31,60,.07);
  transition:.2s ease;
}
.category-card:hover{transform:translateY(-2px);border-color:rgba(198,60,115,.35)}
.category-card::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(53,21,34,.02) 10%,rgba(53,21,34,.72) 100%);
}
.category-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.category-card__placeholder{
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 74% 20%,rgba(255,255,255,.35),transparent 26%),
    linear-gradient(145deg,#dfaac0,#a84d75);
}
.category-card__content{position:absolute;z-index:2;left:9px;right:9px;bottom:7px}
.category-card__title{display:block;font-size:10px;font-weight:800;line-height:1.1}
.category-card__count{display:block;margin-top:2px;color:#f7e6ed;font-size:8px}
.category-card.active{
  border-color:var(--rose);
  box-shadow:0 0 0 2px rgba(198,60,115,.12),0 12px 26px rgba(111,39,72,.13);
}

.product-grid{
  margin-top:24px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.product-card{
  min-width:0;overflow:hidden;display:flex;flex-direction:column;
  border:1px solid var(--line);border-radius:22px;background:#fffafc;
  box-shadow:0 13px 32px rgba(92,31,60,.08);transition:.22s ease;
}
.product-card:hover{transform:translateY(-4px);border-color:rgba(198,60,115,.25);box-shadow:0 19px 42px rgba(92,31,60,.12)}
.product-card__image-wrap{position:relative;aspect-ratio:25/27;overflow:hidden;background:#f6e5ec}
.product-card__link{display:block;width:100%;height:100%}
.product-card__image-wrap img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.product-image-placeholder{width:100%;height:100%;display:grid;place-items:center;color:var(--muted2);background:#f4e1e9}
.badge{position:absolute;top:12px;left:12px;z-index:3;padding:6px 9px;border-radius:999px;background:rgba(111,39,72,.88);color:#fff;font-size:9px;font-weight:800}
.favorite-btn{
  position:absolute;top:11px;right:11px;z-index:3;width:38px;height:38px;
  border:1px solid rgba(255,255,255,.55);border-radius:12px;
  background:rgba(255,250,252,.9);color:var(--deep);font-size:21px;
}
.favorite-btn.active{color:var(--rose)}
.product-card__body{flex:1;display:flex;flex-direction:column;padding:16px}
.product-card__meta{color:var(--muted2);font-size:9px;font-weight:700;letter-spacing:.15em}
.product-card h2{margin:8px 0 7px;font:700 18px/1.22 Georgia,serif}
.product-card__category{margin-bottom:18px;color:var(--muted2);font-size:11px}
.price-row{margin-top:auto;display:flex;align-items:baseline;gap:8px}
.price-row strong{font:700 22px Georgia,serif}
.price-row del{color:#a58c97;font-size:12px}
.product-card__actions{margin-top:13px}
.catalog-add-cart-btn{
  width:100%;min-height:44px;border:1px solid rgba(198,60,115,.22);
  border-radius:13px;background:linear-gradient(135deg,#d95388,#a92f61);
  color:#fff;font-weight:800;
}
.catalog-add-cart-btn:disabled{background:#decbd3;color:#9d8791;cursor:not-allowed}
.catalog-add-cart-btn.added-to-cart{background:var(--success)}
.product-card.is-out-of-stock img{opacity:.48;filter:grayscale(.35)}
.out-of-stock-label{
  position:absolute;left:50%;top:50%;z-index:4;translate:-50% -50%;
  padding:8px 11px;border-radius:999px;background:rgba(53,21,34,.88);
  color:#fff;font-size:10px;font-weight:800;white-space:nowrap;
}
.empty-state{
  grid-column:1/-1;padding:58px 24px;border:1px dashed rgba(198,60,115,.24);
  border-radius:20px;background:#fff7fa;color:var(--muted);text-align:center;
}

.drawer-backdrop{position:fixed;inset:0;z-index:60;background:rgba(53,21,34,.34);backdrop-filter:blur(3px)}
.drawer{
  position:fixed;top:0;right:0;z-index:70;width:min(430px,100%);height:100dvh;padding:24px;
  display:flex;flex-direction:column;border-left:1px solid var(--line);
  background:#fff8fb;transform:translateX(100%);transition:.25s ease;
}
.drawer.open{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--line)}
.drawer-head h2{margin:0;font:700 27px Georgia,serif}
.drawer-head button{border:0;background:transparent;color:var(--deep);font-size:32px}
.drawer-list{padding:18px 0;display:grid;gap:12px;overflow:auto}
.drawer-item{padding:10px;display:grid;grid-template-columns:68px 1fr auto;gap:12px;align-items:center;border:1px solid var(--line);border-radius:16px;background:#fff}
.drawer-item img{width:68px;height:68px;object-fit:cover;border-radius:12px}
.drawer-item button{border:0;background:transparent;color:var(--rose)}
.toast{position:fixed;left:50%;bottom:24px;z-index:100;padding:12px 18px;border-radius:999px;background:var(--deep);color:#fff;opacity:0;translate:-50% 20px;transition:.25s}
.toast.show{opacity:1;translate:-50% 0}

@media(max-width:1100px){
  .category-gallery{grid-template-columns:repeat(5,minmax(0,1fr))}
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
  .container{width:min(100% - 24px,1240px)}
  .hero{padding-top:32px}
  .catalog-shell__head{grid-template-columns:1fr}
  .search-sort{grid-template-columns:1fr}
  .category-block__head{align-items:flex-start;flex-direction:column}
  .category-gallery{
    display:flex;overflow-x:auto;gap:9px;padding-bottom:5px;scroll-snap-type:x mandatory;
  }
  .category-card{flex:0 0 112px;min-height:72px;scroll-snap-align:start}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media(max-width:520px){
  .container{width:min(100% - 18px,1240px)}
  .header-inner{min-height:66px}
  .brand-mark{width:38px;height:38px}
  .brand-name{font-size:22px}
  .brand-tagline,.age-badge{display:none}
  .icon-btn{width:40px;height:40px}
  .hero h1{font-size:40px}
  .hero p{font-size:14px}
  .catalog-shell{padding:15px;border-radius:21px}
  .catalog-shell__head h2{font-size:28px}
  .category-block__head h3{font-size:23px}
  .category-card{flex-basis:100px;min-height:66px}
  .category-card__title{font-size:9px}
  .category-card__count{font-size:7px}
  .product-grid{gap:8px}
  .product-card{border-radius:17px}
  .product-card__body{padding:10px}
  .product-card h2{font-size:14px}
  .product-card__category{margin-bottom:12px;font-size:10px}
  .price-row{align-items:flex-start;flex-direction:column;gap:2px}
  .price-row strong{font-size:18px}
  .catalog-add-cart-btn{min-height:40px;padding:0 6px;font-size:11px}
}

/* ===== CATEGORIES: EXACTLY TWO COMPACT ROWS ===== */

.category-gallery {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}

.category-card {
  min-height: 68px;
  border-radius: 14px;
}

.category-card__content {
  left: 8px;
  right: 8px;
  bottom: 6px;
}

.category-card__title {
  font-size: 9px;
  line-height: 1.08;
}

.category-card__count {
  margin-top: 2px;
  font-size: 7px;
}

@media (max-width: 1100px) {
  .category-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .category-gallery {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 5px;
  }

  .category-card {
    flex: 0 0 102px;
    min-height: 64px;
  }
}

@media (max-width: 520px) {
  .category-card {
    flex-basis: 94px;
    min-height: 60px;
  }

  .category-card__title {
    font-size: 8px;
  }

  .category-card__count {
    font-size: 7px;
  }
}
