/* Home (template: Bookory Home 7) */
.home { padding: 40px 0 80px; }
.home > .inner { display: flex; flex-direction: column; gap: 40px; }
.home__main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.home__side { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
@media (min-width: 1200px) {
  .home { padding-top: 0; }
  .home > .inner { display: grid; grid-template-columns: var(--width-sidebar) 1fr; gap: 40px; align-items: start; }
  .home__side { order: -1; }
  .home__main { padding-top: 40px; }
}

/* Hero slider */
.hero { position: relative; width: 100%; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-hero); color: #fff; }
.hero__slide { display: grid; text-align: center; height: auto; }
.hero__body { z-index: 1; display: grid; justify-items: center; gap: 14px; padding: 40px 25px 20px; }
.hero__kicker { font-size: var(--fs-small); font-weight: 600; text-transform: uppercase; }
.hero__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.15; letter-spacing: -0.04em; color: #fff; }
.hero__mark { position: relative; }
.hero__mark::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 6px; height: 4px; border-radius: 4px; background: var(--color-primary); transform: rotate(-4deg); }
.hero__text { font-size: 1.0625rem; font-weight: 500; line-height: 1.5; }
.hero__text strong { font-weight: 600; color: var(--color-primary); }
.hero__media { padding: 10px 40px 60px; }
.hero__media img { width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
/* Slide-in of the active slide content (template: Revolution Slider layers) */
.hero__slide .hero__body > *, .hero__slide .hero__media { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.hero__slide.swiper-slide-active .hero__body > *, .hero__slide.swiper-slide-active .hero__media { opacity: 1; transform: none; }
.hero__slide.swiper-slide-active .hero__body > :nth-child(2) { transition-delay: 0.1s; }
.hero__slide.swiper-slide-active .hero__body > :nth-child(3) { transition-delay: 0.2s; }
.hero__slide.swiper-slide-active .hero__body > :nth-child(4) { transition-delay: 0.3s; }
.hero__slide.swiper-slide-active .hero__media { transition-delay: 0.2s; }
.hero__dots { position: absolute; bottom: 20px !important; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 10px; } /* !important: Swiper sets its own bottom offset */
.hero__dots .swiper-pagination-bullet { position: relative; width: 10px; height: 10px; margin: 0 !important; background: #7d8a92; opacity: 1; } /* !important: beats Swiper bullet margin */
.hero__dots .swiper-pagination-bullet-active { background: none; box-shadow: 0 0 0 2px var(--color-primary); }
.hero__dots .swiper-pagination-bullet-active::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--color-primary); }
@media (min-width: 768px) {
  .hero__slide { grid-template-columns: 1fr 1fr; align-items: center; min-height: 560px; text-align: left; }
  .hero__body { justify-items: start; padding: 60px 0 60px 80px; }
  .hero__media { padding: 60px 50px 60px 0; }
}

/* Top 10 this week */
.top-list { padding: 30px; border-radius: var(--radius-lg); background: var(--color-soft); }
.top-list .box-title { border-color: #dcdde3; }
.top-list__items { display: grid; gap: 22px; }
.top-list__item { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; }
.top-list__num { position: absolute; top: -8px; left: -8px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; font-size: 0.6875rem; font-weight: 600; color: var(--color-heading); }
.top-list__num--1 { background: #fdd8d4; }
.top-list__num--2 { background: #fbe7b5; }
.top-list__num--3 { background: #c9f0ea; }
.top-list__num--4 { background: #cfe3fb; }
.top-list__num--5 { background: #e6dcfa; }
.top-list__num--6 { background: #fcd9e8; }
.top-list__cover img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: var(--radius-sm); }
.top-list__title { font-size: 0.875rem; line-height: 1.4; letter-spacing: 0; }
.top-list__author { margin-top: 4px; font-size: var(--fs-small); color: var(--color-muted); }
@media (hover: hover) { .top-list__title a:hover { color: var(--color-primary); } }

.side-box { padding: 30px; border: 1px solid var(--color-line); border-radius: var(--radius-lg); }

/* Sidebar promo */
.side-banner { display: grid; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-yellow); text-align: center; }
.side-banner__img { width: 100%; aspect-ratio: 1 / 0.8; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out); }
.side-banner__body { padding: 20px 20px 30px; }
.side-banner__kicker { font-size: var(--fs-small); font-weight: 600; text-transform: uppercase; color: var(--color-heading); }
.side-banner__title { margin: 6px 0 10px; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: #b8281a; }
@media (hover: hover) { .side-banner:hover .side-banner__img { transform: scale(1.05); } }

.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.counters .counter { flex-direction: column; text-align: center; }
@media (min-width: 1200px) {
  .counters { grid-template-columns: 1fr; }
  .counters .counter { flex-direction: row; text-align: left; }
}

/* Product tabs */
.tabs-head { display: flex; align-items: center; gap: 30px; }
.tabs-head__list { display: flex; flex: 1; gap: 20px; align-items: center; min-height: 50px; padding: 0 24px; overflow-x: auto; background: var(--color-primary); }
.tabs-head__tab { flex: none; padding: 4px 0; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.85); transition: color var(--duration-base), border-color var(--duration-base); }
.tabs-head__tab[aria-selected="true"] { border-color: #fff; font-weight: 600; color: #fff; }
.tabs-head .btn { display: none; }
@media (min-width: 768px) {
  .tabs-head__list { min-height: 0; padding: 0; overflow: visible; background: none; gap: 30px; }
  .tabs-head__list::after { content: ""; flex: 1; height: 1px; background: var(--color-line); }
  .tabs-head__tab { padding: 0 0 6px; font-size: 1.375rem; color: #757575; }
  .tabs-head__tab[aria-selected="true"] { border-color: var(--color-primary); color: var(--color-heading); }
  .tabs-head .btn { display: inline-flex; }
}
@media (min-width: 768px) and (hover: hover) { .tabs-head__tab:hover { color: var(--color-heading); } }
.tab-panel { margin-top: 30px; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-active { animation: tab-in 0.5s var(--ease-out); }
@keyframes tab-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }

/* Two promo banners */
.promos { display: grid; gap: 20px; }
.promo { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; min-height: 220px; overflow: hidden; border-radius: var(--radius-lg); color: var(--color-heading); }
.promo--mint { background: var(--color-mint); }
.promo--orange { background: var(--color-orange); color: #fff; }
.promo--orange .promo__title { color: #fff; }
.promo__body { display: grid; justify-items: start; gap: 8px; padding: 24px 0 24px 24px; }
.promo__kicker { font-size: 0.875rem; font-weight: 500; }
.promo__title { font-size: clamp(1.1875rem, 0.9rem + 1vw, 1.625rem); line-height: 1.2; letter-spacing: -0.03em; }
.promo--orange .promo__title { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2rem); }
.promo__text { font-size: 0.8125rem; }
.promo__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 0.8125rem; font-weight: 600; }
.promo__link .icon { width: 14px; height: 14px; }
.promo__img { height: 100%; overflow: hidden; }
.promo__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out); }
@media (hover: hover) { .promo:hover .promo__img img { transform: scale(1.06); } }
@media (min-width: 768px) { .promos { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (min-width: 1024px) { .promo__body { padding: 30px 0 30px 40px; } }

/* Deals of the week */
.deals { display: grid; gap: 30px; }
.deals .section-title::after { max-width: 270px; }
.kids-banner { display: grid; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-brown); color: #fff; }
.kids-banner__img img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kids-banner__body { display: grid; gap: 10px; padding: 30px 30px 10px; }
.kids-banner__kicker { font-size: 1.125rem; font-weight: 600; }
.kids-banner__title { font-size: 2.125rem; letter-spacing: -0.03em; color: #fff; }
.kids-banner__aside { display: grid; justify-items: center; align-content: center; gap: 16px; padding: 20px 30px 40px; text-align: center; }
@media (min-width: 768px) {
  .kids-banner { grid-template-columns: 1.15fr 1fr 0.9fr; align-items: center; min-height: 200px; }
  .kids-banner__img { height: 100%; }
  .kids-banner__img img { aspect-ratio: auto; }
  .kids-banner__body { padding: 30px; }
  .kids-banner__aside { height: 100%; padding: 30px; border-radius: 50% 0 0 50% / 100% 0 0 100%; background: rgba(0, 0, 0, 0.25); }
}

/* Three lists */
.lists { display: grid; gap: 30px; }
.lists .box-title { margin-bottom: 10px; padding-bottom: 20px; }
.lists .book-row:last-child { border-bottom: 1px solid var(--color-line); }
@media (min-width: 768px) { .lists { grid-template-columns: repeat(3, 1fr); } }

/* Publishers row */
.home-publishers { padding-bottom: 80px; }
.home-publishers__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
@media (min-width: 768px) { .home-publishers__grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .home-publishers__grid { grid-template-columns: repeat(6, 1fr); } }

/* Testimonial band */
.home-testimonial { position: relative; overflow: hidden; background: var(--color-sage); }
.home-testimonial > .inner { position: relative; z-index: 1; max-width: 650px; padding-top: 80px; padding-bottom: 60px; }
.home-testimonial__decor { display: none; }
.home-testimonial__slider { padding-bottom: 30px; }
.home-testimonial__dots { position: absolute; bottom: 0 !important; } /* !important: Swiper sets its own bottom offset */
@media (min-width: 1024px) {
  .home-testimonial__decor { position: absolute; inset: 0; display: block; }
  .home-testimonial__decor-img { position: absolute; width: 300px; height: 300px; object-fit: cover; opacity: 0.9; }
  .home-testimonial__decor-img--left { left: -80px; top: 40px; border-radius: 50%; }
  .home-testimonial__decor-img--right { right: -60px; bottom: -80px; border-radius: 16px; transform: rotate(-30deg); }
}
