/* =========================================================
   KIRAMEKI — main stylesheet (shared by every page)
   ---------------------------------------------------------
   Built on top of Bootstrap 5.3. Bootstrap handles the grid, the
   navbar collapse, the carousel, the offcanvas, tabs and toasts; this
   file gives the store its own look.

   TABLE OF CONTENTS
     1. Design tokens (colors, sizes) — start customizing here
     2. Base
     3. Navbar
     4. Console side rail + mobile drawer
     5. Page layout and section headings
     6. Hero banners
     7. Franchise tiles
     8. Shelves and product cards
     9. Footer and toast
    10. Language button
    11. Reduced motion
   (9b. Shared controls: breadcrumb, main buttons, quantity stepper)

   Page-specific styles: css/product.css and css/login.css.
   Class prefix: store variables use --k-*, Bootstrap ones use --bs-*.
   ========================================================= */

/* ===================== 1. DESIGN TOKENS =====================
   Change the brand colors here and the whole store follows.
   If you change --k-primary, update --bs-primary / --bs-primary-rgb
   (same color) and the --bs-link-* colors too. */
:root {
  --k-primary: #E8174B;       /* main brand color (buttons, rail, accents) */
  --k-primary-dark: #B80F3A;  /* hover / darker shade of the primary */
  --k-primary-2: #FF6A3D;     /* second gradient color (logo block, CTAs) */
  --k-accent: #FFB800;        /* highlight color, also used for keyboard focus rings */

  --header-h: 68px;           /* navbar height (the side rail starts below it) */
  --rail-w: 96px;             /* width of the console side rail */
  --radius: 14px;             /* cards, inputs */
  --radius-lg: 24px;          /* banners, big panels */

  /* Bootstrap variables aligned with the brand */
  --bs-primary: #E8174B;
  --bs-primary-rgb: 232, 23, 75;
  --bs-body-font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-link-color: #E8174B;
  --bs-link-hover-color: #B80F3A;
}

/* Surface colors per theme. Bootstrap sets data-bs-theme on <html>;
   the toggle lives in js/common.js (initTheme). */
[data-bs-theme="light"] {
  /* --k-surface: cards and panels · --k-soft: subtle backgrounds · --k-ink: main text */
  --k-surface: #ffffff;
  --k-soft: #F3F1F5;
  --k-ink: #25212B;
  --bs-body-bg: #FAF9FB;
}

[data-bs-theme="dark"] {
  --k-surface: #1E1B23;
  --k-soft: #2A2631;
  --k-ink: #F2EFF6;
  --bs-body-bg: #141218;
}

/* ===================== 2. BASE ===================== */
body {
  font-family: var(--bs-body-font-family);
  background: var(--bs-body-bg);
  color: var(--k-ink);
}

/* Headings use the rounded display font (Google Fonts: Fredoka) */
h1, h2, h3, .brand-name, .offcanvas-title {
  font-family: 'Fredoka', var(--bs-body-font-family);
  color: inherit;
}

/* Visible focus ring for keyboard users (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--k-accent);
  outline-offset: 2px;
}

/* Horizontal scrollers without a visible scrollbar (shelves, franchises) */
.scroll-x { scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ===================== 3. NAVBAR ===================== */
.site-header {
  background: var(--k-surface);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
  z-index: 1030;
}

/* Multicolor "sparkle" line under the navbar: the Kirameki signature
   (repeated on the sign-in card). */
.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--k-primary), var(--k-primary-2), var(--k-accent), #1E9BD7, #7C5CFF);
}

.site-header .navbar { padding: 0; min-height: calc(var(--header-h) - 3px); }

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  align-self: stretch;
  min-height: calc(var(--header-h) - 3px);
  min-width: calc(var(--rail-w) + 96px);
  padding: 0 2.25rem 0 1.25rem;
  background: linear-gradient(135deg, var(--k-primary), var(--k-primary-2));
  color: #fff;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
}
.brand:hover { color: #fff; }

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--k-primary);
  display: grid; place-items: center;
  font-size: 1.1rem;
  transition: transform .3s;
}
.brand:hover .brand-mark { transform: rotate(-20deg) scale(1.08); }

.brand-name { font-weight: 700; font-size: 1.45rem; letter-spacing: .3px; }

.main-links { gap: .25rem; margin-left: .75rem; }
.main-links .nav-link {
  display: flex; align-items: center; gap: .45rem;
  font-weight: 800;
  color: var(--k-ink);
  padding: .5rem 1rem !important;
  border-radius: 999px;
  transition: background .2s;
}
.main-links .nav-link i { color: var(--k-primary); }
.main-links .nav-link:hover { background: var(--k-soft); color: var(--k-ink); }

.nav-actions { display: flex; align-items: center; gap: .5rem; padding-right: 1rem; }

.search-pill {
  display: flex; align-items: center; gap: .5rem;
  background: var(--k-soft);
  border-radius: 999px;
  padding: .5rem 1rem;
  min-width: 250px;
  transition: box-shadow .2s;
}
.search-pill i { color: var(--bs-secondary-color); }
.search-pill input {
  border: 0; background: transparent; outline: 0;
  width: 100%;
  color: var(--k-ink);
  font-weight: 700;
}
.search-pill input:focus-visible { outline: 0; }
.search-pill:focus-within { box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25); }

.icon-btn {
  position: relative;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: var(--k-soft);
  color: var(--k-ink);
  text-decoration: none;
  transition: color .2s, transform .2s;
}
.icon-btn:hover { color: var(--k-primary); transform: translateY(-1px); }

.count-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--k-primary);
  color: #fff;
  font-size: .68rem; font-weight: 800;
  display: grid; place-items: center;
}
.count-badge[hidden] { display: none; }

.btn-login {
  border: 2px solid var(--k-primary);
  color: var(--k-primary);
  border-radius: 999px;
  font-weight: 800;
  padding: .4rem 1rem;
  white-space: nowrap;
}
.btn-login:hover { background: var(--k-primary); color: #fff; border-color: var(--k-primary); }

@media (max-width: 991.98px) {
  .navbar-collapse { padding: .75rem 1rem 1rem; }
  .main-links { margin-left: 0; }
  .nav-actions { flex-wrap: wrap; padding: .5rem 0 0; }
  .search-pill { flex: 1 1 100%; min-width: 0; }
  .brand { min-width: 0; }
}

/* ===================== 4. CONSOLE SIDE RAIL =====================
   Fixed column on the left (desktop only, see .d-lg-flex in the HTML).
   Each console shows a flyout menu on hover or keyboard focus
   (:focus-within), so it also works without a mouse. */
.console-rail {
  position: fixed;
  top: var(--header-h);
  left: 0; bottom: 0;
  width: var(--rail-w);
  flex-direction: column;
  background: linear-gradient(180deg, var(--k-primary), var(--k-primary-dark));
  z-index: 1020;
  padding: .35rem 0;
}

.rail-label {
  display: flex; flex-direction: column; align-items: center;
  font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255, 255, 255, .8);
  padding: .3rem 0;
}

.rail-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.rail-item { position: relative; }

.rail-btn {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: .7rem .25rem;
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  transition: background .2s;
}
.rail-btn i { font-size: 1.5rem; transition: transform .2s; }
.rail-name { font-size: .74rem; font-weight: 800; line-height: 1.1; text-align: center; }
.rail-year {
  font-size: .6rem; font-weight: 800;
  background: rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 0 .45rem;
}
.rail-btn::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #fff;
  opacity: 0;
  transition: opacity .2s;
}

.rail-item:hover .rail-btn,
.rail-item:focus-within .rail-btn { background: rgba(255, 255, 255, .16); }
.rail-item:hover .rail-btn::before,
.rail-item:focus-within .rail-btn::before { opacity: 1; }
.rail-item:hover .rail-btn i { transform: scale(1.12); }

.rail-flyout {
  position: absolute;
  left: 100%; top: 0;
  min-width: 230px;
  padding: .5rem;
  background: var(--k-surface);
  border-radius: 0 18px 18px 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 5;
}
.rail-item:hover .rail-flyout,
.rail-item:focus-within .rail-flyout {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.flyout-head {
  padding: .5rem .75rem;
  margin-bottom: .35rem;
  border-left: 4px solid var(--accent);
}
.flyout-head strong { display: block; font-family: 'Fredoka', sans-serif; font-size: 1.1rem; color: var(--k-ink); }
.flyout-head small { color: var(--bs-secondary-color); font-weight: 600; }

.rail-flyout a,
.drawer-options a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  color: var(--k-ink);
  text-decoration: none;
  font-weight: 800;
  transition: background .15s;
}
.rail-flyout a i,
.drawer-options a i { color: var(--accent); font-size: 1.1rem; }
.rail-flyout a:hover,
.drawer-options a:hover { background: var(--k-soft); }
.rail-flyout .count,
.drawer-options .count {
  margin-left: auto;
  font-size: .75rem;
  background: var(--k-soft);
  color: var(--bs-secondary-color);
  border-radius: 999px;
  padding: 0 .5rem;
}

/* Mobile console menu (Bootstrap offcanvas opened from the navbar) */
.offcanvas { background: var(--k-surface); }
.drawer-console { padding: .75rem 0; border-bottom: 1px solid var(--bs-border-color); }
.drawer-title { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; margin-bottom: .25rem; }
.drawer-title i { color: var(--accent); font-size: 1.3rem; }
.drawer-title small { color: var(--bs-secondary-color); font-weight: 700; }

/* ===================== 5. PAGE LAYOUT ===================== */
.site-main { padding-top: 1.5rem; }
@media (min-width: 992px) {
  .site-main { margin-left: var(--rail-w); }
}

.section { margin-top: 2.75rem; scroll-margin-top: calc(var(--header-h) + 1rem); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head h2 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.section-head p { margin: .1rem 0 0; color: var(--bs-secondary-color); font-weight: 600; }

.shelf-nav { display: flex; align-items: center; gap: .5rem; }
.see-all { font-weight: 800; color: var(--k-primary); text-decoration: none; white-space: nowrap; margin-right: .25rem; }
.see-all:hover { text-decoration: underline; }

.btn-clear {
  border-radius: 999px;
  font-weight: 800;
  background: var(--k-soft);
  color: var(--k-ink);
  border: 0;
}
.btn-clear:hover { background: var(--k-primary); color: #fff; }

/* ===================== 6. HERO BANNERS =====================
   Bootstrap carousel. Each slide gets its colors from inline CSS
   variables (--c1 / --c2) set by js/main.js from STORE.banners. */
.hero-carousel { position: relative; }

.hero-slide {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  min-height: 340px;
  padding: 2.5rem 3rem 3.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, var(--c1), var(--c2));
}
.hero-slide.is-light { color: #2A1D00; }

.hero-copy { position: relative; z-index: 2; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.is-light .hero-kicker { background: rgba(0, 0, 0, .1); }

.hero-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  margin: .85rem 0 .6rem;
}
.hero-copy p { font-size: 1.05rem; max-width: 36ch; opacity: .92; font-weight: 600; }

.hero-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .5rem;
  padding: .65rem 1.4rem;
  border-radius: 999px;
  background: #fff;
  color: #1A1A1A;
  font-weight: 800;
  border: 0;
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover { background: #fff; color: #1A1A1A; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.is-light .hero-cta,
.is-light .hero-cta:hover { background: #2A1D00; color: #fff; }

.hero-art { position: relative; height: 100%; min-height: 260px; }
.blob { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.b1 { width: 300px; height: 300px; right: 6%; top: 50%; transform: translateY(-50%); }
.b2 { width: 150px; height: 150px; right: 44%; top: 4%; background: rgba(255, 255, 255, .12); }
.hero-icon {
  position: absolute;
  right: calc(6% + 150px);
  top: 50%;
  transform: translate(50%, -50%) rotate(-8deg);
  font-size: 150px;
  line-height: 1;
  color: #fff;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .22));
}
.spark { position: absolute; color: #fff; animation: twinkle 2.4s ease-in-out infinite; }
.s1 { top: 12%; right: 10%; font-size: 1.6rem; }
.s2 { bottom: 14%; right: 48%; font-size: 1.2rem; animation-delay: .8s; }
.s3 { top: 44%; right: 1%; font-size: 1.2rem; animation-delay: 1.6s; }

@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.hero-controls {
  position: absolute;
  right: 1.25rem; bottom: 1.1rem;
  display: flex; align-items: center; gap: .45rem;
  z-index: 3;
}
.hero-dots.carousel-indicators {
  position: static;
  margin: 0 .5rem 0 0;
  padding: 0;
  gap: .35rem;
  align-items: center;
}
.hero-dots.carousel-indicators [data-bs-target] {
  width: 8px; height: 8px;
  margin: 0; padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  opacity: .55;
  text-indent: 0;
  transition: width .3s, opacity .3s;
}
.hero-dots.carousel-indicators .active { width: 24px; opacity: 1; }

.hero-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #1A1A1A;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: transform .2s;
}
.hero-btn:hover { transform: scale(1.08); }

@media (max-width: 767.98px) {
  .hero-slide { grid-template-columns: 1fr; padding: 1.75rem 1.5rem 4.5rem; min-height: 320px; }
  .hero-art { position: absolute; inset: 0; opacity: .35; pointer-events: none; }
  .hero-controls { left: 1.5rem; right: auto; }
}

/* ===================== 7. FRANCHISE TILES ===================== */
.franchise-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .35rem .25rem .5rem;
}
.franchise-tile { display: block; text-decoration: none; color: var(--k-ink); scroll-snap-align: start; }
.franchise-art {
  display: grid; place-items: center;
  aspect-ratio: 1;
  border-radius: 22px;
  background: var(--k-soft);
  color: var(--c1);
  font-size: 2.8rem;
  transition: transform .25s, background .25s, color .25s, box-shadow .25s;
}
.franchise-tile:hover .franchise-art,
.franchise-tile:focus-visible .franchise-art {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  transform: translateY(-4px) rotate(-2deg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
}
.franchise-name { display: block; margin-top: .55rem; font-weight: 800; }

/* ===================== 8. SHELVES AND PRODUCT CARDS =====================
   Cards are generated by KIRA.cardHTML (js/common.js).
   --strip is the console color, set inline on each card. */
.shelf-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .35rem .25rem 1rem;
}
.shelf-track > * { scroll-snap-align: start; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.product-card {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  background: var(--k-surface);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }

/* Console strip on top of the card: solid for games, tinted for hardware */
.platform-strip {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .3rem .75rem;
  background: var(--strip);
  color: #fff;
  font-size: .78rem; font-weight: 800;
}
.is-hardware .platform-strip {
  background: color-mix(in srgb, var(--strip) 14%, transparent);
  color: var(--strip);
}

.product-media { position: relative; aspect-ratio: 1; background: var(--k-soft); }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-hardware .product-media img { object-fit: contain; padding: 1rem; }

/* Game cover placeholder (used while a product has no `image`):
   franchise gradient + big icon + title. --angle varies per gallery image. */
.cover-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, .38), transparent 45%),
    linear-gradient(var(--angle, 145deg), var(--c1), var(--c2));
}
.cover-ph i {
  position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-size: 5.5rem;
  opacity: .92;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25));
  transition: transform .3s;
}
.product-card:hover .cover-ph i { transform: translate(-50%, -54%) rotate(-4deg) scale(1.06); }
.cover-title {
  position: relative;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* Hardware placeholder: big icon in the console color */
.hw-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 5rem;
  color: var(--strip);
}

.wish-btn {
  position: absolute; top: .6rem; right: .6rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #222;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform .2s, color .2s;
}
.wish-btn:hover { transform: scale(1.1); }
.wish-btn[aria-pressed="true"] { color: var(--k-primary); }

.deal-tag {
  position: absolute; left: .6rem; top: .6rem;
  padding: .2rem .55rem;
  border-radius: 8px;
  background: var(--k-primary);
  color: #fff;
  font-size: .78rem; font-weight: 800;
}

.product-body { display: flex; flex-direction: column; gap: .35rem; flex: 1; padding: .85rem 1rem 1rem; }
/* The title link stretches over the whole card (Bootstrap .stretched-link);
   the wishlist and cart buttons stay clickable above it. */
.product-title a { color: inherit; text-decoration: none; }
.product-title a:focus-visible { outline: none; }
.product-card:has(.product-title a:focus-visible) { box-shadow: 0 0 0 3px var(--k-accent); }
.wish-btn, .add-btn { z-index: 2; }
.add-btn { position: relative; }

.product-title {
  margin: 0;
  font-family: var(--bs-body-font-family);
  font-size: 1rem; font-weight: 800;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-date { font-size: .8rem; color: var(--bs-secondary-color); font-weight: 600; }
.product-badge {
  align-self: flex-start;
  padding: .1rem .6rem;
  border-radius: 999px;
  background: #5B5BD6;
  color: #fff;
  font-size: .72rem; font-weight: 800;
}
.product-price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.product-price strong { font-size: 1.2rem; font-weight: 800; }
.product-price s { font-size: .82rem; color: var(--bs-secondary-color); }

.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .25rem; padding-top: .55rem;
  border-top: 1px dashed var(--bs-border-color);
}
.product-kind { display: flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--bs-secondary-color); }
.add-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--k-primary);
  color: #fff;
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.add-btn:hover { background: var(--k-primary-dark); transform: scale(1.08); }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2.5rem; }

/* ===================== 9b. SHARED CONTROLS =====================
   Used by the product, cart and checkout pages. */

/* Breadcrumb */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  list-style: none;
  margin: 0 0 1.25rem; padding: 0;
  font-size: .88rem; font-weight: 700;
  color: var(--bs-secondary-color);
}
.crumbs li { display: flex; align-items: center; gap: .35rem; }
.crumbs li + li::before { content: '\203A'; font-size: 1.1rem; opacity: .6; }
.crumbs a { color: var(--bs-secondary-color); text-decoration: none; }
.crumbs a:hover { color: var(--k-primary); }
.crumbs [aria-current] { color: var(--k-ink); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main buttons */
.btn-primary-k {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--k-primary), var(--k-primary-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), .28);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary-k:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(var(--bs-primary-rgb), .36); }

.btn-outline-k {
  padding: .7rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--k-ink);
  background: transparent;
  color: var(--k-ink);
  font-weight: 800;
  transition: background .2s, color .2s;
}
.btn-outline-k:hover { background: var(--k-ink); color: var(--bs-body-bg); border-color: var(--k-ink); }

/* Quantity stepper (− 1 +) */
.qty-stepper {
  display: flex; align-items: center;
  border-radius: 999px;
  background: var(--k-soft);
  padding: .25rem;
}
.qty-stepper button {
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--k-surface);
  color: var(--k-ink);
  display: grid; place-items: center;
}
.qty-stepper button:hover:not(:disabled) { color: var(--k-primary); }
.qty-stepper button:disabled { opacity: .4; }
.qty-stepper output { min-width: 2.2rem; text-align: center; font-weight: 800; font-size: 1.05rem; }


/* ===================== 9. FOOTER AND TOAST ===================== */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  padding-bottom: 5.5rem; /* room for the language button */
  border-top: 1px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.toast { background: var(--k-ink); color: var(--bs-body-bg); font-weight: 700; border-radius: 12px; }
.toast .btn-close { filter: invert(1) grayscale(1); }
[data-bs-theme="dark"] .toast .btn-close { filter: none; }

/* ===================== 10. LANGUAGE BUTTON =====================
   Created by js/i18n.js on every page. */
.lang-toggle {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 1060;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;
  background: linear-gradient(135deg, var(--k-primary), var(--k-primary-2));
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(var(--bs-primary-rgb), .38);
  transition: transform .2s, box-shadow .2s;
}
.lang-toggle i { font-size: 1.05rem; margin-bottom: 2px; }
.lang-toggle:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 28px rgba(var(--bs-primary-rgb), .45); }
.lang-toggle.is-flipping { animation: lang-flip .45s ease; }
@keyframes lang-flip {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}

/* Keeps toasts above the round language button */
.toast-above-lang { bottom: 80px; }

/* ===================== 11. REDUCED MOTION =====================
   Respects the OS "reduce motion" setting (accessibility). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
