/* ============================================
   STYLEHUB - HOME PAGE STYLES
   Café Tây Nguyên Theme ☕
   ============================================ */

/* ===== CSS VARIABLES - COFFEE THEME ===== */
:root {
  /* Primary Colors - Coffee */
  --coffee-dark: #6f4e37;
  --coffee-medium: #8b4513;
  --coffee-light: #a0522d;
  --coffee-chocolate: #d2691e;
  --coffee-peru: #cd853f;

  /* Accent Colors */
  --accent-cream: #f5f0eb;
  --accent-beige: #e8ddd5;
  --accent-warm: #f0e6dc;
  --accent-latte: #d4a574;

  /* Neutral Colors */
  --text-dark: #2d2520;
  --text-medium: #5c4a3d;
  --text-light: #8b7355;
  --white: #ffffff;
  --black: #1a1512;

  /* Gradients */
  --gradient-coffee: linear-gradient(
    135deg,
    #6f4e37 0%,
    #8b4513 50%,
    #a0522d 100%
  );
  --gradient-warm: linear-gradient(135deg, #d2691e 0%, #cd853f 100%);
  --gradient-cream: linear-gradient(
    135deg,
    #f5f0eb 0%,
    #e8ddd5 50%,
    #f0e6dc 100%
  );

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(111, 78, 55, 0.1);
  --shadow-md: 0 5px 20px rgba(111, 78, 55, 0.15);
  --shadow-lg: 0 10px 40px rgba(111, 78, 55, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  height: 550px;
  overflow: hidden;
  margin-bottom: 0;
}

.hero-slide {
  position: relative;
  height: 100%;
  background: var(--gradient-coffee);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(111, 78, 55, 0.9) 0%,
    rgba(139, 69, 19, 0.85) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: var(--white);
  max-width: 700px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s both;
  color: var(--accent-cream);
}

.hero-btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--white);
  color: var(--coffee-dark);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: var(--accent-cream);
  color: var(--coffee-medium);
}

/* ===== SECTION TITLE ===== */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-coffee);
  border-radius: 3px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 20px;
}

/* ===== CATEGORIES SECTION ===== */
.categories-section {
  padding: 70px 0;
  background: var(--accent-cream);
}

.category-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 260px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.category-card .category-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition-slow);
}

.category-card:hover .category-bg {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(45, 37, 32, 0.9) 0%,
    rgba(45, 37, 32, 0.3) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px;
}

.category-card h3 {
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.category-card span {
  color: var(--accent-latte);
  font-size: 0.9rem;
}

/* Category Gradient Backgrounds - Coffee Theme */
.cat-ao-thun {
  background:
    linear-gradient(
      135deg,
      rgba(210, 105, 30, 0.7) 0%,
      rgba(205, 133, 63, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1521572163474-6864f9cf17ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80");
  background-size: cover;
  background-position: center;
}

.cat-so-mi {
  background:
    linear-gradient(
      135deg,
      rgba(139, 69, 19, 0.7) 0%,
      rgba(160, 82, 45, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1596755094514-f87e34085b2c?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80");
  background-size: cover;
  background-position: center;
}

.cat-quan-jean {
  background:
    linear-gradient(
      135deg,
      rgba(111, 78, 55, 0.7) 0%,
      rgba(139, 69, 19, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1542272604-787c3835535d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80");
  background-size: cover;
  background-position: center;
}

.cat-ao-khoac {
  background:
    linear-gradient(
      135deg,
      rgba(92, 74, 61, 0.7) 0%,
      rgba(111, 78, 55, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1551028719-00167b16eac5?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80");
  background-size: cover;
  background-position: center;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  padding: 70px 0;
  background: var(--white);
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  margin-bottom: 30px;
  border: 1px solid rgba(111, 78, 55, 0.08);
}

.product-card a,
.product-card a:hover,
.product-card a *,
.product-card a:hover * {
  text-decoration: none;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--accent-cream);
}

.product-image img,
.product-image .stylehub-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-hot {
  background: var(--gradient-warm);
  color: var(--white);
}

.badge-new {
  background: var(--gradient-coffee);
  color: var(--white);
}

.badge-sale {
  background: linear-gradient(135deg, #2d5016 0%, #4a7c23 100%);
  color: var(--white);
}

.product-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-normal);
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-actions button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.product-actions button:hover {
  background: var(--coffee-medium);
  color: var(--white);
  transform: scale(1.1);
}

.product-info {
  padding: 18px;
}

.product-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-info .category-tag {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-price .current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--coffee-medium);
}

.product-price .old {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 60px 0;
  background: var(--gradient-coffee);
}

.feature-box {
  text-align: center;
  padding: 25px 15px;
  color: var(--white);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.8rem;
  backdrop-filter: blur(5px);
}

.feature-box h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 0.9rem;
  opacity: 0.85;
  color: var(--accent-cream);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
  padding: 70px 0;
  background: var(--text-dark);
}

.newsletter-content {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
  color: var(--white);
}

.newsletter-content h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.newsletter-content p {
  color: var(--accent-latte);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  background: var(--white);
}

.newsletter-form input:focus {
  outline: 2px solid var(--coffee-chocolate);
}

.newsletter-form button {
  padding: 14px 28px;
  background: var(--gradient-coffee);
  border: none;
  border-radius: 50px;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.newsletter-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.4);
}

/* ===== VIEW ALL BUTTON ===== */
.btn-view-all {
  padding: 12px 35px;
  border: 2px solid var(--coffee-medium);
  color: var(--coffee-medium);
  background: transparent;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-normal);
}

.btn-view-all:hover {
  background: var(--coffee-medium);
  color: var(--white);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-section {
    height: 450px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: 400px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .category-card {
    height: 200px;
    margin-bottom: 15px;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .categories-section,
  .products-section,
  .newsletter-section {
    padding: 50px 0;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }

  .hero-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}
