/* AliExpress Style - Modern E-commerce Design */
:root {
  /* AliExpress Colors */
  --ali-red: #ff4747;
  --ali-red-dark: #e63737;
  --ali-orange: #ff6b00;
  --ali-yellow: #ffc700;
  --ali-bg: #f5f5f5;
  --ali-white: #ffffff;
  --ali-black: #222222;
  --ali-gray: #666666;
  --ali-light-gray: #999999;
  --ali-border: #e5e5e5;
  --ali-success: #00c853;
  
  /* Overrides */
  --primary: var(--ali-red);
  --primary-dark: var(--ali-red-dark);
  --accent: var(--ali-orange);
}

/* Reset body background */
body {
  background: var(--ali-bg) !important;
  font-size: 14px;
}

/* Page container */
.page-shell {
  max-width: 1200px !important;
}

/* ========================
   HEADER ADJUSTMENTS
======================== */
.site-header {
  background: var(--ali-white) !important;
  border-bottom: 1px solid var(--ali-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.site-header .logo {
  font-size: 28px !important;
  color: var(--ali-red) !important;
  font-weight: 900 !important;
}

/* ========================
   HERO SECTION - AliExpress Style
======================== */
.hero-section-ali {
  background: var(--ali-white);
  padding: 0;
  margin-bottom: 20px;
}

.hero-container {
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  gap: 12px;
  padding: 12px 0;
}

/* Category Menu - Vertical */
.category-menu-vertical {
  background: var(--ali-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.category-menu-vertical .category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--ali-black);
  text-decoration: none;
  border-bottom: 1px solid var(--ali-border);
  transition: all 0.2s;
  font-size: 14px;
}

.category-menu-vertical .category-item:last-child {
  border-bottom: none;
}

.category-menu-vertical .category-item:hover {
  background: var(--ali-bg);
  color: var(--ali-red);
  padding-right: 20px;
}

.category-menu-vertical .category-item i {
  font-size: 18px;
  color: var(--ali-red);
  width: 20px;
}

/* Main Banner Slider */
.main-banner {
  background: var(--ali-white);
  border-radius: 8px;
  overflow: hidden;
  height: 380px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.banner-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.banner-slide.active {
  display: block;
}

.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.banner-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--ali-white);
}

/* Side Promo Cards */
.side-promo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-card {
  background: var(--ali-white);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
  transition: all 0.2s;
}

.promo-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.promo-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ali-red);
  font-weight: 700;
}

.promo-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ali-gray);
}

/* ========================
   FLASH DEALS SECTION
======================== */
.flash-deals-section {
  background: var(--ali-white);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.flash-deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ali-border);
}

.flash-deals-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash-deals-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--ali-red);
}

.flash-deals-title .timer {
  background: var(--ali-red);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-deals-link {
  color: var(--ali-red);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.flash-deals-link:hover {
  color: var(--ali-red-dark);
}

/* ========================
   PRODUCTS GRID - AliExpress Style
======================== */
.products-grid-ali {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.product-card-ali {
  background: var(--ali-white);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.product-card-ali:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.product-card-ali .product-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  background: #fafafa;
}

.product-card-ali .product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card-ali:hover .product-image img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--ali-red);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.product-card-ali .product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card-ali .product-title {
  font-size: 14px;
  color: var(--ali-black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 40px;
  margin: 0;
}

.product-card-ali .product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.product-card-ali .price-current {
  font-size: 20px;
  font-weight: 800;
  color: #1a202c;
}

.product-card-ali .price-current.discounted {
  color: var(--ali-red);
}

.product-card-ali .price-currency {
  font-size: 14px;
  color: inherit;
}

.product-card-ali .price-old {
  font-size: 13px;
  color: var(--ali-light-gray);
  text-decoration: line-through;
}

.product-card-ali .product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ali-gray);
  padding-top: 8px;
  border-top: 1px solid var(--ali-border);
}

.product-card-ali .product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ali-orange);
}

.product-card-ali .product-sold {
  color: var(--ali-light-gray);
}

/* ========================
   CATEGORY TABS
======================== */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 4px 0;
}

.category-tab {
  background: var(--ali-white);
  border: 1px solid var(--ali-border);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 600;
  color: var(--ali-gray);
}

.category-tab:hover {
  border-color: var(--ali-red);
  color: var(--ali-red);
}

.category-tab.active {
  background: var(--ali-red);
  border-color: var(--ali-red);
  color: white;
}

/* ========================
   SECTION TITLE
======================== */
.section-title-ali {
  font-size: 24px;
  font-weight: 800;
  color: var(--ali-black);
  margin: 30px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ali-border);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1200px) {
  .hero-container {
    grid-template-columns: 180px 1fr 280px;
  }
  
  .products-grid-ali {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  
  .category-menu-vertical,
  .side-promo {
    display: none;
  }
  
  .main-banner {
    height: 300px;
  }
  
  .products-grid-ali {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid-ali {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .flash-deals-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .products-grid-ali {
    grid-template-columns: 1fr;
  }
  
  .main-banner {
    height: 200px;
  }
}

/* ========================
   CATEGORIES SECTION - Compact Horizontal
======================== */
.categories-compact-wrapper {
  background: var(--ali-white);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.categories-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ali-border);
}

.categories-compact-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ali-black);
  display: flex;
  align-items: center;
  gap: 8px;
}

.categories-compact-title i {
  color: var(--ali-red);
  font-size: 18px;
}

.reset-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ali-gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--ali-bg);
}

.reset-link:hover {
  color: var(--ali-red);
  background: rgba(255,71,71,0.1);
}

.categories-horizontal-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--ali-border) transparent;
}

.categories-horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.categories-horizontal-scroll::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.categories-horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--ali-border);
  border-radius: 3px;
}

.categories-horizontal-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--ali-gray);
}

.category-chip-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--ali-bg);
  border: 1px solid var(--ali-border);
  border-radius: 24px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 600;
  color: var(--ali-black);
  flex-shrink: 0;
}

.category-chip-compact i {
  font-size: 16px;
  color: var(--ali-red);
  transition: transform 0.3s;
}

.category-chip-compact span {
  transition: all 0.2s;
}

.category-chip-compact:hover {
  background: var(--ali-white);
  border-color: var(--ali-red);
  color: var(--ali-red);
  box-shadow: 0 2px 8px rgba(255,71,71,0.15);
  transform: translateY(-2px);
}

.category-chip-compact:hover i {
  transform: scale(1.15);
}

.category-chip-compact.active {
  background: var(--ali-red);
  border-color: var(--ali-red);
  color: white;
  box-shadow: 0 4px 12px rgba(255,71,71,0.3);
}

.category-chip-compact.active i {
  color: white;
}

.empty-state-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ali-gray);
  font-size: 14px;
  padding: 8px 16px;
}

.empty-state-compact i {
  font-size: 18px;
  color: var(--ali-light-gray);
}

/* Responsive Compact Categories */
@media (max-width: 768px) {
  .categories-compact-wrapper {
    padding: 12px 16px;
  }
  
  .categories-compact-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .categories-compact-title {
    font-size: 15px;
  }
  
  .category-chip-compact {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .category-chip-compact i {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .categories-horizontal-scroll {
    gap: 8px;
    padding: 6px 2px;
  }
  
  .category-chip-compact {
    padding: 7px 14px;
    font-size: 12px;
  }
}
