/* Homepage: banner + store panel, Shop by Category, Trending Now, product rows, Why buy from YMS. */

/* Banner and store panel */
.home-hero { display: flex; gap: 10px; padding: 10px; }
.home-hero__slides,
.home-hero__store { position: relative; min-height: 480px; border-radius: var(--yms-radius); overflow: hidden; }
.home-hero__slides { width: calc(60% - 5px); background: #111; }
.home-hero__store {
  display: flex; align-items: center; justify-content: center; width: calc(40% - 5px);
  padding: 40px; background: #1a1a1a; color: var(--yms-white); text-align: center;
}

.home-slide {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  background: var(--slide-background, #111);
  opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.home-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease; }
.home-slide__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-slide--contain .home-slide__image { object-fit: contain; object-position: center top; }
.home-slide__link { position: absolute; inset: 0; z-index: 1; }
.home-slide__content { position: relative; z-index: 2; padding: 0 0 60px; text-align: center; }
.home-slide--contain .home-slide__content {
  width: 100%; padding: 40px 20px 55px;
  background: linear-gradient(transparent, var(--slide-background, #111) 35%);
}
.home-slide__title {
  margin: 0 0 16px; color: var(--yms-white); font-size: clamp(22px, 2.3vw, 34px); font-weight: 400; line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.home-hero__button {
  position: relative; z-index: 2; display: inline-block; padding: 12px 28px; border-radius: 6px;
  background: var(--yms-white); color: #111; font-weight: 600; line-height: 1.8; text-decoration: none;
}
.home-hero__button:hover { background: #f1eef5; color: #111; }
.home-hero__dots { position: absolute; left: 0; right: 0; bottom: 11px; z-index: 5; display: flex; justify-content: center; gap: 0; }
.home-hero__dots button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; background: none; cursor: pointer; }
.home-hero__dots button::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.home-hero__dots button[aria-current="true"]::before { background: var(--yms-white); }

.home-hero__store-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.home-hero__store::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.5); }
.home-hero__store-content { position: relative; z-index: 2; max-width: 420px; padding-top: 150px; overflow: hidden; }
.home-hero__store-logo { position: absolute; top: -50px; left: 50%; width: 250px; height: auto; transform: translateX(-50%); }
.home-hero__heading {
  margin: 0 0 24px; color: var(--yms-white); font-size: 20px; font-weight: 400; line-height: 1.3; letter-spacing: inherit;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Sections */
.home-section--lilac { background: var(--yms-surface-lilac); color: var(--yms-ink); }
.home-section > .page-width { padding-block: 40px; }
.home-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.home-section__title { margin: 0 0 24px; color: var(--yms-ink); font-size: 32px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.home-section__head .home-section__title { flex: 1; min-width: 0; margin: 0; }
.home-eyebrow { margin: 0 0 14px; color: var(--yms-purple); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; line-height: 1.8; text-transform: uppercase; }
.home-section__head .home-eyebrow { margin: 0; }
.home-eyebrow--light { margin-bottom: 8px; color: #c8afea; }

/* Shop by Category */
.home-categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.home-category a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border-radius: var(--yms-radius-lg); background: var(--yms-white); box-shadow: 0 6px 20px rgba(var(--yms-ink-rgb), 0.15);
  color: var(--yms-ink); text-decoration: none; transition: box-shadow 0.2s ease;
}
.home-category a:hover { box-shadow: 0 8px 26px rgba(var(--yms-ink-rgb), 0.2); }
.home-category__media { display: grid; place-items: center; aspect-ratio: 1; padding: 20px; }
.home-category__media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.25s ease; }
.home-category a:hover .home-category__media img { transform: scale(1.03); }
.home-category__name { display: block; min-height: 86px; padding: 7px 20px 27px; font-size: 18px; line-height: 1.4; }
.home-category a:hover .home-category__name { text-decoration: underline; text-underline-offset: 0.2em; }

/* Trending Now */
.home-trending__panel { overflow: hidden; border: 1px solid #e5dced; border-radius: var(--yms-radius-lg); background: var(--yms-white); }
.home-trending__name {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 36px; background: var(--yms-ink); color: var(--yms-white);
}
.home-trending__name h3 { margin: 0; color: var(--yms-white); font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.home-trending__subtitle { margin: 8px 0 0; color: #e6dcf2; font-size: 16px; line-height: 1.8; }
.home-trending__aside { max-width: 210px; color: #e6dcf2; font-size: 18px; line-height: 1.4; }
.home-trending__gallery { display: grid; grid-template-columns: 1.55fr 1fr; gap: 4px; background: var(--yms-ink); }
.home-trending__gallery figure { position: relative; height: 340px; min-width: 0; margin: 0; overflow: hidden; }
.home-trending__gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-trending__gallery figcaption {
  position: absolute; inset: auto 0 0; padding: 40px 24px 20px;
  background: linear-gradient(transparent, rgba(15, 9, 24, 0.8)); color: var(--yms-white); font-size: 23px; font-weight: 600; line-height: 1.2;
}
.home-trending__story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 32px 36px; }
.home-trending__story-title { margin: 0; color: var(--yms-ink); font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: 0; }
.home-trending__text { margin: 0; color: #655f70; font-size: 16px; line-height: 1.6; }
.home-trending__button {
  display: inline-flex; align-items: center; gap: 24px; margin-top: 18px; padding: 12px 20px;
  border-radius: var(--yms-radius); background: var(--yms-purple); color: var(--yms-white); font-size: 15px; font-weight: 600; text-decoration: none;
}
.home-trending__button:hover { background: #46217c; color: var(--yms-white); }
.home-trending__panel--product { display: grid; grid-template-columns: 1.1fr 1fr; }
.home-trending__product-image { display: grid; place-items: center; padding: 20px; }
.home-trending__product-image img { width: 100%; height: 360px; object-fit: contain; }
.home-trending__copy { padding: 36px; background: linear-gradient(135deg, #f4edfc, #faf8fd); }
.home-trending__copy h3 { margin: 0 0 14px; font-size: 30px; font-weight: 600; line-height: 1.15; }
.home-trending__copy .yms-price { margin-top: 18px; }

/* Product rows */
.home-row__controls { display: flex; flex-shrink: 0; gap: 12px; }
.home-row__controls[hidden] { display: none; }
.home-row__controls button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 4px;
  border: 1px solid #d9cfe6; border-radius: 50%; background: var(--yms-white); color: var(--yms-purple); font-size: 24px; line-height: 1; cursor: pointer;
}
.home-row__controls button:disabled { opacity: 0.35; cursor: default; }
.home-row__track {
  --row-columns: 4; --row-gap: 20px;
  display: flex; gap: var(--row-gap); padding-bottom: 20px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.home-row__track::-webkit-scrollbar { display: none; }
.home-row__track > .yms-card { flex: 0 0 calc((100% - (var(--row-columns) - 1) * var(--row-gap)) / var(--row-columns)); scroll-snap-align: start; }
.home-row__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.home-row__track img { -webkit-user-drag: none; }
.home-row .yms-card__title { -webkit-line-clamp: 3; min-height: 4.05em; }

/* Why buy from YMS For Music? */
.home-benefits { border-top: 1px solid #ece7f2; background: var(--yms-white); color: var(--yms-ink); }
.home-benefits > .page-width { padding-block: 52px 56px; }
.home-benefits__intro { margin-bottom: 28px; }
.home-benefits__intro .home-eyebrow { margin-bottom: 10px; font-size: 12px; letter-spacing: 0.14em; }
.home-benefits__intro .home-section__title { margin: 0; line-height: 1.2; }
.home-benefits__lead { margin: 12px 0 0; color: #655f70; font-size: 17px; line-height: 1.5; }
.home-benefits__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.home-benefit {
  --accent: #6d35c5; --tint: #f3ecff;
  display: flex; align-items: flex-start; gap: 18px; padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white); border-top: 3px solid var(--accent); border-radius: var(--yms-radius-lg);
  background: var(--tint);
}
.home-benefit:nth-child(2) { --accent: #c0640a; --tint: #fff5e5; }
.home-benefit:nth-child(3) { --accent: #087e75; --tint: #e9f8f4; }
.home-benefit:nth-child(4) { --accent: #2460cb; --tint: #edf3ff; }
.home-benefit:nth-child(5) { --accent: #bb3b65; --tint: #fff0f5; }
.home-benefit:nth-child(6) { --accent: #c04d26; --tint: #fff1e9; }
.home-benefit__icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 52px; height: 52px;
  border-radius: 15px; background: var(--accent); color: var(--yms-white);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 22%, transparent); transform: rotate(-5deg);
}
.home-benefit__icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(5deg); }
.home-benefit h3 { margin: 0 0 8px; color: var(--yms-ink); font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.home-benefit p { margin: 0; color: #655f70; font-size: 15px; line-height: 1.6; }

@media (max-width: 989px) {
  .home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-row__track { --row-columns: 2; }
  .home-benefits__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 749px) {
  .home-hero { flex-direction: column; gap: 6px; padding: 6px; }
  .home-hero__slides, .home-hero__store { width: 100%; min-height: 340px; }
  .home-section > .page-width { padding-block: 28px; }
  .home-section__head { margin-bottom: 20px; }
  .home-section__title { margin-bottom: 20px; font-size: 24px; }
  .home-section__head .home-eyebrow { max-width: 100px; font-size: 9px; text-align: right; }
  .home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-category__media { padding: 12px; }
  .home-category__name { min-height: 0; padding: 4px 12px 16px; font-size: 16px; }
  .home-row__track { --row-gap: 10px; }
  .home-row__controls button { width: 40px; height: 40px; font-size: 22px; }
  .home-trending__name { display: block; padding: 24px; }
  .home-trending__name h3 { font-size: 32px; }
  .home-trending__aside { display: block; max-width: none; margin-top: 14px; font-size: 15px; }
  .home-trending__gallery { grid-template-columns: 1fr 1fr; gap: 3px; }
  .home-trending__gallery figure { height: 240px; }
  .home-trending__gallery figcaption { padding: 32px 14px 14px; font-size: 17px; }
  .home-trending__story { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .home-trending__story-title { font-size: 26px; }
  .home-trending__panel--product { grid-template-columns: 1fr; }
  .home-trending__product-image img { height: 240px; }
  .home-trending__copy { padding: 24px; }
  .home-benefits > .page-width { padding-block: 32px 36px; }
  .home-benefits__lead { font-size: 16px; }
  .home-benefit { padding: 20px; }
}
@media (max-width: 599px) {
  .home-benefits__grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-slide, .home-slide.is-active { transition: none; }
}
