/* =============================================================================
   HOME PAGE STYLES
   ============================================================================= */

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-content .btn-primary {
  background: white;
  color: #667eea;
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.hero-content .btn-primary:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-image {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ===== FEATURES SECTION ===== */
.features {
  padding: 3rem 0;
}

/* ===== CATEGORIES SECTION ===== */
.home-categories {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 600;
}

.section-header h2,
.section-header p {
  margin: 0;
}

.section-header .btn {
  flex-shrink: 0;
  width: auto;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 5px;
  margin-top: 2rem;
}

.category-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  background: white;
  height: 280px;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  border: 2px solid #555;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.4s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
  border: 2px solid #d88c8cb0;
}

.category-card:hover .category-image {
  transform: scale(1.05);
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.category-image.placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 3rem;
  opacity: 0.7;
  color: white;
}

.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  padding: 1.5rem;
  color: white;
}

.category-overlay h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-overlay p {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.shop-now-btn {
  flex: 1;
  background: linear-gradient(135deg, #51577079, #d4cddb6e);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: normal;
}

.shop-now-btn::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;
}

.shop-now-btn:hover::before {
  left: 100%;
}

.shop-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  color: white;
}

/* ===== FEATURED PRODUCTS ===== */
.home-featured {
  padding: 3rem 0;
}

.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 5px;
  margin-top: 2rem;
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #d1d5db;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 1;
}

.product-thumb {
  position: relative;
  width: 100%;
  height: 240px;
  min-height: 240px;
  max-height: 240px;
  background: #f5f6fa;
  overflow: hidden;
  flex-shrink: 0;
}

.product-thumb img,
.product-thumb .no-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.quick-view-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
}

.quick-view-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.home-product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  justify-content: space-between;
  min-height: 140px;
  max-height: 140px;
}

.home-product-header {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-product-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-category {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.home-product-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-current-price {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.original-price {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}

.product-actions {
  margin-top: auto;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.add-to-cart-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.add-to-cart-btn:disabled:hover {
  background: #9ca3af;
  transform: none;
  box-shadow: none;
}

@media (max-width: 1250px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 1.875rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-section {
    padding: 3rem 0;
  }
}

@media (max-width: 640px) {
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 5px;
  }

  .category-overlay {
    padding: 5px;
  }

  .category-overlay h3 {
    line-height: 1;
    font-weight: 800;
    margin-bottom: 0;
  }

  .category-overlay p {
    margin-bottom: 0;
    line-height: 1;
  }

  .home-product-info {
    padding: 5px;
    min-height: auto;
    max-height: auto;
  }

  .product-actions {
    margin-top: 0;
  }

  .add-to-cart-btn {
    padding: 7px;
  }
}