/* Главная страница (витрина) — extension/homepage 1.0.0 */
#common-home > .row > #content { min-width: 0; }
.hp { --hp-radius: 1rem; --hp-gap: 1rem; padding-bottom: 1rem; }
.hp-section { margin: 0 0 2.25rem; }
.hp-h { font-size: 1.6rem; font-weight: 700; margin: 0 0 1rem; }
.hp-mark { display: inline-block; padding: .15rem .55rem; border-radius: 2rem; background: #ffe066; color: #5c4400; font-size: .75rem; font-weight: 600; letter-spacing: .02em; vertical-align: middle; margin-bottom: .5rem; }

/* 1. Slider */
#hp .hp-slider { border: 0; box-shadow: none; margin: 0; border-radius: var(--hp-radius); overflow: hidden; }
.hp-slide { display: flex; align-items: stretch; min-height: 340px; color: #fff; text-decoration: none; }
.hp-slide:hover { color: #fff; }
.hp-slide-1 { background: linear-gradient(120deg, #0b5ed7 0%, #3d8bfd 100%); }
.hp-slide-2 { background: linear-gradient(120deg, #6f42c1 0%, #a370f7 100%); }
.hp-slide-3 { background: linear-gradient(120deg, #0f766e 0%, #20c997 100%); }
.hp-slide-text { flex: 0 0 44%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 2.5rem 2rem 3rem 3rem; }
.hp-slide-title { font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin: 0 0 .75rem; color: #fff; }
.hp-slide-sub { font-size: 1.1rem; opacity: .92; margin: 0 0 1.5rem; }
.hp-slide-btn { font-weight: 600; border-radius: .75rem; }
.hp-slide-img { flex: 1 1 auto; min-width: 0; position: relative; }
.hp-slide-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-slider .carousel-indicators { margin-bottom: .6rem; }
.hp-slider .carousel-control-prev, .hp-slider .carousel-control-next { width: 3.5rem; opacity: 0; transition: opacity .2s; }
.hp-slider:hover .carousel-control-prev, .hp-slider:hover .carousel-control-next { opacity: .85; }
@media (max-width: 991.98px) {
  .hp-slide { min-height: 280px; }
  .hp-slide-text { flex-basis: 52%; padding: 1.75rem 1.25rem 2.5rem 1.75rem; }
  .hp-slide-title { font-size: 1.6rem; }
}
@media (max-width: 767.98px) {
  .hp-slide { flex-direction: column-reverse; min-height: 0; }
  .hp-slide-img { height: 170px; flex: 0 0 170px; }
  .hp-slide-text { padding: 1.1rem 1.1rem 2.4rem; }
  .hp-slide-title { font-size: 1.3rem; }
  .hp-slide-sub { font-size: .95rem; margin-bottom: 1rem; }
  .hp-slide-btn { font-size: 1rem; padding: .45rem 1rem; }
  .hp-slider .carousel-control-prev, .hp-slider .carousel-control-next { display: none; }
  .hp-h { font-size: 1.3rem; }
}

/* 2. Category tiles */
.hp-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--hp-gap); }
.hp-cat { display: flex; flex-direction: column; text-decoration: none; color: var(--bs-body-color, #212529); background: var(--bs-tertiary-bg, #f5f6f8); border-radius: var(--hp-radius); padding: .6rem .6rem .8rem; transition: transform .15s ease, box-shadow .15s ease; }
.hp-cat:hover { color: var(--bs-primary); transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .08); }
.hp-cat-img { display: block; aspect-ratio: 3 / 2; border-radius: .75rem; overflow: hidden; background: #fff; margin-bottom: .55rem; }
.hp-cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-cat-name { font-weight: 600; line-height: 1.25; font-size: .95rem; overflow-wrap: anywhere; }
.hp-cat-count { color: var(--bs-secondary-color, #6c757d); font-size: .8rem; margin-top: .2rem; }
@media (max-width: 1199.98px) { .hp-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .hp-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .hp-cat-name { font-size: .9rem; } }

/* 3. Advantages */
.hp-adv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hp-gap); }
.hp-adv-item { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border: 1px solid var(--bs-border-color, #e3e6ea); border-radius: var(--hp-radius); }
.hp-adv-icon { flex: 0 0 auto; display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); }
.hp-adv-title { font-weight: 700; line-height: 1.2; }
.hp-adv-text { color: var(--bs-secondary-color, #6c757d); font-size: .85rem; line-height: 1.3; margin-top: .2rem; }
@media (max-width: 991.98px) { .hp-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .hp-adv { gap: .6rem; } .hp-adv-item { flex-direction: column; align-items: flex-start; padding: .8rem; gap: .5rem; } .hp-adv-icon { width: 44px; height: 44px; } .hp-adv-icon svg { width: 28px; height: 28px; } }

/* 4. Product rows: 4 visible on desktop, 2 on phones, swipe / arrows */
.hp-row-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hp-row-nav { display: flex; gap: .4rem; margin-bottom: 1rem; }
.hp-nav { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--bs-border-color, #dee2e6); background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #212529); }
.hp-nav:hover { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.hp-nav:disabled { opacity: .35; pointer-events: none; }
.hp-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--hp-gap)) / 4); gap: var(--hp-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: .25rem; }
.hp-track::-webkit-scrollbar { display: none; }
.hp-track-item { scroll-snap-align: start; min-width: 0; }
.hp-track-item .product-thumb { height: 100%; margin-bottom: 0; }
@media (max-width: 991.98px) { .hp-track { grid-auto-columns: calc((100% - 2 * var(--hp-gap)) / 3); } }
@media (max-width: 767.98px) {
  .hp-track { --hp-gap: .6rem; grid-auto-columns: calc((100% - var(--hp-gap)) / 2); }
  .hp-row-nav { display: none; }
  .hp-track-item .product-thumb h4 { font-size: .95rem; }
}

/* 5. «Что сшить?» */
.hp-tasks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--hp-gap); }
.hp-task { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--hp-radius); overflow: hidden; color: #fff; text-decoration: none; background: #ddd; }
.hp-task img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.hp-task:hover img { transform: scale(1.05); }
.hp-task::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .7) 100%); }
.hp-task-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: .9rem 1rem; display: flex; flex-direction: column; }
.hp-task-title { font-size: 1.2rem; font-weight: 700; line-height: 1.15; }
.hp-task-caption { font-size: .8rem; opacity: .9; margin-top: .2rem; }
.hp-task:hover { color: #fff; }
@media (max-width: 991.98px) { .hp-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .hp-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .hp-task { aspect-ratio: 1 / 1; } .hp-task-title { font-size: 1.05rem; } }

/* 6. О магазине */
.hp-about { display: grid; grid-template-columns: 3fr 2fr; gap: 1.5rem; padding: 1.75rem; border-radius: var(--hp-radius); background: var(--bs-tertiary-bg, #f5f6f8); }
.hp-about-text p { color: var(--bs-body-color, #333); }
.hp-about-contacts { display: flex; flex-direction: column; gap: .9rem; }
.hp-contact-label { color: var(--bs-secondary-color, #6c757d); font-size: .8rem; }
.hp-contact-missing { font-size: .9rem; color: var(--bs-secondary-color, #6c757d); }
@media (max-width: 767.98px) { .hp-about { grid-template-columns: 1fr; padding: 1.1rem; } }
