/*
 * Hoshino Studios custom layer
 * New SellAuth theme stays intact; this file adds the recognizable Hoshino
 * pink/glass/halo language from the previous storefront using stable sa-* hooks.
 */

:root {
  --hoshino-pink: 255 79 190;
  --hoshino-magenta: 230 28 217;
  --hoshino-peach: 255 138 91;
  --hoshino-glass: rgba(255, 255, 255, 0.055);
}

body {
  background-image:
    radial-gradient(circle at 18% -8%, rgba(var(--hoshino-pink), 0.16), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(var(--hoshino-peach), 0.08), transparent 28rem);
  background-attachment: fixed;
}

[data-scheme="light"] body {
  background-image:
    radial-gradient(circle at 18% -8%, rgba(181, 23, 142, 0.09), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(255, 138, 91, 0.09), transparent 28rem);
}

/* Glassy chrome: an upgraded version of the old translucent navbar/cards. */
.sa-header {
  isolation: isolate;
}

.sa-navbar {
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

[data-scheme="dark"] .sa-navbar {
  background: rgba(13, 7, 16, 0.70);
  border-color: rgba(255, 215, 237, 0.12);
}

[data-scheme="light"] .sa-navbar {
  background: rgba(255, 246, 250, 0.78);
  border-color: rgba(107, 33, 78, 0.10);
}

/* Old hero halo, rebuilt around the new hero system. */
.sa-hero::before {
  content: "";
  position: absolute;
  width: min(58rem, 78vw);
  aspect-ratio: 1;
  left: 50%;
  top: -41rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(var(--hoshino-pink), 0.38) 0%, rgba(var(--hoshino-magenta), 0.17) 35%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  animation: hoshino-pulse 5s ease-in-out infinite;
}

.hoshino-legacy-hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.16;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.75) 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.75) 58%, transparent 100%);
}

[data-scheme="light"] .hoshino-legacy-hero-bg {
  opacity: 0.07;
  mix-blend-mode: multiply;
}

.hoshino-hero-mark {
  position: absolute;
  right: clamp(1.5rem, 6vw, 7rem);
  top: 52%;
  width: clamp(9rem, 19vw, 17rem);
  aspect-ratio: 1;
  object-fit: cover;
  transform: translateY(-50%) rotate(4deg);
  border-radius: 2rem;
  opacity: 0.075;
  filter: saturate(1.25) contrast(1.08);
  box-shadow: 0 0 80px rgba(var(--hoshino-pink), 0.35);
  pointer-events: none;
  z-index: 0;
}

[data-scheme="light"] .hoshino-hero-mark { opacity: 0.055; }

.sa-hero > .wrap,
.sa-hero > [class*="wrap"] {
  position: relative;
  z-index: 1;
}

.sa-hero-title .mk,
.sa-section-title .mk,
.sa-cta-banner-title .mk,
.sa-promo-panel-title .mk {
  text-shadow: 0 0 26px rgba(var(--hoshino-pink), 0.24);
}

/* Product/content cards keep the newer layout but inherit the old pink glass feel. */
.sa-product-card,
.sa-feedback-card,
.sa-features-item,
.sa-bento-item,
.sa-promo-panel,
.sa-cta-banner,
.sa-faq-item {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-scheme="dark"] .sa-product-card,
[data-scheme="dark"] .sa-feedback-card,
[data-scheme="dark"] .sa-features-item,
[data-scheme="dark"] .sa-bento-item {
  background-color: rgba(36, 16, 32, 0.70);
  border-color: rgba(255, 215, 237, 0.12);
}

.sa-product-card {
  box-shadow: 0 14px 45px rgba(55, 7, 42, 0.18);
}

.sa-product-card:hover,
.sa-feedback-card:hover,
.sa-features-item:hover {
  border-color: rgba(var(--hoshino-pink), 0.34);
  box-shadow: 0 18px 52px rgba(var(--hoshino-pink), 0.13);
}

/* Give section transitions a subtle old-theme magenta wash without recoloring every section. */
.sa-features,
.sa-faq,
.sa-feedbacks {
  position: relative;
}

.sa-features::before,
.sa-faq::before,
.sa-feedbacks::before {
  content: "";
  position: absolute;
  inset: 12% 0 auto;
  height: 18rem;
  background: radial-gradient(ellipse at center, rgba(var(--hoshino-magenta), 0.08), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

/* Social chips echo the old gradient icon treatment. */
.sa-socials a,
.sa-socials .sa-socials-item {
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.sa-socials a:hover,
.sa-socials .sa-socials-item:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--hoshino-pink), 0.36);
  box-shadow: 0 12px 30px rgba(var(--hoshino-pink), 0.12);
}

/* Popup: preserve the old attention-grabbing pink card, but use the new accessible popup behavior. */
.sa-popup [class*="bg-surface"],
.sa-popup [class*="bg-surface-raised"] {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

[data-scheme="dark"] .sa-popup [class*="bg-surface"] {
  background: linear-gradient(135deg, rgba(139, 8, 103, 0.94), rgba(76, 11, 72, 0.94));
}

/* Footer gets a soft finish instead of the old hard dark block. */
.sa-footer {
  position: relative;
  overflow: hidden;
}

.sa-footer::before {
  content: "";
  position: absolute;
  width: 34rem;
  height: 16rem;
  left: -8rem;
  bottom: -10rem;
  border-radius: 9999px;
  background: rgba(var(--hoshino-magenta), 0.14);
  filter: blur(70px);
  pointer-events: none;
}

/* More restrained than the previous 200-flake snow effect; keeps the sparkle personality. */
.pfx-dot:nth-child(3n) {
  box-shadow: 0 0 14px rgba(var(--hoshino-pink), 0.65);
}

@keyframes hoshino-pulse {
  0%, 100% { opacity: 0.72; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

@media (max-width: 900px) {
  .hoshino-hero-mark {
    right: -2.5rem;
    width: 10rem;
    opacity: 0.045;
  }
}

@media (max-width: 640px) {
  .hoshino-hero-mark { display: none; }
  .hoshino-legacy-hero-bg { opacity: 0.10; }
  .sa-hero::before { top: -26rem; width: 36rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sa-hero::before { animation: none; }
}

/* Reversible 2026 storefront refresh: calmer chrome, catalog-first layout. */
.sa-hero::before { animation: none; opacity: .55; }
.sa-hero { border-bottom: 1px solid rgba(var(--cl-accent), .10); }
.sa-hero-title { font-size: clamp(2.6rem, 6vw, 4.75rem); line-height: 1.08; letter-spacing: -.045em; }
.sa-hero-subtitle { max-width: 38rem; line-height: 1.75; }
.sa-hero-actions { margin-top: 1.6rem; }
.hoshino-legacy-hero-bg { opacity: .10; }
.sa-section-header { margin-bottom: 1.8rem; }
.sa-section-title { letter-spacing: -.025em; line-height: 1.2; }
.sa-section-subtitle { line-height: 1.75; }
.sa-categories { padding-bottom: 1.5rem; }
.sa-categories-item { min-height: 5.5rem; box-shadow: none; }
.sa-categories-item h3 { white-space: normal; overflow-wrap: anywhere; }
.sa-products { padding-top: 2rem; }
.sa-product-card { box-shadow: 0 8px 24px rgba(0, 0, 0, .10); }
.sa-product-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
[data-scheme="dark"] .sa-product-card,
[data-scheme="dark"] .sa-feedback-card { background-color: rgba(29, 17, 30, .88); }
.sa-product-card h3 { line-height: 1.5; }
.sa-page-product-title { line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.sa-page-product .p-card { box-shadow: 0 12px 40px rgba(0, 0, 0, .12); }
.sa-page-product .editor { line-height: 1.8; overflow-wrap: anywhere; }
.sa-page-product .editor :is(h1, h2, h3, h4) {
  line-height: 1.35; margin-block-start: 1.8em !important; margin-block-end: .8em !important;
}
.sa-page-product .editor :is(h1, h2, h3, h4):first-child { margin-block-start: 0 !important; }
.sa-page-product .editor p { margin-block: 0 1.15em; }
.sa-page-product .editor :is(ul, ol) { margin-block: .8em 1.4em; }
.sa-page-product .editor li + li { margin-block-start: .45em; }
.sa-page-product .editor :is(img, video, iframe) { max-width: 100%; }
.sa-page-product .editor pre { max-width: 100%; overflow-x: auto; }
.sa-page-product [role="tablist"] { gap: .35rem; border-radius: 14px; padding: .4rem; margin-bottom: 1.6rem; }
.sa-page-product [role="tab"] { min-height: 44px; line-height: 1.5; }
.sa-product-form #variant { min-height: 52px; height: auto; padding-block: .8rem; }
.sa-product-form #variant > span { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
.sa-product-form [role="option"] { min-height: 48px; }
.sa-product-form [role="option"] .truncate { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
.sa-product-form [role="listbox"] { overscroll-behavior: contain; }
@media (max-width: 640px) {
  .sa-product-form .sa-variant-dropdown {
    position: fixed;
    inset-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
    top: auto !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    max-height: min(80dvh, calc(100dvh - 24px)) !important;
    display: flex;
    flex-direction: column;
    padding-bottom: max(.25rem, env(safe-area-inset-bottom));
  }
  .sa-product-form .sa-variant-list {
    min-height: 0;
    max-height: min(52dvh, 430px) !important;
    flex: 1 1 auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}
.sa-language-selector [role="option"] { min-height: 44px; }
:is(.sa-navbar, .sa-footer, .sa-product-form, .sa-page-product) :is(a, button, input):focus-visible {
  outline: 2px solid rgb(var(--cl-accent)); outline-offset: 3px;
}
@media (max-width: 640px) {
  .sa-hero { padding-block: 2.5rem; }
  .sa-hero-title { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .sa-hero-subtitle { font-size: 1rem; }
  .sa-categories { padding-top: 2rem; }
  .sa-section-header { margin-bottom: 1.25rem; }
  .sa-page-product [role="tablist"] { display: flex; width: 100%; }
  .sa-page-product [role="tab"] { padding-inline: .75rem; flex-grow: 1; }
  .sa-page-product .editor { font-size: .95rem; }
  .sa-footer { padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) {
  .sa-product-card, .sa-categories-item, .sa-socials a { transition: none !important; transform: none !important; }
}

/* Header controls share normal layout space, including when languages are enabled. */
.sa-navbar--pills .sa-navbar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.sa-navbar--pills .nav-pills {
  grid-column: 2;
  justify-self: center;
  white-space: nowrap;
}
.sa-navbar--pills .sa-navbar-actions { grid-column: 3; flex-shrink: 0; }
.sa-navbar-mobile-menu {
  max-height: calc(100dvh - var(--sa-menu-top, 112px) - 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 1279.98px) {
  .sa-navbar--pills .nav-pills,
  .sa-navbar--pills .sa-navbar-desktop-control { display: none; }
  .sa-navbar--pills .sa-navbar-menu-toggle { display: inline-flex; }
  .sa-navbar--pills .sa-navbar-mobile-menu { display: block; }
  .sa-navbar--pills .sa-navbar-actions > :is(button, a),
  .sa-navbar-mobile-menu .sa-language-selector > button,
  .sa-navbar-mobile-menu .currency-selector > button { min-width: 44px; min-height: 44px; }
}
@media (min-width: 1280px) {
  .sa-navbar--pills .sa-navbar-menu-toggle,
  .sa-navbar--pills .sa-navbar-mobile-menu { display: none; }
}