:root {
    --brand-primary:   #5E2CA5;
    --brand-secondary: #421886;
    --brand-lightest:  #F3E8FF;
    --brand-light:     #C4B5FD;
    --brand-neutral:   #4A4A4A;
    --brand-white:     #FFFFFF;

    /* Bootstrap overrides */
    --bs-primary:      var(--brand-primary);
    --bs-body-bg:      var(--brand-white);
    --bs-body-color:   var(--brand-neutral);
}

.btn-primary {
    color: var(--brand-white);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transition: background-color 0.3s, color 0.3s, transform 0.15s, box-shadow 0.3s;
}

.btn-primary:hover {
    color: var(--brand-primary);
    background-color: var(--brand-white);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--bs-font-sans-serif);
}

a {
    color: var(--brand-secondary, #421886);
}


/* ===========================
   THEME TOKENS
   =========================== */
:root{
  --purple-50:#f4effc;
  --purple-100:#ebe3ff;
  --purple-200:#d7c7ff;
  --purple-300:#b59bff;
  --purple-400:#8f7bff;
  --purple-500:#5E2CA5; /* brand */
  --purple-600:#4b2186;
  --purple-700:#3b176b;
  --ink-900:#161625;
  --ink-700:#2a2a44;
  --ink-600:#3f3f63;
  --ink-500:#5f5f8c;
  --ink-400:#8f8fb0;
  --card:#ffffff;
  --muted:#f6f5fb;
  --radius:12px;
  --shadow-lg:0 24px 64px rgba(94,44,165,.18);
  --shadow-md:0 12px 30px rgba(94,44,165,.16);
  --shadow-sm:0 6px 16px rgba(0,0,0,.08);
  --ease:.25s cubic-bezier(.4,.2,.2,1);
}

/* Background with subtle gradient + noise */
body{
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(143,123,255,.22), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(94,44,165,.20), transparent 60%),
    linear-gradient(180deg, #faf9ff 0%, #ffffff 70%);
  color: var(--ink-900);
}

/* Container breathing room */
.container.py-4{ position:relative; z-index:1; max-width:1250px; }

/* ===========================
   GENERAL ACCESSIBILITY
   =========================== */
a:focus-visible, button:focus-visible{
  outline:3px solid rgba(94,44,165,.75);
  outline-offset:2px;
}
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

/* ===========================
   BADGES / BUTTONS / LINKS
   =========================== */
.badge{ font-weight:600; }

/* Primary button */
.get-code-btn{
  background: var(--purple-500);
  color:#fff;
  border:none;
  padding:.65rem 1.1rem;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  transition: transform .15s ease, box-shadow var(--ease), filter var(--ease);
  box-shadow: var(--shadow-sm);
}
.get-code-btn:hover{ transform: translateY(-1px); filter:brightness(1.05); box-shadow: var(--shadow-md); }
.get-code-btn:active{ transform: translateY(0); }

/* Link button */
.visit-store-link{
  font-size:.9rem;
  text-decoration:none;
  color: var(--purple-500);
  font-weight:700;
  transition: color var(--ease), text-decoration-color var(--ease);
  text-underline-offset: 3px;
}
.visit-store-link:hover{ color: var(--purple-400); text-decoration: underline; }

/* ===========================
   SIDEBAR (CATEGORIES)
   =========================== */

#category-list{ padding:0; margin:0; }
#category-list li{ margin-bottom:.5rem; }

#category-list a,
#category-list div{
  position:relative;
  display:flex;
  align-items:center;
  gap:.6rem;
  padding:.55rem .8rem;
  border-radius:10px;
  text-transform:uppercase;
  letter-spacing:.4px;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}

/* FIX: use proper var() here */
#category-list a{
  color: var(--ink-700);
  background: rgba(255,255,255,.6);
  text-decoration:none;
  border:1px solid rgba(94,44,165,.08);
}
#category-list a .badge{
  background: rgba(94,44,165,.12);
  color: var(--purple-600);
}
#category-list a:hover{
  background:#fff;
  box-shadow: var(--shadow-sm);
}

#category-list .active,
#category-list div{
  background:#fff;
  color: var(--purple-600);
  font-weight:800;
  box-shadow: var(--shadow-sm);
  border:1px solid rgba(94,44,165,.12);
}
#category-list .active .badge,
#category-list div .badge{
  background: var(--purple-500);
  color:#fff;
}

/* Title inside sidebar */
aside h5{
  font-weight:800;
  color: var(--ink-700);
  letter-spacing:.3px;
}

/* ===========================
   STORE CARD
   =========================== */
.store-card{
  display:flex;
  gap:1rem;
  padding:1rem;
  background: var(--card);
  border:1px solid rgba(94,44,165,.10);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  transition: transform .15s ease, box-shadow var(--ease), border-color var(--ease);
}
.store-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(94,44,165,.18); }

/* Logo panel */
.store-logo-wrapper{
  flex-shrink:0;
  width: 200px; min-width:200px;
  display:flex; align-items:center; justify-content:center;
  background: var(--muted);
  border-radius: 10px;
  border:1px dashed rgba(94,44,165,.12);
  overflow:hidden;
}
.store-img{
  max-width:100%;
  width:200px; height:auto; object-fit:contain;
  filter: saturate(1.05);
}
@media (max-width: 767px){
  .store-logo-wrapper{ width:120px; min-width:120px; }
  .store-img{ width:120px; }
}

/* Titles & urls */
.store-title{ margin:0; }
.store-title a{
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height:1.1;
  color: var(--ink-900);
  text-decoration:none;
}
.store-url a{
  font-size:.78rem;
  color: var(--ink-400);
  word-break: break-all;
}

/* Meta line */
.card-body-custom{ display:flex; flex-direction:column; gap:.75rem; }
.meta-line{
  display:flex; gap:6px; flex-wrap:wrap;
  font-size:.65rem;
}
.badge-category{
  background: rgba(94,44,165,.08);
  color: var(--purple-600);
  font-weight:700;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  font-size:.58rem;
  letter-spacing:.4px;
}
.badge-shipping{
  background: rgba(98,170,255,.15);
  color:#2673d9;
  padding:4px 10px;
  border-radius:999px;
  font-size:.58rem;
  font-weight:700;
}
.badge-country{
  background: rgba(0,0,0,.06);
  color:#333;
  padding:4px 10px;
  border-radius:8px;
  font-size:.58rem;
  font-weight:700;
}

/* Discount badge ribbon */
.discount-badge{
  position:absolute; top:12px; right:12px;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-500));
  color:#fff;
  padding:.5rem .85rem;
  font-weight:900;
  border-radius:10px;
  font-size:.78rem;
  letter-spacing:.5px;
  text-transform:uppercase;
  box-shadow: var(--shadow-sm);
}

/* Responsive stack */
@media (max-width: 991px){
  .store-card{ flex-direction:column; }
}

/* ===========================
   PAGINATION
   =========================== */
.pagination .page-link{
  border-radius:10px;
  border:1px solid rgba(94,44,165,.15);
  transition: background var(--ease), color var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.pagination .page-item.active .page-link{
  background: var(--purple-500);
  border-color: var(--purple-500);
  color:#fff;
  box-shadow: var(--shadow-sm);
}
.pagination .page-link:hover{
  background:#fff;
  border-color: rgba(94,44,165,.35);
  box-shadow: var(--shadow-sm);
}

/* ===========================
   UTILITIES
   =========================== */
.bg-primary{ background-color: var(--purple-500) !important; }
.bg-secondary{ background-color: var(--purple-500) !important; }
.hover-bg-secondary:hover{ color:#fff; background-color: var(--purple-500); }
.hover-bg-secondary:hover .bg-secondary{ border:1px solid #fff; }

/* Skeleton shimmer (optional) */
.skeleton{
  background: linear-gradient(90deg, rgba(238,238,255,.5) 25%, rgba(255,255,255,.75) 50%, rgba(238,238,255,.5) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius:10px;
}
@keyframes shimmer{ 0%{ background-position: 200% 0; } 100%{ background-position: -200% 0; } }

/* Sponsored store highlight */
.store-card.sponsored {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, var(--purple-400), var(--purple-500)) border-box;
  position: relative;
}
.store-card.sponsored::before {
  content: "★ Препоръчано от YCARD";
  position: absolute;
  top: -12px;
  left: 248px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.store-card.sponsored:hover {
  box-shadow: var(--shadow-lg);
}

/* Spotlight HERO (sidebar) */
.spotlight-hero{
  position: relative;
  margin-top: 1rem;
  min-height: 260px;                 /* bigger height */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(94,44,165,.18);
  background: linear-gradient(135deg, rgba(94,44,165,.10), rgba(143,123,255,.18));
  box-shadow: 0 12px 30px rgba(94,44,165,.12);
  display: grid;
  grid-template-columns: 1fr 140px;  /* text | image */
  gap: 0;
}

.spotlight-hero .bg-accent{
  position:absolute; inset:0;
  background:
    radial-gradient(600px 220px at -10% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(400px 240px at 110% 100%, rgba(94,44,165,.25), transparent 60%);
  pointer-events:none;
}

.spotlight-hero .content{
  position: relative;
  padding: 1rem 1rem 1rem 1.1rem;
  display:flex; flex-direction:column; justify-content:center;
  z-index:1;
}

.spotlight-hero .eyebrow{
  display:inline-flex; align-items:center; gap:.4rem;
  background:#fff; color:#5E2CA5; font-weight:900; letter-spacing:.4px;
  font-size:.72rem; text-transform:uppercase; padding:.25rem .6rem; border-radius:999px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  width: fit-content;
}

.spotlight-hero .title{
  margin:.55rem 0 .25rem 0;
  font-weight:900; line-height:1.05;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color:#161625;
}

.spotlight-hero .url{
  margin:0 0 .5rem 0; font-size:.8rem; color:#8f8fb0; word-break: break-all;
}

.spotlight-hero .cta{
  display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; margin-top:.25rem;
}
.spotlight-hero .btn{
  appearance:none; border:none; cursor:pointer; text-decoration:none;
  padding:.55rem .85rem; border-radius:12px; font-weight:900; font-size:.85rem;
  transition: transform .15s ease, box-shadow .25s ease, filter .25s ease;
}
.spotlight-hero .btn-primary{
  background:#5E2CA5; color:#fff; box-shadow:0 10px 28px rgba(94,44,165,.25);
}
.spotlight-hero .btn-primary:hover{ transform:translateY(-1px); filter:brightness(1.05); }
.spotlight-hero .btn-link{ color:#5E2CA5; background:transparent; padding:.45rem 0; }

.spotlight-hero .discount{
  display:inline-flex; align-items:center; gap:.35rem;
  background: linear-gradient(135deg, #8f7bff, #5E2CA5);
  color:#fff; font-weight:900; font-size:.78rem; padding:.3rem .6rem; border-radius:999px;
  box-shadow: 0 6px 14px rgba(94,44,165,.25);
  margin-left:.4rem;
}

.spotlight-hero .media{
  position: relative; z-index:1;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.55);
  border-left:1px solid rgba(94,44,165,.18);
}
.spotlight-hero .media .frame{
  width: 100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  padding: .5rem;
}
.spotlight-hero .media img{
  max-width:100%; max-height:100%; object-fit:contain;
  filter: saturate(1.05);
}

/* Stack on small screens (still in sidebar) */
@media (max-width: 991px){
  .spotlight-hero{
    grid-template-columns: 1fr;
    min-height: 240px;
  }
  .spotlight-hero .media{
    border-left:none; border-top:1px solid rgba(94,44,165,.18);
    min-height:120px;
  }
}

.spotlight-hero + .spotlight-hero{ margin-top:.75rem; }
#recommended-list { margin-bottom: 1.75rem; }


/* ==== Brand pagination (pills) ==== */
/* === YCard Pagination v3 (crisp) === */
:root{ --yc-purple: var(--purple-500, #5E2CA5); --yc-ink:#2a2a44; }

.yc-pager{ display:flex; justify-content:center; margin-top:1.25rem; }
.yc-pager .pagination{ gap:.5rem; align-items:center; }

.yc-pager .page-item{ display:flex; }

/* Base button */
.yc-pager .page-link{
  display:flex; align-items:center; justify-content:center;
  height: 40px; min-width: 40px; padding:0 .9rem;
  border-radius: 12px;
  background:#fff; color: var(--yc-ink);
  border:1px solid rgba(94,44,165,.18);
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.yc-pager .page-link i{ font-size:1.1rem; line-height:1; }

/* Hover (only when enabled) */
.yc-pager .page-item:not(.disabled) .page-link:hover{
  transform: translateY(-1px);
  border-color: rgba(94,44,165,.35);
  box-shadow: 0 8px 20px rgba(94,44,165,.18);
}

/* Center info pill — ALWAYS vivid */
.yc-pager .page-item.current-info .page-link{
  background: var(--yc-purple);
  color:#fff;
  border-color: transparent;
  padding:0 18px; min-width:auto;
  border-radius: 999px; font-weight:800;
  box-shadow: 0 10px 24px rgba(94,44,165,.28);
}

/* Disabled arrows: keep contrast, just lower opacity a touch */
.yc-pager .page-item.disabled:not(.current-info) .page-link{
  background: #fff;
  color: #9a98b3;
  border-color: rgba(94,44,165,.18);
  box-shadow: none; pointer-events:none; opacity:.7;
}

/* Focus ring */
.yc-pager .page-link:focus-visible{
  outline:3px solid rgba(94,44,165,.35);
  outline-offset:2px;
}


/* Reset all buttons to fully rounded first */
.yc-pager .page-link {
  border-radius: 999px;
}

/* Prev button (left arrow) — flat right side */
.yc-pager .page-item:first-child .page-link {
  border-radius: 999px 8px 8px 999px;
}

/* Next button (right arrow) — flat left side */
.yc-pager .page-item:last-child .page-link {
  border-radius: 8px 999px 999px 8px;
}



:root{
  --purple-50:#f4effc; --purple-100:#ebe3ff; --purple-400:#8f7bff; --purple-500:#5E2CA5; --purple-600:#4b2186;
  --ink-900:#161625; --ink-700:#2a2a44; --ink-600:#3f3f63; --ink-400:#8f8fb0;
  --card:#fff; --muted:#f6f5fb; --radius:14px;
  --shadow-sm:0 6px 16px rgba(0,0,0,.08); --shadow-md:0 14px 34px rgba(94,44,165,.18);
  --ease:.25s cubic-bezier(.4,.2,.2,1);
}

.store-hero{
  border-radius: var(--radius);
  background:
    radial-gradient(900px 400px at 0% -10%, rgba(143,123,255,.22), transparent 60%),
    radial-gradient(900px 400px at 100% 110%, rgba(94,44,165,.18), transparent 60%),
    linear-gradient(180deg, #faf9ff 0%, #fff 60%);
  padding: 1.25rem;
  border: 1px solid rgba(94,44,165,.12);
  box-shadow: var(--shadow-sm);
}
.store-hero .top{ display:flex; gap:1.25rem; align-items:stretch; flex-wrap:wrap; }

.logo-wrap{
  flex:0 0 220px; max-width:220px; min-height:160px;
  display:flex; align-items:center; justify-content:center;
  background: var(--muted); border-radius: 12px; overflow:hidden;
  border:1px dashed rgba(94,44,165,.15);
}
.logo-wrap img{ width:100%; height:auto; object-fit:contain; }

.store-head{ flex:1; display:flex; flex-direction:column; gap:.5rem; min-width:260px; }

.store-title{
  margin:0; font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 900; color: var(--ink-900); line-height:1.05;
}
.store-url a{ color: var(--ink-400); text-decoration:none; word-break: break-all; }
.store-url a:hover{ text-decoration: underline; }

.discount-badge{
  align-self:flex-start;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-500));
  color:#fff; font-weight:900; letter-spacing:.4px;
  padding:.45rem .8rem; border-radius:10px; font-size:.85rem; text-transform:uppercase;
  box-shadow: var(--shadow-sm);
}

.meta{ display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.25rem; }
.pill{
  background:#fff; border:1px solid rgba(94,44,165,.15);
  color:#3b2f66; padding:.35rem .6rem; border-radius:999px;
  font-size:.72rem; font-weight:700;
}
.pill.cat{ background: rgba(94,44,165,.08); color: var(--purple-600); border-color: transparent; }

.cta{ display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; margin-top:.6rem; }
.btn-y{
  appearance:none; border:none; cursor:pointer;
  padding:.7rem 1.05rem; border-radius:12px; font-weight:800;
  transition: transform .15s ease, box-shadow var(--ease), filter var(--ease);
}
.btn-primary-y{
  background: var(--purple-500); color:#fff; box-shadow: 0 10px 26px rgba(94,44,165,.25);
}
.btn-primary-y:hover{ transform: translateY(-1px); filter:brightness(1.05); }
.btn-link-y{
  background: transparent; color: var(--purple-600); padding:.55rem .25rem;
}
.btn-link-y:hover{ text-decoration: underline; }

.store-body{
  margin-top: 1rem; padding:1.2rem; border-radius: var(--radius);
  background:#fff; border:1px solid rgba(94,44,165,.12);
  box-shadow: var(--shadow-sm);
  color: var(--ink-600); font-size: 1rem; line-height:1.55;
}

.store-banner{
  margin-top:1rem; border-radius:12px; overflow:hidden;
  border:1px solid rgba(94,44,165,.12);
}
.store-banner img{ width:100%; height:auto; display:block; }

.sidebar-card{
  background:#fff; border:1px solid rgba(94,44,165,.12);
  border-radius:12px; box-shadow: var(--shadow-sm);
  padding:1rem;
}
.sidebar-title{
  margin:0 0 .5rem 0; font-weight:900; color:var(--ink-700); letter-spacing:.3px;
}
#category-list-all{ padding:0; margin:0; list-style:none; }
#category-list-all li{ margin-bottom:.45rem; }
#category-list-all a{
  display:flex; align-items:center; gap:.5rem;
  text-decoration:none; padding:.45rem .6rem; border-radius:10px;
  background: rgba(255,255,255,.6);
  border:1px solid rgba(94,44,165,.08);
  color: var(--ink-700); font-size:.85rem;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease), border-color var(--ease);
}
#category-list-all a:hover{
  background:#fff; box-shadow: var(--shadow-sm); border-color: rgba(94,44,165,.18);
  color: var(--purple-600);
}
#category-list-all a.active{
  background: linear-gradient(135deg, var(--purple-400), var(--purple-500));
  color:#fff; border-color:transparent; box-shadow:0 10px 24px rgba(94,44,165,.28);
}
#category-list-all .badge{
  margin-left:auto; background:rgba(255,255,255,.2); color:#fff; font-weight:800;
}

@media (max-width: 767px){
  .logo-wrap{ flex-basis:140px; max-width:140px; min-height:120px; }
}

/* Make tooltips use the primary theme color */
.tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before,
.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--bs-primary);
}

.tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before,
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--bs-primary);
}

.tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--bs-primary);
}

.tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--bs-primary);
}

.tooltip-inner {
  background-color: var(--bs-primary);
  color: #fff; /* white text for contrast */
}

/* Purple checkboxes */
.form-check-input {
  border-color: #5E2CA5;
}

.form-check-input:checked {
  background-color: #5E2CA5;
  border-color: #5E2CA5;
}

.form-check-input:focus {
  border-color: #5E2CA5;
  box-shadow: 0 0 0 0.25rem rgba(94, 44, 165, 0.25);
}

a {
  text-decoration: none;
}