/* ========================================
   فروشگاه - E-Commerce Frontend Styles
   RTL Persian Layout
   ======================================== */

/* ====== RESET & BASE ====== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c5ce7;
  --primary-dark: #5E4BDB;
  --primary-darker: #4834d4;
  --primary-light: #a29bfe;
  --accent: #ffa500;
  --accent-light: #ffc048;
  --dark: #1e272e;
  --dark-light: #2d3436;
  --white: #ffffff;
  --bg: #f5f6fa;
  --bg-light: #fafbfc;
  --gray-100: #f1f2f6;
  --gray-200: #dfe6e9;
  --gray-300: #b2bec3;
  --gray-400: #636e72;
  --gray-500: #576574;
  --success: #00b894;
  --danger: #e17055;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.9;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====== HEADER ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header__main {
  display: flex;
  align-items: stretch;
  min-height: 64px;
}

/* Navigation Bar (White ~70%) */
.header__nav {
  flex: 1;
  background: var(--white);
  display: flex;
  align-items: center;
  position: relative;
  margin-left: 4px;
  z-index: 2;
}

/* Diagonal slash on nav's left edge */
.header__nav::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: var(--white);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  transform: translateX(-10px);
  z-index: 5;
}

.header__nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  width: 100%;
  flex-wrap: wrap;
}

.header__nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-500);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.header__nav-link:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.04);
}

.header__nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.header__nav-link.active svg {
  stroke: var(--accent);
}

/* Mega Menu Trigger Link */
.header__nav-link--mega {
  cursor: pointer;
}

.header__nav-link--mega.open {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header__nav-chevron {
  transition: transform 0.3s ease;
}

.header__nav-link--mega.open .header__nav-chevron {
  transform: rotate(180deg);
}

/* User Menu Dropdown */
.header__user-menu {
  position: relative;
  margin-right: auto;
}

.header__user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: var(--bg);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.header__user-trigger:hover {
  background: var(--gray-100);
}

.header__user-chevron {
  transition: transform 0.3s ease;
}

.header__user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.header__user-menu:hover .header__user-dropdown,
.header__user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__user-menu:hover .header__user-chevron {
  transform: rotate(180deg);
}

.header__user-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--dark);
  transition: var(--transition);
}

.header__user-dropdown a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* Hamburger (Mobile) */
.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Purple Sidebar (~30%) */
.header__sidebar {
  width: 280px;
  background: var(--primary);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Diagonal slash on sidebar's right edge */
.header__sidebar::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: var(--primary);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(10px);
  z-index: 4;
}

.header__sidebar .header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header__sidebar .header__logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.header__support-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  border-radius: 25px;
  white-space: nowrap;
  transition: var(--transition);
}

.header__support-btn:hover {
  background: var(--accent-light);
  transform: scale(1.03);
}

.header__support-btn svg {
  stroke: var(--white);
  flex-shrink: 0;
}

.header__sidebar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
}

.header__sidebar-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}

.header__sidebar-icon:hover {
  border-color: var(--white);
  transform: scale(1.08);
}

.header__sidebar-icon svg {
  stroke: var(--gray-500);
  width: 18px;
  height: 18px;
}

.header__badge {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
}

/* ====== MEGA MENU ====== */
.mega-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  border-top: 3px solid var(--primary);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.mega-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu__inner {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 420px;
}

/* Right Sidebar Panel */
.mega-menu__sidebar {
  width: 260px;
  background: var(--bg-light);
  border-left: 1px solid var(--gray-200);
  flex-shrink: 0;
  padding: 20px 0;
}

.mega-menu__sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 4px;
}

.mega-menu__sidebar-header svg {
  color: var(--primary);
  flex-shrink: 0;
}

.mega-menu__sidebar-list {
  list-style: none;
  padding: 0;
}

.mega-menu__sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  border-right: 3px solid transparent;
}

.mega-menu__sidebar-item:hover {
  background: var(--white);
  color: var(--primary);
}

.mega-menu__sidebar-item.active {
  background: var(--white);
  color: var(--primary);
  border-right-color: var(--primary);
  font-weight: 700;
}

.mega-menu__sidebar-item svg {
  flex-shrink: 0;
  color: inherit;
  opacity: 0.6;
}

.mega-menu__sidebar-item.active svg {
  opacity: 1;
}

/* Left Content Grid */
.mega-menu__content {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
}

.mega-menu__grid {
  position: relative;
}

.mega-menu__grid-group {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 20px;
  animation: megaGridFadeIn 0.35s ease;
}

.mega-menu__grid-group.active {
  display: grid;
}

@keyframes megaGridFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-menu__grid-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  transition: var(--transition);
}

.mega-menu__grid-item:hover a {
  color: var(--primary);
}

.mega-menu__grid-item:hover .mega-menu__bullet {
  background: var(--primary);
  transform: scale(1.3);
}

.mega-menu__grid-item a {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.6;
  transition: var(--transition);
}

.mega-menu__bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: var(--transition);
}

/* ====== MOBILE MENU ====== */
.mobile-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  bottom: 0;
  width: 300px;
  background: var(--white);
  z-index: 2000;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--primary);
  color: var(--white);
}

.mobile-menu__title {
  font-size: 18px;
  font-weight: 700;
}

.mobile-menu__close {
  color: var(--white);
  padding: 4px;
}

.mobile-menu__body {
  padding: 8px 0;
}

.mobile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  transition: var(--transition);
  cursor: pointer;
}

.mobile-menu__item:hover {
  background: var(--bg);
  color: var(--primary);
}

.mobile-menu__item--highlight {
  color: var(--primary);
  font-weight: 600;
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
}

.mobile-menu__item--expandable {
  flex-direction: column;
  align-items: stretch;
}

.mobile-menu__item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  width: 100%;
}

.mobile-menu__chevron {
  margin-right: auto;
  transition: transform 0.3s ease;
}

.mobile-menu__chevron.rotated {
  transform: rotate(180deg);
}

.mobile-menu__divider {
  height: 1px;
  background: var(--gray-200);
  margin: 8px 20px;
}

/* Mobile Mega Menu */
.mobile-mega {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--bg-light);
}

.mobile-mega.open {
  max-height: 800px;
}

.mobile-mega__category {
  border-bottom: 1px solid var(--gray-200);
}

.mobile-mega__category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 12px 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
}

.mobile-mega__category-title:hover {
  color: var(--primary);
}

.mobile-mega__arrow {
  margin-right: auto;
  transition: transform 0.3s ease;
}

.mobile-mega__arrow.rotated {
  transform: rotate(180deg);
}

.mobile-mega__subitems {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px 0 28px;
}

.mobile-mega__subitems.open {
  max-height: 300px;
  padding: 0 20px 12px 28px;
}

.mobile-mega__subitems a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-500);
  border-radius: var(--radius-sm);
}

.mobile-mega__subitems a:hover {
  color: var(--primary);
  background: var(--white);
}

/* ====== HERO SECTION ====== */
.hero {
  padding: 24px 0;
}

.hero__carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero__slides {
  position: relative;
  height: 420px;
}

.hero__slide {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 60px;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
  pointer-events: none;
}

.hero__slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero__slide-content {
  max-width: 480px;
  color: var(--white);
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero__title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero__desc {
  font-size: 16px;
  line-height: 1.9;
  opacity: 0.9;
  margin-bottom: 28px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--white);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero__slide-image {
  flex-shrink: 0;
}

.hero__mockup {
  width: 280px;
  background: var(--dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero__mockup--orange {
  background: #2d1b0e;
}

.hero__mockup--green {
  background: #0e2d1b;
}

.hero__mockup-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
}

.hero__mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.hero__mockup-bar span:first-child {
  background: #e74c3c;
}

.hero__mockup-bar span:nth-child(2) {
  background: #f39c12;
}

.hero__mockup-bar span:last-child {
  background: #2ecc71;
}

.hero__mockup-content {
  padding: 12px;
}

.hero__mockup-header {
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 10px;
}

.hero__mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero__mockup-card {
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.hero__mockup-body {
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* Hero Arrows */
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  z-index: 10;
  transition: var(--transition);
}

.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.35);
}

.hero__arrow--prev {
  right: 16px;
}

.hero__arrow--next {
  left: 16px;
}

/* Hero Dots */
.hero__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: var(--transition);
}

.hero__dot.active {
  background: var(--white);
  width: 28px;
  border-radius: 5px;
}

/* Hero Counter */
.hero__counter {
  position: absolute;
  bottom: 20px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
}

.hero__counter-sep {
  margin: 0 2px;
}

/* ====== STATS BAR ====== */
.stats-bar {
  padding: 32px 0;
}

.stats-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stats-bar__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stats-bar__item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stats-bar__item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.stats-bar__item strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}

.stats-bar__item span {
  display: block;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ====== SECTION HEADERS ====== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--primary);
  border-radius: 2px;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.section-link:hover {
  gap: 8px;
}

/* ====== PRODUCTS SECTION ====== */
.products-section {
  padding: 40px 0;
}

.products-section--alt {
  background: var(--bg-light);
}

.products-carousel {
  position: relative;
  overflow: hidden;
}

.products-carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

.products-carousel__track::-webkit-scrollbar {
  display: none;
}

.product-card {
  min-width: 240px;
  max-width: 240px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  flex-shrink: 0;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-card--grid {
  min-width: unset;
  max-width: unset;
}

.product-card__image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.product-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  z-index: 2;
}

.product-card__badge--orange {
  background: var(--accent);
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__body {
  padding: 16px;
}

.product-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-card__sales {
  font-size: 12px;
  color: var(--gray-400);
}

.product-card__rating {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

.product-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card__price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.product-card__price small {
  font-size: 11px;
  font-weight: 500;
}

.product-card__old-price {
  font-size: 12px;
  color: var(--gray-300);
  text-decoration: line-through;
}

/* Products Carousel Arrows */
.products-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: var(--transition);
}

.products-carousel__arrow:hover {
  background: var(--primary);
  color: var(--white);
}

.products-carousel__arrow--prev {
  right: -8px;
}

.products-carousel__arrow--next {
  left: -8px;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ====== CATEGORIES SECTION ====== */
.categories-section {
  padding: 48px 0;
  background: var(--white);
}

.categories-layout {
  display: flex;
  gap: 24px;
}

.categories-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.categories-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  border-right: 3px solid transparent;
}

.categories-sidebar__item:hover {
  background: var(--white);
  color: var(--primary);
}

.categories-sidebar__item.active {
  background: var(--white);
  color: var(--primary);
  border-right-color: var(--primary);
  font-weight: 600;
}

.categories-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.category-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.category-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.category-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.category-card span {
  font-size: 12px;
  color: var(--gray-400);
}

/* ====== TESTIMONIALS ====== */
.testimonials-section {
  padding: 48px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.testimonial-card__stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.testimonial-card__text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--gray-500);
  margin-bottom: 18px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.testimonial-card__author strong {
  display: block;
  font-size: 14px;
  color: var(--dark);
}

.testimonial-card__author span {
  display: block;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ====== BLOG SECTION ====== */
.blog-section {
  padding: 48px 0;
  background: var(--white);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.blog-card__image {
  height: 180px;
  overflow: hidden;
}

.blog-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__body {
  padding: 20px;
}

.blog-card__date {
  font-size: 12px;
  color: var(--gray-400);
  display: block;
  margin-bottom: 8px;
}

.blog-card__body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.6;
}

.blog-card__body p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ====== CTA BANNER ====== */
.cta-section {
  padding: 48px 0;
}

.cta-banner {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 48px 60px;
  overflow: hidden;
}

.cta-banner__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  color: var(--white);
}

.cta-banner__content h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-banner__content p {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-banner__form {
  display: flex;
  gap: 12px;
  max-width: 460px;
}

.cta-banner__input {
  flex: 1;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.cta-banner__input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.cta-banner__input:focus {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.25);
}

.cta-banner__btn {
  padding: 14px 28px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.cta-banner__btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.cta-banner__decoration {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
}

/* ====== FOOTER ====== */
.footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 48px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.footer__logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}

.footer__about {
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  transition: var(--transition);
}

.footer__social a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer__col h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
}

.footer__col ul li {
  margin-bottom: 10px;
}

.footer__col ul li a {
  font-size: 14px;
  color: var(--gray-300);
  transition: var(--transition);
}

.footer__col ul li a:hover {
  color: var(--accent);
  padding-right: 4px;
}

.footer__contact {
  margin-top: 16px;
}

.footer__contact > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.footer__contact svg {
  color: var(--primary);
  flex-shrink: 0;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

.footer__bottom p {
  font-size: 13px;
  color: var(--gray-400);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .hero__slides {
    height: 360px;
  }

  .hero__slide {
    padding: 36px 40px;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero__mockup {
    width: 220px;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__main {
    flex-direction: row;
  }

  .header__sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: 60px;
    padding: 0 12px;
    gap: 8px;
    justify-content: space-between;
  }

  .header__sidebar .header__logo {
    display: none;
  }

  .header__support-btn {
    display: none;
  }

  .header__nav {
    position: static;
  }

  .header__nav-inner {
    gap: 0;
    padding: 0 8px;
  }

  .header__nav-link {
    padding: 10px 8px;
    font-size: 12px;
  }

  .header__nav-link svg {
    display: none;
  }

  .header__user-menu {
    display: none;
  }

  .header__hamburger {
    display: flex;
  }

  .mega-menu__carousel-panel {
    display: none;
  }

  .mega-menu__sidebar {
    width: 200px;
  }

  .mega-menu__grid-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-menu__content {
    padding: 16px;
  }

  .hero__slides {
    height: 320px;
  }

  .hero__slide {
    padding: 28px 24px;
    flex-direction: column;
    text-align: center;
  }

  .hero__slide-image {
    display: none;
  }

  .hero__slide-content {
    max-width: 100%;
  }

  .hero__title {
    font-size: 22px;
  }

  .hero__desc {
    font-size: 14px;
  }

  .hero__counter {
    display: none;
  }

  .categories-layout {
    flex-direction: column;
  }

  .categories-sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    gap: 0;
    scrollbar-width: none;
  }

  .categories-sidebar::-webkit-scrollbar {
    display: none;
  }

  .categories-sidebar__item {
    white-space: nowrap;
    border-right: none;
    border-bottom: 3px solid transparent;
    padding: 12px 14px;
  }

  .categories-sidebar__item.active {
    border-right: none;
    border-bottom-color: var(--primary);
  }

  .categories-sidebar__item svg {
    display: none;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cta-banner {
    padding: 32px 24px;
  }

  .cta-banner__form {
    flex-direction: column;
  }

  .cta-banner__decoration {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .hero__slides {
    height: 280px;
  }

  .hero__title {
    font-size: 18px;
  }

  .hero__cta {
    padding: 12px 24px;
    font-size: 14px;
  }

  .stats-bar__inner {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 18px;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card,
.category-card,
.testimonial-card,
.blog-card,
.stats-bar__item {
  animation: fadeInUp 0.5s ease forwards;
}

/* Stagger animation delays */
.product-card:nth-child(2),
.category-card:nth-child(2),
.testimonial-card:nth-child(2),
.blog-card:nth-child(2),
.stats-bar__item:nth-child(2) {
  animation-delay: 0.1s;
}

.product-card:nth-child(3),
.category-card:nth-child(3),
.testimonial-card:nth-child(3),
.blog-card:nth-child(3),
.stats-bar__item:nth-child(3) {
  animation-delay: 0.2s;
}

.product-card:nth-child(4),
.category-card:nth-child(4),
.stats-bar__item:nth-child(4) {
  animation-delay: 0.3s;
}

.category-card:nth-child(5) { animation-delay: 0.4s; }
.category-card:nth-child(6) { animation-delay: 0.5s; }
.category-card:nth-child(7) { animation-delay: 0.6s; }
.category-card:nth-child(8) { animation-delay: 0.7s; }
