@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

:root {
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-secondary: #0ea5e9;
  --color-accent: #06b6d4;
  --color-glow: rgba(37, 99, 235, 0.4);
  --bg-image: url("https://webstore-template-assets.tebex.io/images/page-bg.jpg");
  --shadow-primary: 0 4px 20px rgba(37, 99, 235, 0.25);
  --shadow-hover: 0 8px 30px rgba(37, 99, 235, 0.35);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
  font-family: Lato, sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  max-height: 500px;
  z-index: -2;
  background: var(--bg-image) center center/cover no-repeat;
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 100%
  );
  pointer-events: none;
  animation: backgroundPulse 8s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(14, 165, 233, 0.05) 50%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
  animation: ambientGlow 6s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.02); opacity: 1; }
}

@keyframes ambientGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% { box-shadow: var(--shadow-primary); }
  50% { box-shadow: var(--shadow-hover); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-tertiary {
  border-radius: 12px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.btn-primary::before,
.btn-secondary::before,
.btn-tertiary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-tertiary:hover::before {
  left: 100%;
}

.btn-primary:hover, .btn-primary:focus,
.btn-secondary:hover, .btn-secondary:focus,
.btn-tertiary:hover, .btn-tertiary:focus {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.btn-primary:active,
.btn-secondary:active,
.btn-tertiary:active {
  transform: translateY(0);
  transition: var(--transition-bounce);
}

/* Form Elements */
.quantity-field {
  border-radius: 10px;
  transition: var(--transition-smooth);
  border: 2px solid rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.quantity-field:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-glow);
  transform: scale(1.02);
}

/* Header */
.site-header-inner .info .image {
  border-radius: 15px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-primary);
}

.site-header-inner .info .image:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-hover);
}

.site-header-inner .user-name ul li {
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.site-header-inner .user-name ul li:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateX(5px);
}

.site-header-inner .user-name ul li:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.site-header-inner .user-name ul li:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Banners */
.site-sale-banner {
  border-radius: 15px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: var(--shadow-primary);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.site-sale-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

.site-sale-banner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Categories */
.site-home-categories .category {
  border-radius: 15px;
  padding: 25px var(--widget-padding);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
  animation: slideInUp 0.6s ease-out;
  box-shadow: var(--shadow-primary);
}

.site-home-categories .category:hover {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}

.site-home-categories .category:nth-child(even) {
  animation-delay: 0.2s;
}

.site-home-categories .category:nth-child(3n) {
  animation-delay: 0.4s;
}

/* Content Sections */
.category-description,
.store-text {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-primary);
}

.category-description:hover,
.store-text:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.store-text h1,
.store-text h2,
.store-text h3,
.store-text h4,
.store-text h5,
.store-text h6 {
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 2s ease-in-out infinite alternate;
}

/* Products */
.store-products-list .store-product,
.store-products-images .store-product {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-primary);
  animation: float 6s ease-in-out infinite;
}

.store-products-list .store-product:nth-child(even),
.store-products-images .store-product:nth-child(even) {
  animation-delay: -3s;
}

.store-products-list .store-product:hover,
.store-products-images .store-product:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
  background: rgba(37, 99, 235, 0.1);
}

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

/* Widgets */
.widget-title {
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.widget .store-product {
  text-align: center;
  transition: var(--transition-smooth);
}

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

.no-products {
  color: var(--color-text-secondary);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 15px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  backdrop-filter: blur(10px);
}

.store-product-full {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-primary);
  transition: var(--transition-smooth);
}

.store-product-full:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.store-product .quantity-field {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(37, 99, 235, 0.2);
}

.store-product .quantity-field input[type=number] {
  border: none;
  background: transparent;
  transition: var(--transition-smooth);
}

.store-product .quantity-field:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-glow);
}

/* Navigation */
@media (width > 960px) {
  .navigation-horizontal > ul {
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-primary);
  }
}

.navigation-horizontal .has-children > ul {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-hover);
}

/* Widgets */
.widget {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-primary);
  transition: var(--transition-smooth);
  animation: slideInUp 0.6s ease-out;
}

.widget:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

@media (width <= 960px) {
  .widget.site-navigation {
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
  }
}

/* Special Widgets */
.widget-gift-card .gift-card-input {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
}

.widget-gift-card .gift-card-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-glow);
}

.widget-top-donator .avatar {
  border-radius: 50%;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-primary);
}

.widget-top-donator .avatar:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-hover);
}

.widget-community-goal .progress,
.widget-goal .progress {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

.widget-community-goal .progress-bar,
.widget-goal .progress-bar {
  border-radius: 20px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  position: relative;
  overflow: hidden;
}

.widget-community-goal .progress-bar::after,
.widget-goal .progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Popups */
.popup-content {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-hover);
  animation: slideInUp 0.4s ease-out;
}

.popup-close {
  border-radius: 0 20px 0 20px;
  transition: var(--transition-smooth);
  background: rgba(37, 99, 235, 0.1);
}

.popup-close:hover {
  background: var(--color-primary);
  transform: scale(1.1);
}

.basket-popup-content,
.basket-popup-content .popup-close {
  border-radius: 0;
}

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

.basket-item {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
}

.basket-item:hover {
  border-color: var(--color-primary);
  transform: translateX(5px);
}

.basket-item .quantity {
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  transition: var(--transition-smooth);
}

.basket-item .quantity:hover {
  background: rgba(37, 99, 235, 0.2);
}

/* Toast Notifications */
.toast {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-hover);
  animation: slideInUp 0.5s ease-out;
}

.toast-close {
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.toast-close:hover {
  background: var(--color-primary);
  transform: rotate(90deg);
}

/* Tiered Products */
.store-category-tiered {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-primary);
  transition: var(--transition-smooth);
}

.store-category-tiered:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.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;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-product-tiered {
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
}

.store-product-tiered:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}