/**
 * Light storefront overrides — served as static CSS (not processed by Tailwind PostCSS).
 * Storefront accents are monochrome (admin uses the same tokens via globals.css).
 */

html.light [data-storefront-shell] {
  --accent: #171717 !important;
  --accent-secondary: #3f3f46 !important;
  --ring: #a1a1aa !important;
}

html.light [data-storefront-shell] .store-lang-active {
  background: var(--accent) !important;
  color: var(--store-on-accent) !important;
}

html.dark [data-storefront-shell] {
  --accent: #fafafa;
  --accent-secondary: #a1a1aa;
  --ring: #a1a1aa;
}

html.dark [data-storefront-shell] .store-lang-active {
  background: var(--accent) !important;
  color: var(--store-on-accent) !important;
}

/* Özel: gray/white monochrome. Does not apply to locked Siyah (html.dark without this mode). */
html[data-store-theme-mode="custom"] {
  color-scheme: light;
  --page-bg: #e4e4e7;
  --background: #e4e4e7;
}

html[data-store-theme-mode="custom"] [data-storefront-shell] {
  --store-heading: #18181b;
  --store-muted: #71717a;
  --store-border: #e4e4e7;
  --store-surface: #ffffff;
  --store-surface-muted: #f4f4f5;
  --store-header-bg: #e4e4e7;
  --store-elevated: #ffffff;
  --store-input-bg: #ffffff;
  --accent: #18181b !important;
  --accent-secondary: #3f3f46 !important;
  --ring: #a1a1aa !important;
}

html[data-store-theme-mode="custom"] [data-storefront-shell] .store-lang-active {
  background: var(--accent) !important;
  color: var(--store-on-accent) !important;
}

html[data-store-theme-mode="custom"],
html[data-store-theme-mode="custom"] body {
  background-color: #e4e4e7;
  scrollbar-color: #3f3f46 #e4e4e7;
}

html[data-store-theme-mode="custom"]::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html[data-store-theme-mode="custom"]::-webkit-scrollbar-track {
  background: #e4e4e7;
}

html[data-store-theme-mode="custom"]::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border: 3px solid #e4e4e7;
  border-radius: 999px;
}

/* Custom only: smooth grayscale light, no noise. Locked white and dark stay flat. */
html[data-store-theme-mode="custom"] .store-mono-field {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse 58% 46% at 10% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(ellipse 44% 40% at 98% 8%, #f7f7f8 0%, rgba(247, 247, 248, 0) 54%),
    radial-gradient(ellipse 72% 56% at 88% 100%, #9a9aa2 0%, rgba(154, 154, 162, 0) 62%),
    radial-gradient(ellipse 48% 42% at 0% 92%, #8b8b93 0%, rgba(139, 139, 147, 0) 58%),
    linear-gradient(160deg, #f7f7f8 0%, #d5d5d9 48%, #c2c2c8 100%);
  filter: blur(12px);
}

html[data-store-theme-mode="custom"] [data-storefront-shell] footer {
  background-color: var(--page-bg);
}

.store-auth-shell {
  position: relative;
  box-sizing: border-box;
  width: min(36rem, calc(100% - 2rem));
  margin: max(6.5rem, calc(50dvh - 17rem)) auto 4rem;
  padding: 2.5rem 2.25rem 2rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(24, 24, 27, 0.05),
    0 30px 70px -34px rgba(24, 24, 27, 0.4);
}

.store-auth-shell::before {
  content: "";
  position: absolute;
  inset: -14% -10%;
  z-index: -1;
  border-radius: 2rem;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, 0.95), transparent 58%),
    radial-gradient(ellipse at 88% 92%, rgba(63, 63, 70, 0.18), transparent 55%);
  filter: blur(8px);
}

.store-auth-shell h1 {
  font-size: 2.25rem;
  letter-spacing: -0.03em;
}

.store-auth-shell input {
  min-height: 3rem;
  font-size: 1rem;
}

html.dark .store-auth-shell {
  background: rgba(16, 16, 18, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 70px -34px rgba(0, 0, 0, 0.65);
}

html.dark .store-auth-shell::before {
  background:
    radial-gradient(ellipse at 16% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(ellipse at 84% 100%, rgba(255, 255, 255, 0.06), transparent 52%);
}

html[data-store-theme-mode="custom"] .store-product-card {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 18px 40px -22px rgba(24, 24, 27, 0.34);
}

html[data-store-theme-mode="custom"] [data-storefront-shell] header {
  background-color: rgb(244 244 245 / 0.55) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px);
}

html.light[data-store-theme="light"][data-store-theme-mode="light"] {
  color-scheme: light;
  --page-bg: #ffffff;
  --background: #ffffff;
  --store-surface-muted: #ffffff;
  --store-header-bg: #ffffff;
}

html.light[data-store-theme="light"][data-store-theme-mode="light"]
  [data-storefront-shell]
  .site-wash-strength {
  opacity: 0 !important;
}

html.light[data-store-theme="light"][data-store-theme-mode="light"],
html.light[data-store-theme="light"][data-store-theme-mode="light"] body {
  background-color: #ffffff;
}

html.light[data-store-theme="light"][data-store-theme-mode="light"]
  [data-storefront-shell] {
  background-color: transparent;
}

html.light[data-store-theme="light"] [class*="border-[#23272F]"] {
  border-color: var(--store-border) !important;
}

html.light[data-store-theme="light"] [class*="bg-[#111317]"],
html.light[data-store-theme="light"] [class*="bg-[#16181C]"] {
  background-color: var(--store-surface) !important;
  color: var(--store-heading);
}

html.light[data-store-theme="light"] [class*="bg-[#0A0B0D]"] {
  background-color: var(--store-surface-muted) !important;
}

html.light[data-store-theme="light"] [class*="bg-[#23272F]"] {
  background-color: color-mix(
    in srgb,
    var(--store-border) 42%,
    var(--store-surface-muted)
  ) !important;
}

html.light[data-store-theme="light"] [class*="bg-[#2A2F38]"],
html.light[data-store-theme="light"] [class*="bg-[#2a2f38]"] {
  background-color: color-mix(
    in srgb,
    var(--store-border) 58%,
    var(--store-surface-muted)
  ) !important;
}

html.light[data-store-theme="light"] [class*="hover:bg-[#23272F]"]:hover {
  background-color: color-mix(
    in srgb,
    var(--store-border) 55%,
    var(--store-surface-muted)
  ) !important;
}

html.light[data-store-theme="light"] [class*="hover:bg-[#2A2F38]"]:hover,
html.light[data-store-theme="light"] [class*="hover:bg-[#2a2f38]"]:hover {
  background-color: color-mix(
    in srgb,
    var(--store-border) 70%,
    var(--store-surface-muted)
  ) !important;
}

html.light[data-store-theme="light"] [class*="text-[#F5F7FA]"] {
  color: var(--store-heading) !important;
}

html.light[data-store-theme="light"] [class*="text-[#A1A8B3]"] {
  color: var(--store-muted) !important;
}

html.light[data-store-theme="light"] [class*="text-[#6B7280]"] {
  color: var(--store-muted) !important;
}

html.light[data-store-theme="light"] [class*="hover:bg-[#111317]"]:hover {
  background-color: var(--store-surface-muted) !important;
}

html.light[data-store-theme="light"] [class*="hover:text-[#F5F7FA]"]:hover {
  color: var(--store-heading) !important;
}

html.dark[data-store-theme="dark"][data-store-theme-mode="dark"] {
  color-scheme: dark;
  --page-bg: #0a0b0d;
  --background: #0a0b0d;
}

html.dark[data-store-theme="dark"][data-store-theme-mode="dark"],
html.dark[data-store-theme="dark"][data-store-theme-mode="dark"] body {
  background-color: #0a0b0d;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] {
  background-color: var(--page-bg);
}

html.dark[data-store-theme="dark"] [data-storefront-shell] .site-wash-strength {
  opacity: 0 !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="border-[#23272F]"] {
  border-color: var(--store-border) !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="bg-[#111317]"],
html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="bg-[#16181C]"] {
  background-color: var(--store-surface) !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="bg-[#0A0B0D]"] {
  background-color: var(--store-surface-muted) !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="text-[#F5F7FA]"] {
  color: var(--store-heading) !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="text-[#A1A8B3]"],
html.dark[data-store-theme="dark"] [data-storefront-shell] [class*="text-[#6B7280]"] {
  color: var(--store-muted) !important;
}

html.light[data-store-theme="light"] input[class*="border-[#23272F]"],
html.light[data-store-theme="light"] input[class*="bg-[#111317]"] {
  background-color: var(--store-input-bg, #ffffff) !important;
  color: var(--store-heading) !important;
}

html.dark[data-store-theme="dark"] [data-storefront-shell] input[class*="border-[#23272F]"],
html.dark[data-store-theme="dark"] [data-storefront-shell] input[class*="bg-[#111317]"] {
  background-color: var(--store-input-bg) !important;
  color: var(--store-heading) !important;
}

/* Custom Özel palette: contrast follows resolved surface (html.light/dark), not sun/moon preference. */
html[data-store-theme-mode="custom"] [data-storefront-shell] {
  background-color: transparent;
}

html.dark[data-store-theme-mode="dark"] [data-storefront-shell] .site-wash-strength {
  opacity: 0 !important;
}

html.dark[data-store-theme-mode="custom"] [data-storefront-shell] [class*="border-[#23272F]"] {
  border-color: var(--store-border) !important;
}

html.dark[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#F5F7FA]"] {
  color: var(--store-heading) !important;
}

html.dark[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#A1A8B3]"],
html.dark[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#6B7280]"] {
  color: var(--store-muted) !important;
}

html.light[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#F5F7FA]"] {
  color: var(--store-heading) !important;
}

html.light[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#A1A8B3]"],
html.light[data-store-theme-mode="custom"] [data-storefront-shell] [class*="text-[#6B7280]"] {
  color: var(--store-muted) !important;
}
