/* ===== Homepage Styles ===== */

/* Crystal and Glass Effects */
.crystal-card {
  background: linear-gradient(135deg,
    rgba(255,255,255,0.1) 0%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.crystal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.crystal-card:hover::before {
  left: 100%;
}

.crystal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.3);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(240,194,75,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(120,119,198,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.floating-element {
  position: absolute;
  opacity: 0.4;
  pointer-events: none;
  color: var(--gold);
}

.floating-el-1 { top: 20%; left: 10%; }
.floating-el-2 { top: 60%; right: 15%; }
.floating-el-3 { top: 30%; right: 25%; }

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

.hero-subtitle {
  color: var(--muted);
}

/* Dark Mode Hero Section */
html[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.1) 0%,
    rgba(17,18,22,0.95) 100%);
}

html[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(circle at 20% 80%, rgba(240,194,75,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(120,119,198,0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

/* Dark Mode CTA Section */
html[data-theme="dark"] .cta-section {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.15) 0%,
    rgba(17,18,22,0.98) 100%);
}

/* Dark Mode Crystal Cards */
html[data-theme="dark"] .crystal-card {
  background: linear-gradient(135deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.02) 50%,
    rgba(255,255,255,0.01) 100%);
  border-color: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .crystal-card:hover {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Product Card Thumb */
.product-card .thumb {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--surface);
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.05);
}

/* Category Cards */
.category-card {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.1) 0%,
    rgba(120,119,198,0.1) 100%);
  border: 1px solid rgba(240,194,75,0.3);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(240,194,75,0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(240,194,75,0.4);
}

/* Offer Cards */
.offer-card {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.1) 0%,
    rgba(120,119,198,0.1) 100%);
  border: 1px solid rgba(240,194,75,0.3);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(240,194,75,0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(240,194,75,0.4);
}

/* Section Titles */
.section-title {
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  margin-bottom: 2rem;
  text-align: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

/* Carousel Enhancements */
.carousel-item {
  border-radius: 24px;
  overflow: hidden;
}

.carousel-img {
  height: clamp(300px, 50vw, 600px);
  width: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.7) 100%);
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0,0,0,0.8) 100%);
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.1) 0%,
    rgba(120,119,198,0.1) 100%);
  border-radius: 24px;
  padding: 3rem 0;
  margin: 4rem 0;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.15) 0%,
    rgba(120,119,198,0.15) 100%);
  border-radius: 24px;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Card image sizing */
.category-card-img {
  height: 200px;
  object-fit: cover;
}

.category-card-placeholder {
  height: 200px;
  background: var(--surface);
  display: none;
}

.offer-card-img {
  height: 200px;
  object-fit: cover;
}

.hero-card-img {
  height: 400px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: 60vh;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 50vh;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .offer-card {
    padding: 1rem;
  }

  .category-card {
    padding: 1rem;
  }

  .category-card img {
    width: 60px;
    height: 60px;
  }
}

/* Dark mode card styling */
html[data-theme="dark"] .crystal-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .offer-card {
  background: linear-gradient(135deg,
    rgba(240,194,75,0.1) 0%,
    rgba(120,119,198,0.1) 100%);
  border-color: rgba(240,194,75,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .crystal-card:hover,
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(240,194,75,0.4);
}

html[data-theme="dark"] .product-card .card-body,
html[data-theme="dark"] .category-card .card-body {
  background: transparent;
  color: var(--text);
}

/* Skeleton Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, rgba(240,194,75,0.1) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass);
}

.skeleton-image {
  aspect-ratio: 1/1;
  width: 100%;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.75rem;
  margin-bottom: 0.5rem;
  width: 60%;
}

.skeleton-price {
  height: 1.5rem;
  width: 40%;
  margin-top: auto;
}

.skeleton-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
