*{box-sizing:border-box}
:root{
  --bg:#f6f7fa;
  --card:#ffffff;
  --line:#e6eaf0;
  --text:#273142;
  --muted:#667085;
  --accent:#4c96c2;
  --accent-dark:#3e86b1;
  --accent-soft:#eef6fb;
  --success:#198754;
  --success-soft:#e8f7ef;
  --warn:#c2851a;
  --warn-soft:#fff4de;
}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}
.container{
  width:min(1240px, calc(100% - 40px));
  margin:0 auto;
}
.topbar{
  background:#fff;
  border-bottom:1px solid var(--line);
}
.topbar__row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 0;
}
.brand{
  font-size:20px;
  font-weight:700;
  color:#6c6c6c;
  display: flex;
  align-items: center;
}
.brand__home{
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: 10px;
  margin-left: 20px;
  transition: .2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.brand__home:hover{
  background: var(--accent);
  color: #fff;
}
.contacts{
  display:flex;
  gap:18px;
  align-items:center;
  color:var(--muted);
}
.contacts a{
  color:var(--text);
  text-decoration:none;
  font-weight:700;
}
.hero{
  padding:32px 0 24px;
}
.hero__grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:24px;
}
.hero__content,.hero__banner,.seo-block,.cta{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px;
}
.hero__banner{
  padding:0;
  overflow:hidden;
}
.hero__banner img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.hero__badge{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent-dark);
  font-size:13px;
  font-weight:700;
  margin-bottom:14px;
}
h1{
  margin:0 0 14px;
  font-size:46px;
  line-height:1.05;
}
h2{
  margin:0 0 12px;
  font-size:30px;
  line-height:1.1;
}
.hero__text,.seo-block p,.cta p,.filters__note{
  color:var(--muted);
  line-height:1.6;
}
.hero__actions,.cta__actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:18px 0;
}
.btn{
  display:inline-block;
  text-decoration:none;
  padding:14px 20px;
  border-radius:12px;
  font-weight:700;
  transition:.2s ease;
}
.btn--primary{
  background:var(--accent);
  color:#fff;
}
.btn--primary:hover{background:var(--accent-dark)}
.btn--light{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.btn--light:hover{background:#fafbfd}
.hero__list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  list-style:none;
  margin:18px 0 0;
  padding:0;
}
.hero__list li{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
}
.filters-block{
  padding:8px 0 18px;
}
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:10px;
}
.filter{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:12px 16px;
  cursor:pointer;
  font-weight:700;
}
.filter.is-active{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.catalog-section{
  padding:8px 0 24px;
}
.catalog-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  align-items: stretch;
}
.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(31,41,55,.04);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card__image{
  position:relative;
  background:#f8fafc;
  overflow:hidden;
}
.gallery{
  position:relative;
  width:100%;
}
.gallery__list{
  display:flex;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  margin:0;
  padding:0;
  list-style:none;
}
/* Hide scrollbar */
.gallery__list::-webkit-scrollbar{display:none}
.gallery__list{scrollbar-width:none}

.gallery__item{
  flex:0 0 100%;
  scroll-snap-align:start;
  position:relative;
}
.gallery__item img{
  width:100%;
  height:280px;
  object-fit:cover;
  display:block;
  cursor:pointer;
}
.gallery__arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,0.7);
  color:var(--text);
  border:none;
  padding:10px;
  cursor:pointer;
  z-index:2;
  border-radius:50%;
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:all .3s ease;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
}
.gallery:hover .gallery__arrow{opacity:1}
.gallery__arrow--prev{left:12px}
.gallery__arrow--next{right:12px}
.gallery__arrow i{
  border:solid var(--text);
  border-width:0 2px 2px 0;
  display:inline-block;
  padding:3.5px;
}
.gallery__arrow--prev i{transform:rotate(135deg); margin-left:2px;}
.gallery__arrow--next i{transform:rotate(-45deg); margin-right:2px;}

.gallery__thumbs{
  display:flex;
  gap:8px;
  padding:12px 18px;
  overflow-x:auto;
  scrollbar-width:none;
}
.gallery__thumbs::-webkit-scrollbar{display:none}
.thumb{
  flex:0 0 64px;
  height:64px;
  border-radius:10px;
  overflow:hidden;
  border:2px solid transparent;
  cursor:pointer;
  transition:.2s;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.thumb.active{
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(76,150,194,0.2);
}

/* Lightbox */
.lightbox{
  position:fixed;
  top:0;left:0;
  width:100%;height:100%;
  background:rgba(0,0,0,0.92);
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.lightbox.is-open{display:flex}
.lightbox__content{
  position:relative;
  max-width:90%;
  max-height:85vh;
}
.lightbox__img{
  max-width:100%;
  max-height:85vh;
  object-fit:contain;
  border-radius:8px;
  box-shadow:0 0 40px rgba(0,0,0,.5);
}
.lightbox__close{
  position:absolute;
  top:-50px;
  right:0;
  color:#fff;
  font-size:40px;
  cursor:pointer;
  line-height:1;
  padding:10px;
}
.lightbox__nav{
  position:absolute;
  top:50%;
  width:100%;
  left:0;
  display:flex;
  justify-content:space-between;
  padding:0 20px;
  transform:translateY(-50%);
  pointer-events:none;
}
.lightbox__btn{
  background:rgba(255,255,255,0.1);
  color:#fff;
  border:none;
  padding:15px;
  border-radius:50%;
  cursor:pointer;
  pointer-events:auto;
  transition:.2s;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
}
.lightbox__btn:hover{background:rgba(255,255,255,.2)}
.lightbox__counter{
  position:absolute;
  bottom:-40px;
  left:50%;
  transform:translateX(-50%);
  color:rgba(255,255,255,.6);
  font-size:14px;
}
.badge{
  position:absolute;
  top:14px;
  left:14px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}
.badge--stock{background:var(--success-soft); color:var(--success)}
.badge--reserved{background:var(--warn-soft); color:var(--warn)}
.badge--free{background:#dcfce7; color:var(--success)}
.card__body{
  padding:18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__content{
  flex: 1;
}
.card__title{
  margin:0 0 10px;
  font-size:24px;
}
.meta{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 12px;
  padding:0;
}
.meta li{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  color:var(--muted);
}
.old-price{
  margin-bottom:4px;
  color:#8b97a8;
  text-decoration:line-through;
}
.price{
  margin-bottom:12px;
  font-size:30px;
  font-weight:800;
  color:var(--accent-dark);
}
.price--free{
  color:var(--success);
}
.reason{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  margin-bottom:12px;
  font-size:14px;
  color:var(--text);
}
.description{
  color:var(--muted);
  line-height:1.55;
  margin-bottom:16px;
}
.card__actions{
  margin-top: auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.seo-block,.cta{
  margin:0 0 24px;
}
.cta{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  margin-bottom:48px;
}
.empty{
  background:#fff;
  border:1px dashed var(--line);
  border-radius:20px;
  padding:32px;
  color:var(--muted);
}
@media (max-width:1024px){
  .hero__grid,.catalog-grid,.cta{
    grid-template-columns:1fr;
    display:grid;
  }
  h1{font-size:38px}
}
@media (max-width:700px){
  .catalog-grid{grid-template-columns:1fr}
  h1{font-size:32px}
  h2{font-size:24px}
}
