/* ============================================================
   XCloudGame style theme — light gaming-portal look
   Palette: red #dc2d2d / hover #fe3f39, bg #f7f8fb/#fff,
   text #333/#666, borders #e3e3e3, footer black #000
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

/* ---------- Bootstrap variable overrides (light) ---------- */
:root, [data-bs-theme=light] {
  --bs-body-bg: #f7f8fb;
  --bs-body-color: #333333;
  --bs-primary: #dc2d2d;
  --bs-primary-rgb: 220, 45, 45;
  --bs-secondary-color: #666666;
  --bs-tertiary-bg: #ffffff;
  --bs-secondary-bg: #f0f1f4;
  --bs-border-color: #e3e3e3;
  --bs-link-color: #dc2d2d;
  --bs-link-color-rgb: 220, 45, 45;
  --bs-link-hover-color: #fe3f39;
  --bs-link-hover-color-rgb: 254, 63, 57;
  --bs-emphasis-color: #111111;
  --bs-heading-color: #222222;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f7f8fb;
  color: #333;
}

h1,h2,h3,h4,h5,.h1,.h2,.h3 {
  font-family: 'Oswald', 'Roboto', sans-serif;
  color: #222;
  letter-spacing: .3px;
}

/* section titles: red italic uppercase like xcloudgame */
.products-section-title, .featured-products__title, h2.h2 {
  color: #dc2d2d !important;
  font-family: 'Oswald', sans-serif;
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ---------- Header ---------- */
.header-top, .header__top, #header .header-nav {
  background: #ffffff !important;
  color: #333 !important;
  border-bottom: 1px solid #ececec;
}
#header, .header-bottom, .header__bottom {
  background: #ffffff !important;
}
#header a, .header-nav a, .header__right a { color: #333 !important; }
#header .ps-contactinfo__phone { color: #dc2d2d !important; font-weight: 600; }

/* search bar */
#search_widget input, .search-widget input {
  background: #f2f3f6 !important;
  border: 1px solid #e3e3e3 !important;
  color: #333 !important;
  border-radius: 3px !important;
}
#search_widget input::placeholder { color: #999 !important; }
#search_widget button svg, .search-widget button svg { fill: #dc2d2d; color: #dc2d2d; }

/* cart / account icons */
.header .blockcart, .header .user-info { color: #333 !important; }
.blockcart__count, .cart-products-count {
  background: #dc2d2d !important; color: #fff !important;
}

/* language & currency selectors */
.language-selector, .currency-selector { color:#333 !important; }
.language-selector .dropdown-menu, .currency-selector .dropdown-menu {
  background:#fff; border:1px solid #e3e3e3;
}

/* ---------- Catalog button + panel (light re-skin) ---------- */
.xc-catalog-btn, #catalog-menu-btn, .catalog-nav__btn {
  background: #dc2d2d !important;
  color: #fff !important;
  border: none !important;
  border-radius: 3px !important;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.xc-catalog-btn:hover, #catalog-menu-btn:hover, .catalog-nav__btn:hover { background: #fe3f39 !important; }

.catalog-panel, #catalog-panel {
  background: #ffffff !important;
  border: 1px solid #e3e3e3 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.12) !important;
  color: #333 !important;
}
.catalog-panel a, #catalog-panel a { color: #333 !important; }
.catalog-panel a:hover, #catalog-panel a:hover { color: #dc2d2d !important; background: #f7f2f2 !important; }
.catalog-panel .cat-level1 .active, #catalog-panel .cat-level1 li.active > a {
  background: #dc2d2d !important; color: #fff !important;
}
.catalog-panel h4, #catalog-panel h4 { color: #dc2d2d !important; }
.catalog-backdrop { background: rgba(0,0,0,.35) !important; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .add-to-cart, button[data-button-action="add-to-cart"] {
  background: #dc2d2d !important;
  border-color: #dc2d2d !important;
  color: #fff !important;
  border-radius: 3px !important;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .15s ease, transform .1s ease;
}
.btn-primary:hover, .add-to-cart:hover, button[data-button-action="add-to-cart"]:hover {
  background: #fe3f39 !important; border-color: #fe3f39 !important;
}
.btn-primary:active { transform: scale(.98); }
.btn-outline-primary { color:#dc2d2d !important; border-color:#dc2d2d !important; border-radius:3px !important; }
.btn-outline-primary:hover { background:#dc2d2d !important; color:#fff !important; }

/* ---------- Product cards ---------- */
.product-miniature, .product-miniature__inner, .js-product-miniature {
  background: #ffffff !important;
  border: 1px solid #e7e7ea !important;
  border-radius: 4px !important;
  transition: box-shadow .18s ease, transform .18s ease;
}
.product-miniature:hover { box-shadow: 0 6px 18px rgba(0,0,0,.10); transform: translateY(-2px); }
.product-miniature .product-miniature__title, .product-title a {
  color: #333 !important; font-weight: 500;
}
.product-miniature .product-miniature__title:hover, .product-title a:hover { color: #dc2d2d !important; }
.price, .product-price, .current-price-value { color: #dc2d2d !important; font-weight: 700; }
.regular-price { color: #999 !important; }
.discount-percentage, .discount-amount, .product-flag.discount {
  background: #dc2d2d !important; color: #fff !important; border-radius: 2px !important;
}
.product-flag.new { background: #333 !important; color: #fff !important; border-radius: 2px !important; }

/* thumbnails container */
.product-miniature__thumbnail, .thumbnail-container { background:#fff !important; }

/* ---------- Carousel ---------- */
.carousel, .ps-imageslider { background: #ffffff; }
.carousel-item img { border-radius: 0; }
figcaption.carousel-caption, .ps-imageslider__figcaption { display: none !important; }
.carousel-indicators [data-bs-target] { background-color: #dc2d2d !important; }
.carousel-control-prev-icon, .carousel-control-next-icon { filter: invert(35%) sepia(80%) saturate(4000%) hue-rotate(340deg); }

/* ---------- Banner / newsletter ---------- */
.ps-banner, .banner { background: transparent; }
.ps-emailsubscription, .block_newsletter, .ps-emailsubscription.bg-body-tertiary {
  background: #ffffff !important;
  border-top: 3px solid #dc2d2d;
  color: #333 !important;
}
.ps-emailsubscription h4, .block_newsletter h4, .ps-emailsubscription p { color: #333 !important; }
.ps-emailsubscription input {
  background:#f2f3f6 !important; border:1px solid #e3e3e3 !important; color:#333 !important;
}
.ps-emailsubscription .btn { background:#dc2d2d !important; color:#fff !important; }

/* ---------- Footer (black like xcloudgame) ---------- */
.footer, #footer, .page-footer + footer, footer.js-footer {
  background: #000000 !important;
  color: #cccccc !important;
}
.footer a, #footer a { color: #cccccc !important; }
.footer a:hover, #footer a:hover { color: #fe3f39 !important; }
.footer h5, .footer .h5, #footer h5, .footer__title { color: #ffffff !important; font-family:'Oswald',sans-serif; text-transform:uppercase; letter-spacing:1px; }
.footer hr, #footer hr { border-color: #2a2a2a !important; }
.footer .xc-legal, .footer small { color: #9a9a9a !important; }

/* store info block inside footer */
.footer .block-contact, #footer .block-contact { color:#ccc !important; }

/* ---------- Breadcrumbs & facets ---------- */
.breadcrumb { background: transparent; }
.breadcrumb a { color:#666 !important; }
.breadcrumb .active { color:#dc2d2d !important; }
#search_filters, .facets {
  background:#fff !important; border:1px solid #e7e7ea !important; border-radius:4px;
}
#search_filters a, .facets a { color:#333 !important; }
#search_filters .facet__title { color:#dc2d2d !important; font-family:'Oswald',sans-serif; text-transform:uppercase; }

/* pagination */
.pagination .page-link { color:#333; border-color:#e3e3e3; }
.pagination .active .page-link, .pagination .page-link:hover { background:#dc2d2d; color:#fff; border-color:#dc2d2d; }

/* ---------- Checkout ---------- */
.checkout-step, .order-checkout, #checkout .card {
  background:#fff !important; border:1px solid #e7e7ea !important; color:#333 !important;
}
#checkout .step-title, .checkout-step .step-title { color:#222 !important; font-family:'Oswald',sans-serif; }
#checkout input, #checkout select, #checkout textarea {
  background:#fff !important; border:1px solid #d9d9de !important; color:#333 !important;
}
.cart-summary, .cart-detailed-totals { background:#fff !important; border:1px solid #e7e7ea; color:#333 !important; }

/* forms global */
input.form-control, select.form-select, textarea.form-control {
  background:#fff !important; border:1px solid #d9d9de !important; color:#333 !important; border-radius:3px !important;
}
input.form-control:focus, select.form-select:focus { border-color:#dc2d2d !important; box-shadow:0 0 0 .15rem rgba(220,45,45,.15) !important; }
label, .form-label { color:#444 !important; }

/* ---------- Cookie consent banner (light re-skin) ---------- */
#cookie-consent-banner, .cookie-banner {
  background: #ffffff !important;
  border-top: 3px solid #dc2d2d !important;
  color: #333 !important;
  box-shadow: 0 -6px 24px rgba(0,0,0,.12) !important;
}
#cookie-consent-banner a { color: #dc2d2d !important; }
#cookie-consent-banner .cookie-accept-all { background:#dc2d2d !important; color:#fff !important; border-radius:3px !important; }
#cookie-consent-banner .cookie-necessary-only { background:#f0f1f4 !important; color:#333 !important; border:1px solid #d9d9de !important; border-radius:3px !important; }
.cookie-settings-link { color:#9a9a9a !important; }

/* ---------- Modals & dropdowns ---------- */
.modal-content { background:#fff !important; color:#333 !important; }
.dropdown-menu { background:#fff !important; border:1px solid #e3e3e3 !important; }
.dropdown-menu a { color:#333 !important; }
.dropdown-menu a:hover { color:#dc2d2d !important; background:#f7f2f2 !important; }

/* offcanvas mobile menu — light */
.offcanvas, .offcanvas-body { background:#ffffff !important; color:#333 !important; }
.offcanvas a, .offcanvas-body a { color:#333 !important; }
.offcanvas a:hover { color:#dc2d2d !important; }
.offcanvas .btn-close { filter:none; }

/* misc: alerts */
.alert-success { background:#eaf7ea; color:#1d6b1d; border-color:#bfe3bf; }
.alert-danger { background:#fdeaea; color:#a02020; border-color:#f2c4c4; }

/* reassurance icons row */
.blockreassurance, #block-reassurance { background:#fff !important; color:#333 !important; }
#block-reassurance li, .blockreassurance p { color:#333 !important; }

/* scroll-to-top etc accents */
.back-to-top { background:#dc2d2d !important; color:#fff !important; }

/* ===== light re-definition of legacy --lm-* vars (xcloud palette) ===== */
:root {
  --lm-accent: #dc2d2d;
  --lm-accent-text: #ffffff;
  --lm-bg-2: #ffffff;
  --lm-bg-3: #f7f2f2;
  --lm-text: #333333;
  --lm-text-muted: #666666;
  --lm-border: #e3e3e3;
  --lm-border-lit: #cccccc;
}

/* ============================================================
   Catalog navigation (Rozetka/Ozon style)
   One "Каталог" button opens a panel:
     left column  = level-1 categories (vertical list)
     right area   = level-2 categories of the hovered level-1
   Built by catalog_nav.js from the existing ps_mainmenu DOM.
   ============================================================ */

/* hide the original flat menu tree completely (desktop) */
.ps-mainmenu__desktop .ps-mainmenu__tree { display: none !important; }

/* catalog button */
.lm-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lm-accent);
  color: var(--lm-accent-text);
  border: none;
  border-radius: 8px;
  font: 600 14px/1 'Manrope', sans-serif;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.lm-catalog-btn:hover { background: #fe3f39; }
.lm-catalog-btn:active { transform: scale(0.98); }
.lm-catalog-btn .lm-burger {
  display: inline-block;
  width: 16px; height: 12px;
  position: relative;
}
.lm-catalog-btn .lm-burger::before,
.lm-catalog-btn .lm-burger::after,
.lm-catalog-btn .lm-burger span {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--lm-accent-text);
}
.lm-catalog-btn .lm-burger::before { top: 0; }
.lm-catalog-btn .lm-burger span   { top: 5px; }
.lm-catalog-btn .lm-burger::after { top: 10px; }

/* panel overlay */
.lm-catalog-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1080;
  display: none;
  background: var(--lm-bg-2);
  border-top: 2px solid var(--lm-accent);
  border-bottom: 1px solid var(--lm-border);
  box-shadow: 0 24px 48px rgba(0,0,0,0.15);
}
.lm-catalog-panel.open { display: block; }
.lm-catalog-panel__inner {
  display: flex;
  max-width: 1320px;
  margin: 0 auto;
  min-height: 420px;
  max-height: 70vh;
}

/* left: level-1 list */
.lm-catalog-cats {
  flex: 0 0 300px;
  border-right: 1px solid var(--lm-border);
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--lm-border-lit) transparent;
}
.lm-catalog-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font: 500 14px/1.3 'Manrope', sans-serif;
  color: var(--lm-text);
  cursor: pointer;
  text-decoration: none;
}
.lm-catalog-cat::after {
  content: '›';
  color: var(--lm-text-muted);
  font-size: 16px;
  margin-left: 8px;
}
.lm-catalog-cat:hover, .lm-catalog-cat.active {
  background: var(--lm-bg-3);
  color: var(--lm-accent);
}
.lm-catalog-cat:hover::after, .lm-catalog-cat.active::after { color: var(--lm-accent); }

/* right: level-2 grid */
.lm-catalog-subs {
  flex: 1 1 auto;
  padding: 24px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--lm-border-lit) transparent;
}
.lm-catalog-subs__title {
  font: 700 18px/1.2 'Manrope', sans-serif;
  color: var(--lm-text);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  display: block;
  text-decoration: none;
}
.lm-catalog-subs__title:hover { color: var(--lm-accent); }
.lm-catalog-subs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 28px;
}
.lm-catalog-sub {
  font: 400 13.5px/1.45 'Manrope', sans-serif;
  color: var(--lm-text-muted);
  text-decoration: none;
  padding: 6px 0;
  display: block;
}
.lm-catalog-sub:hover { color: var(--lm-accent); }

/* position context for the panel: attach to the menu row */
.ps-mainmenu--desktop, .header-bottom { position: relative; }

/* backdrop */
.lm-catalog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1030;
  display: none;
}
/* keep header above the backdrop so the panel stays interactive */
#header { position: relative; z-index: 1050; }
.lm-catalog-backdrop.open { display: block; }

@media (max-width: 1199px) {
  .lm-catalog-btn { display: none; } /* mobile keeps the burger menu of the theme */
}
/* Cookie consent banner — LinkMe dark style */
#lm-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10500;
  background: #ffffff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 720px;
  margin: 0 auto;
}
#lm-cookie-banner .lm-cc-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}
#lm-cookie-banner .lm-cc-text {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #333333;
}
#lm-cookie-banner .lm-cc-text a {
  color: #dc2d2d;
  text-decoration: underline;
}
#lm-cookie-banner .lm-cc-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
#lm-cookie-banner .lm-cc-btn {
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cccccc;
  background: transparent;
  color: #333333;
  transition: all 0.15s ease;
}
#lm-cookie-banner .lm-cc-btn:hover {
  border-color: #999999;
}
#lm-cookie-banner .lm-cc-accept {
  background: #dc2d2d;
  border-color: #dc2d2d;
  color: #ffffff;
}
#lm-cookie-banner .lm-cc-accept:hover {
  background: #fe3f39;
}
@media (max-width: 576px) {
  #lm-cookie-banner .lm-cc-actions {
    width: 100%;
  }
  #lm-cookie-banner .lm-cc-btn {
    flex: 1;
  }
}

/* ===== structural fixes: hide flat menu & offcanvas duplicates on desktop ===== */
.ps-mainmenu__desktop .ps-mainmenu__tree { display: none !important; }
/* the visible text dump under the header comes from the menu markup shown
   before JS builds the catalog panel — hide the raw tree everywhere on desktop */
@media (min-width: 1200px) {
  .ps-mainmenu__tree, .ps-mainmenu .top-menu { display: none !important; }
}
/* menu row hosts the catalog button */
.ps-mainmenu { background: #ffffff !important; border-bottom: 2px solid #dc2d2d; }
/* lm catalog button spacing inside menu bar */
.lm-catalog-btn { margin: 8px 0; }
