/* =============================================================================
   HOME PAGE STYLES
   ============================================================================= */

/* ===== LIGHT THEME OVERRIDES FOR HOME ===== */
.home-page {
  background: radial-gradient(
    circle at top left,
    #d7ffe5 0,
    #fdf2f8 35%,
    #eff6ff 75%
  );
  color: #111827;
}

/* ===== HERO SECTION ===== */
.site-header {
  padding-top: 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero {
  padding: 3rem 3rem;
  text-align: left;
}

.hero-content {
  max-width: 640px;
}

.hero-eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f97316;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 25px;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #111827;
  font-weight: 500;
}

.hero-subtitle {
  color: #4b5563;
  margin-bottom: 2rem;
  font-size: 1rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-cta {
  min-width: 160px;
}

.hero-sub-action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: #4b5563;
}

.hero-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-link:hover {
  color: #1d4ed8;
}

/* ===== POPULAR STORES ICON STRIP ===== */
.home-popular-stores {
  padding: 2.5rem 0 0.5rem;
}

.popular-stores-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.5rem 0;
  margin: 0 -0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.popular-stores-scroll::-webkit-scrollbar {
  height: 6px;
}

.popular-stores-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.popular-stores-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 9999px;
}

.store-bubble {
  flex: 0 0 auto;
  width: 110px; /* ~3 bubbles visible on mobile */
  text-align: center;
  text-decoration: none;
  color: #111827;
  scroll-snap-align: start;
}

.store-bubble-avatar {
  width: 72px;
  height: 72px;
  border-radius: 9999px;
  margin: 0 auto 0.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #4f46e5, #a855f7);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.store-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-bubble-initial {
  font-size: 1.5rem;
  font-weight: 600;
  color: #eef2ff;
}

.store-bubble-name {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-empty {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
  background: #f9fafb;
}

.section-empty p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.section-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== 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;
}

.section-header-centered {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.5rem;
  border-radius: 18px;
  text-decoration: none;
  color: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.cat-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-initial {
  font-size: 1.4rem;
  font-weight: 600;
  color: #4f46e5;
}

.cat-short {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  min-height: 2.2em;
  white-space: normal;
  word-break: break-word;
}

.cat-item.pc-gradient-1 {
  background: radial-gradient(circle at 0 0, #e0f2fe, #e5e7eb);
}
.cat-item.pc-gradient-2 {
  background: radial-gradient(circle at 0 0, #fee2e2, #fef3c7);
}
.cat-item.pc-gradient-3 {
  background: radial-gradient(circle at 0 0, #ede9fe, #e0f2fe);
}
.cat-item.pc-gradient-4 {
  background: radial-gradient(circle at 0 0, #dcfce7, #fef9c3);
}
.cat-item.pc-gradient-5 {
  background: radial-gradient(circle at 0 0, #fce7f3, #e5e7eb);
}
.cat-item.pc-gradient-6 {
  background: radial-gradient(circle at 0 0, #fef3c7, #e0f2fe);
}

.cat-info-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
}

.cat-info-modal.show {
  opacity: 1;
  pointer-events: auto;
}

body.cat-modal-active {
  overflow: hidden;
  touch-action: none;
}

.ci-content {
  width: 100%;
  padding: 18px;
  text-align: center;
  border-top: 4px solid #000;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 25px rgba(15, 23, 42, 0.2);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cat-info-modal.show .ci-content {
  transform: translateY(0);
}

.ci-handle {
  width: 50px;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 0 auto 14px;
}

.ci-banner {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  max-height: 200px;
  object-fit: cover;
}

.ci-fullname {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ci-tagline {
  color: #555;
  font-weight: 500;
  margin-bottom: 10px;
}

.ci-desc {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
}

.ci-close-btn {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #111827;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ===== FEATURED PRODUCTS ===== */
.home-featured {
  padding: 50px 0;
  position: relative;
}

.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.product-card-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.06);
  position: relative;
  text-decoration: none;
  width: 100%;
  height: 100%;
}

.product-card * {
  text-decoration: none;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 23, 42, 0.12);
}

.product-thumb {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #f5f6fa;
}

.product-thumb img,
.product-thumb .no-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #99a0b0;
  font-weight: 500;
}

.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 styles removed */

.product-info {
  padding: 1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  width: 100%;
}

.product-name {
  font-size: 1.05rem;
  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-price {
  font-size: 1.1rem;
  color: #667eea;
  font-weight: 700;
  margin: 0;
}

.product-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.add-to-cart-btn {
  flex: 1 1 auto;
  padding: 0.65rem 0.9rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.add-to-cart-btn:hover {
  background: #5a6fd8;
}

.add-to-cart-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.add-to-cart-btn .cart-icon {
  stroke: currentColor;
}

.wishlist-btn {
  width: 44px;
  border: none;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111827;
}

.wishlist-icon {
  stroke: currentColor;
  fill: none;
}

.wishlist-btn.is-active .wishlist-icon,
.wishlist-btn.active .wishlist-icon {
  fill: #ef4444;
  stroke: #ef4444;
}

/* ===== HOW IT WORKS ===== */
.home-how-it-works {
  padding: 3rem 0 2.5rem;
}

.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.how-step {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 1.25rem 1.25rem 1.5rem;
}

.how-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #facc15);
  margin-bottom: 0.75rem;
}

.how-step h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.how-step p {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

/* ===== FOR SHOPPERS & STORE OWNERS ===== */
.home-for-whom {
  padding: 0 0 3rem;
}

.home-for-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.home-for-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 1.5rem 1.5rem 1.75rem;
}

.home-for-card h3 {
  margin-bottom: 0.75rem;
}

.home-for-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.home-for-card li {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.1rem;
}

.home-for-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #a5b4fc;
}

.home-for-owners {
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border-color: rgba(59, 130, 246, 0.4);
}

/* ===== TRUST & SOCIAL PROOF ===== */
.home-trust {
  padding: 0 0 3.5rem;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.home-trust-metrics h2 {
  margin-bottom: 0.5rem;
}

.home-trust-metrics p {
  margin-bottom: 1.5rem;
  max-width: 540px;
  color: #4b5563;
}

.home-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.home-metric {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
}

.home-metric-value {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.home-metric-label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

.home-trust-panel {
  background: #f9fafb;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 1.75rem 1.5rem 1.75rem;
}

.home-trust-panel h3 {
  margin-bottom: 0.75rem;
}

.home-trust-panel p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

/* Disable hover effects on touch/mobile */
@media (hover: none), (pointer: coarse) {
  .home-page .hero-link:hover {
    color: #2563eb;
  }
  .home-page .hero-link,
  .home-page .cat-item,
  .home-page .product-card,
  .home-page .product-card::before,
  .home-page .product-thumb img,
  .home-page .product-overlay,
  .home-page .add-to-cart-btn {
    transition: none !important;
  }

  .home-page .cat-item:hover {
    transform: none;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  }

  .home-page .product-card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border-color: #e5e7eb;
  }

  .home-page .product-card:hover::before {
    opacity: 0;
  }

  .home-page .product-card:hover .product-overlay {
    opacity: 0;
  }

  .home-page .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: none;
    box-shadow: none;
  }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 768px) {
  .hero {
    padding: 2.5rem 1.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    flex-wrap: nowrap;
  }

  .hero-cta {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .home-featured .featured-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    padding: 0 1rem;
  }

  .home-trust-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-featured .featured-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 0 0.9rem;
  }

  .home-featured .product-card {
    border-radius: 12px;
  }

  .home-featured .product-thumb {
    height: 150px;
  }

  .home-featured .product-info {
    padding: 0.75rem 0.85rem 1rem;
    gap: 0;
  }

  .home-featured .product-name {
    font-size: 0.95rem;
  }

  .home-featured .product-price {
    font-size: 0.95rem;
  }

  .home-featured .product-actions {
    gap: 0.45rem;
  }

  .home-featured .add-to-cart-btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 500px) {
  .hero {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    padding: 0.2rem 0;
    font-size: 12px;
  }

  .hero-cta {
    min-width: 0;
  }

  .btn {
    padding: 0.2rem 1rem;
    min-height: 0;
    font-size: 12px;
  }

  .home-featured .featured-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0;
  }

  .home-featured .product-thumb {
    height: 125px;
  }

  .home-featured .product-info {
    padding: 0.5rem;
  }

  .home-featured .product-name {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .home-featured .product-price {
    font-size: 0.85rem;
  }

  .home-featured .add-to-cart-btn {
    padding: 0.35rem 0.45rem;
    font-size: 0.75rem;
  }

  .section-header p {
    font-size: 12px;
    line-height: 1;
  }

  .home-popular-stores {
    padding: 2rem 0 0;
  }

  .home-categories {
    padding: 0;
  }

  .home-how-it-works {
    padding: 0 0 2.5rem;
  }
}

@media (max-width: 350px) {
  .site-header {
    padding-top: 1rem;
  }

  .hero {
    padding: 0rem 1rem;
  }

  .hero p {
    margin-bottom: 1rem;
  }

  .home-categories {
    padding: 2rem 0;
  }

  .home-featured {
    padding: 1rem 0;
  }

  .section-header h2 {
    font-size: 20px;
    font-weight: 500;
  }

  .section-header .btn {
    padding: 0.2rem 1rem;
    min-height: 0;
    font-size: 12px;
  }
}

@media (max-width: 300px) {
  .category-card-grid {
    grid-template-columns: none;
  }

  .category-card {
    width: 86vw;
  }
}
