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

:root {
  /* Core Colors */
  --color-primary: #4A9FFF;
  --color-primary-hover: #FF6B9D;
  --color-primary-text: #0B0B10;
  --color-primary-text-hover: #0B0B10;
  --color-text: #F0F2FA;
  --color-text-darker: #FFFFFF;
  --color-text-secondary: #9BA3BE;
  --color-bg: #06060A;
  --color-brighter-bg: #0E0E14;
  
  /* Background with image at top fading to solid color */
  --bg-image: 
    radial-gradient(ellipse 80% 50% at 20% 15%, rgba(74, 159, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(255, 107, 157, 0.12), transparent),
    linear-gradient(to bottom, rgba(6, 6, 10, 0) 0%, rgba(6, 6, 10, 0.4) 30%, rgba(6, 6, 10, 0.85) 55%, #06060A 70%),
    url("https://i.imgur.com/98o4bEV.jpg");
  
  /* Modern Design Tokens */
  --card-radius: 16px;
  --chip-radius: 12px;
  --glass-bg: rgba(14, 14, 20, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
  --glass-blur: blur(24px);
  
  /* Shadows */
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(74, 159, 255, 0.15), 0 0 80px rgba(255, 107, 157, 0.1);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(74, 159, 255, 0.2);
  --shadow-card-glow: 0 14px 44px rgba(74, 159, 255, 0.28), 0 0 50px rgba(255, 107, 157, 0.18);
  
  /* Gradient accents */
  --gradient-accent: linear-gradient(135deg, #4A9FFF 0%, #6BB8FF 50%, #FF6B9D 100%);
  --gradient-surface: linear-gradient(145deg, rgba(74, 159, 255, 0.05) 0%, transparent 50%, rgba(255, 107, 157, 0.05) 100%);
  --gradient-border: linear-gradient(135deg, rgba(74, 159, 255, 0.3), rgba(255, 107, 157, 0.3));
}

/* Typography & Body */
body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  background: var(--color-bg);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-image);
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Animated background orbs */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(circle 400px at 10% 20%, rgba(74, 159, 255, 0.06), transparent),
    radial-gradient(circle 300px at 90% 80%, rgba(255, 107, 157, 0.05), transparent);
  animation: orbFloat 20s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-secondary,
.btn-tertiary {
  position: relative;
  border-radius: var(--chip-radius);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #0B0B10;
  border: none;
  box-shadow: 0 4px 20px rgba(74, 159, 255, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background-position: 100% 50%;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(74, 159, 255, 0.4), 0 0 20px rgba(255, 107, 157, 0.3);
}

.btn-secondary:not(.btn-icon):not(.btn-glyph),
.btn-tertiary:not(.btn-icon):not(.btn-glyph) {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  color: var(--color-text);
}

.btn-secondary:not(.btn-icon):not(.btn-glyph):hover,
.btn-secondary:not(.btn-icon):not(.btn-glyph):focus,
.btn-tertiary:not(.btn-icon):not(.btn-glyph):hover,
.btn-tertiary:not(.btn-icon):not(.btn-glyph):focus {
  background: rgba(74, 159, 255, 0.15);
  border-color: rgba(74, 159, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 159, 255, 0.2);
}

/* ========== CARDS & CONTAINERS ========== */
.category-description,
.store-text,
.store-products-list .store-product,
.store-products-images .store-product,
.store-product-full,
.store-product-tiered,
.store-category-tiered,
.widget:not(.site-navigation),
.no-products,
.basket-item,
.popup-content,
.media-slider .slider,
.media-slider .thumb {
  position: relative;
  border-radius: var(--card-radius);
  background:
    var(--gradient-surface),
    var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient border effect on hover */
.store-products-list .store-product,
.store-products-images .store-product,
.store-product-tiered {
  background: 
    var(--gradient-surface),
    linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box,
    linear-gradient(135deg, rgba(74, 159, 255, 0.2), rgba(255, 107, 157, 0.2)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
}

.store-products-list .store-product:hover,
.store-products-images .store-product:hover,
.store-product-tiered:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-card-hover);
  background: 
    var(--gradient-surface),
    linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box,
    var(--gradient-border) border-box;
}

.store-products-images .store-product,
.widget .store-product,
.store-products-list .store-product {
  text-align: center;
}

/* Product image hover effect */
.store-product .image-link {
  transition: transform 0.3s ease;
}

.store-product:hover .image-link {
  transform: scale(1.05);
}

/* ========== HEADER ========== */
.site-header-inner {
  position: relative;
}

.site-header-inner .info {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  border: var(--glass-border);
  transition: all 0.3s ease;
}

.site-header-inner .info.discord {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  background: transparent; 
  backdrop-filter: none;
  border: none;
  padding: 0;
}

.site-header-inner .info:hover {
  border-color: rgba(74, 159, 255, 0.3);
  box-shadow: 0 8px 30px rgba(74, 159, 255, 0.15);
}

.site-header-inner .info .image {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
}

.site-header-inner .info.discord .image {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

@media (width > 960px) {
  .site-header-inner .info.discord .image {
    width: 48px;
    height: 48px;
  }
}

/* Inline Discord icon near login */
.discord-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.discord-inline:hover,
.discord-inline:focus {
  transform: translateY(-1px);
}

.discord-inline-image {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

/* Inline FiveM icon near login */
.fivem-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.fivem-inline:hover,
.fivem-inline:focus {
  transform: translateY(-1px);
}

.fivem-inline-image {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

@media (width > 960px) {
  .discord-inline {
    padding: 7px;
  }
  .discord-inline-image {
    width: 28px;
    height: 28px;
  }

  .fivem-inline {
    padding: 7px;
  }
  .fivem-inline-image {
    width: 28px;
    height: 28px;
  }
}

.login-combo {
  position: absolute;
  top: var(--widget-padding);
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.login-combo .log-in {
  position: static;
}

@media (width > 960px) {
  .login-combo {
    top: var(--widget-padding);
    right: 0;
  }
}

/* Basket inline button */
.basket-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--btn-size) - 2px);
  height: calc(var(--btn-size) - 2px);
  border-radius: 8px;
  background: var(--gradient-accent);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 159, 255, 0.3);
  box-sizing: border-box;
}

.basket-inline:hover,
.basket-inline:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 159, 255, 0.4), 0 0 15px rgba(255, 107, 157, 0.3);
}

.basket-inline-icon {
  width: 18px;
  height: 18px;
  display: block;
  stroke: #fff;
  stroke-width: 3;
}

/* User name wrapper (when logged in) */
.user-name-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-name-display {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}

.user-logout-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  background: rgba(255, 107, 157, 0.15);
  border-color: rgba(255, 107, 157, 0.3);
}

.user-name-wrapper:hover .user-name-display {
  opacity: 0;
}

.user-name-wrapper:hover .user-logout-btn {
  opacity: 1;
  visibility: visible;
}

@media (width > 960px) {
  .user-name-display {
    max-width: 120px;
  }
}

.site-header-inner .info .action {
  color: var(--color-primary);
  font-weight: 500;
}

.site-header-inner .info:hover .action {
  color: var(--color-primary-hover);
}

/* Larger Mantra logo */
.site-header-inner .site-title img {
  max-height: 165px;
}
@media (width > 960px) {
  .site-header-inner .site-title img {
    max-height: 270px;
  }
}

/* Soft hero fade into page background */
.page-index .site {
  position: relative;
}

/* Only isolate on desktop - mobile needs nav to escape stacking context */
@media (width > 960px) {
  .page-index .site {
    isolation: isolate;
  }
}

.page-index .site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0) 0%,
    rgba(10, 10, 15, 0.55) 50%,
    rgba(6, 6, 10, 0.9) 100%
  );
}

.page-index .site > * {
  position: relative;
  z-index: 1;
}

/* ========== NAVIGATION ========== */
@media (width > 960px) {
  .navigation-horizontal > ul {
    border-radius: var(--card-radius);
    background:
      var(--gradient-surface),
      var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    padding: 8px 28px;
    gap: 16px;
  }
  
  /* Dividers between nav items */
  .navigation-horizontal .menu > li {
    position: relative;
  }
  
  .navigation-horizontal .menu > li:not(:last-child)::before {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.4) 50%,
      transparent 100%
    );
    pointer-events: none;
  }
  
  .navigation-horizontal .menu > li > a {
    position: relative;
    padding: 12px 28px;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  
  .navigation-horizontal .menu > li > a::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
  }
  
  .navigation-horizontal .menu > li > a:hover::after,
  .navigation-horizontal .menu > li > a.link-active::after {
    width: calc(100% - 56px);
  }
}

.navigation-horizontal .has-children > ul {
  border-radius: var(--card-radius);
  background:
    var(--gradient-surface),
    var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-soft);
}

/* Mobile navigation */
@media (width <= 960px) {
  .site-navigation {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    border-radius: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    box-shadow: none !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    pointer-events: auto !important;
  }
  
  .site-navigation .menu {
    position: absolute;
    inset: 0 60px 0 0;
    z-index: 2147483001;
    background: var(--color-bg);
    border-right: var(--glass-border);
    padding: 72px var(--widget-padding) var(--widget-padding);
    overflow: hidden auto;
    pointer-events: auto;
  }
  
  .site-navigation .close-navigation {
    position: absolute;
    top: 12px;
    right: 72px;
    z-index: 2147483002;
  }
}

/* ========== SALE BANNER ========== */
.site-sale-banner {
  border-radius: var(--card-radius);
  background: var(--gradient-accent);
  color: #0B0B10;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow-glow);
}

/* ========== HOME CATEGORIES ========== */
.site-home-categories .category {
  border-radius: var(--card-radius);
  padding: 24px var(--widget-padding);
  background:
    var(--gradient-surface),
    var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
}

.site-home-categories .category:hover {
  color: var(--color-text);
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(74, 159, 255, 0.3);
}

.site-home-categories .category:hover .image {
  filter: drop-shadow(0 0 20px rgba(74, 159, 255, 0.5));
}

/* ========== WIDGETS ========== */
.widget {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
}

.widget-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== QUANTITY FIELD ========== */
.quantity-field {
  border-radius: var(--chip-radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-product .quantity-field {
  background: rgba(0, 0, 0, 0.3);
}

.store-product .quantity-field input[type=number] {
  border: none;
}

/* ========== TYPOGRAPHY ========== */
.store-text h1,
.store-text h2,
.store-text h3,
.store-text h4,
.store-text h5,
.store-text h6,
.store-category-tiered-header h1,
.store-category-tiered-header h2,
.store-category-tiered-header h3,
.store-category-tiered-header h4,
.store-category-tiered-header h5,
.store-category-tiered-header h6 {
  text-align: center;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.product-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.price strong {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ========== POPUPS & MODALS ========== */
.popup-content {
  background:
    var(--gradient-surface),
    var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-soft);
  padding: calc(var(--widget-padding) * 1.5);
}

.login-popup-content {
  padding: calc(var(--widget-padding) * 2);
}

.popup-close {
  border-radius: 0 var(--card-radius) 0 var(--chip-radius);
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(255, 107, 157, 0.2);
}

/* ========== BASKET ========== */
.basket-popup-content,
.basket-popup-content .popup-close {
  border-radius: 0;
}

.basket-popup-content {
  background: rgba(14, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  border-left: var(--glass-border);
}

.basket .basket-header {
  background: rgba(40, 40, 50, 0.5);
}

.basket .basket-second-header {
  background: rgba(14, 14, 20, 0.7);
}

.basket-items {
  padding: var(--widget-padding) calc(var(--content-padding) - var(--widget-padding));
}

.basket-item {
  background: var(--glass-bg);
  border: var(--glass-border);
}

.basket-item:hover {
  border-color: rgba(74, 159, 255, 0.2);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast {
  border-radius: var(--chip-radius);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glow);
}

.toast-close {
  border-radius: 8px;
}

/* ========== MEDIA SLIDER ========== */
.media-slider .slider,
.media-slider .thumb {
  border-radius: var(--card-radius);
}

.media-slider .thumb {
  transition: all 0.3s ease;
}

.media-slider .thumb:hover {
  border-color: rgba(74, 159, 255, 0.4);
}

.media-slider .open-lightbox {
  border-radius: var(--chip-radius);
}

.popup.popup-media-slider .thumb {
  border-radius: var(--card-radius);
}

.popup.popup-media-slider .popup-close {
  border-radius: var(--card-radius);
}

/* ========== FOOTER ========== */
.site-footer {
  background: linear-gradient(180deg, transparent 0%, rgba(6, 6, 10, 0.9) 100%);
  backdrop-filter: var(--glass-blur);
}

.site-footer-inner {
  border-top: var(--glass-border);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4A9FFF, #FF6B9D);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6BB8FF, #FF8AB3);
}

/* ========== SELECTION ========== */
::selection {
  background: rgba(74, 159, 255, 0.3);
  color: var(--color-text);
}

/* ========== FOCUS STATES ========== */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========== LINKS ========== */
a {
  transition: color 0.3s ease;
}

.link-text:hover {
  color: var(--color-primary);
}
