/* Premium overrides for PROSEV */
:root {
  --primary-color: #0f172a;
  --secondary-color: #334155;
  --accent-color: #3b82f6;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #0f172a;
  --text-light: #64748b;
  --border-color: rgba(0,0,0,0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 16px;
  --radius-lg: 24px;
}

body {
  background-color: var(--bg-light);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Header Glassmorphism */
.header {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: var(--glass-border);
  box-shadow: var(--shadow-sm);
  height: 100px;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
  border-radius: 8px;
}

/* Bento Grid for Categories */
.categories-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: repeat(2, 250px) !important;
  gap: 20px !important;
}

.categories-grid .category-card:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.categories-grid .category-card:nth-child(2) {
  grid-column: span 2;
  grid-row: span 1;
}

.categories-grid .category-card:nth-child(3) {
  grid-column: span 2;
  grid-row: span 1;
}

/* Card Styling */
.category-card, .product-card {
  background: var(--bg-white) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: var(--shadow-md) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
  position: relative;
}

.category-card:hover, .product-card:hover {
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow: var(--shadow-lg) !important;
}

.category-image, .product-image {
  background-color: transparent !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.category-card:nth-child(1) .category-image {
  height: 70%;
}

.categories-grid .category-card:nth-child(2) .category-image,
.categories-grid .category-card:nth-child(3) .category-image {
  height: 55%;
}

.category-info h3, .product-name {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Buttons */
.btn-primary, .action-btn, .product-action-btn {
  border-radius: 50px !important;
}

/* Hero Section */
.hero {
  margin-top: 100px !important;
  border-radius: var(--radius-lg);
  margin-left: 20px;
  margin-right: 20px;
  box-shadow: var(--shadow-lg);
}

.slide-content h2 {
  font-size: 4rem !important;
  letter-spacing: -1.5px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.slide-overlay {
  background: linear-gradient(to right, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 100%) !important;
}

/* Toast Notification Premium */
#toast {
  background: var(--primary-color) !important;
  color: white !important;
  border-radius: 50px !important;
  padding: 15px 30px !important;
  font-weight: 500 !important;
  box-shadow: var(--shadow-lg) !important;
  bottom: 40px !important;
}

/* === Mobile Menu Overlay === */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  backdrop-filter: blur(4px);
}

.menu-toggle {
  display: none;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .mobile-overlay {
  display: block;
}

body.nav-open .nav-menu {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 999;
  padding: 100px 24px 40px;
  overflow-y: auto;
  gap: 0;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

body.nav-open .nav-item {
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

body.nav-open .nav-link {
  padding: 16px 0;
  font-size: 1rem;
}

@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none !important;
  }

  .dropdown-menu {
    display: none;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown.open > .dropdown-menu {
    display: block;
  }

  .has-submenu {
    flex-wrap: wrap;
  }

  .submenu {
    display: none;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .has-submenu.open .submenu {
    display: block;
  }

  .dropdown-item {
    border-bottom: none;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .dropdown-item .arrow {
    margin-left: auto;
  }

  /* Products page: sidebar below cards on mobile */
  .products-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin-bottom: 20px;
  }

  /* Reduce header height for mobile */
  .header {
    height: 80px;
  }

  .hero {
    margin-top: 80px !important;
  }

  .page-header {
    margin-top: 60px;
  }

  .logo-img {
    width: 60px;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  /* Hero text adjustments */
  .slide-content {
    left: 20px;
    right: 20px;
    max-width: 100%;
  }

  .slide-content h2 {
    font-size: 1.8rem !important;
  }

  /* Bento grid: 2x2 on medium screens */
  .categories-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto !important;
  }

  .categories-grid .category-card:nth-child(1),
  .categories-grid .category-card:nth-child(2),
  .categories-grid .category-card:nth-child(3) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .category-card:nth-child(1) .category-image {
    height: 200px !important;
  }

  .category-image {
    height: 200px !important;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr !important;
  }

  .products-grid,
  .products-grid-full {
    grid-template-columns: 1fr;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .header {
    height: 70px;
  }

  .hero {
    margin-top: 70px !important;
  }

  body.nav-open .nav-menu {
    width: 100%;
    max-width: 100%;
  }
}
