/* ==============================================================
   HOME PAGE – PURE CSS (NO TAILWIND)
   ============================================================== */

/* ---- Smooth Scrolling ---- */
html { scroll-behavior: smooth; }

/* ---- Hero Section ---- */
.hero {
  background: rgb(22 163 74 / var(--tw-text-opacity, 1));
  color: #fff;
  padding: 5rem 0;
  text-align: center;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .hero-title { font-size: 3.125rem; }
}
.hero-text {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .hero-text { font-size: 1.25rem; }
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary {
  background: #fff;
  color: #16a34a;
}
.btn-primary:hover { background: #f3f4f6; }
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover {
  background: #fff;
  color: #16a34a;
}

/* ---- Main Section ---- */
.main-section {
  padding: 3rem 0;
  background: #FFFFFF;
}
.dark .main-section { background: #0f172a; }

/* ---- Carousel ---- */
.carousel-wrapper {
  margin-bottom: 4rem;
  background: #fff;
  /*border-radius: 1.5rem;*/
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.dark .carousel-wrapper { background: #1e293b; }

.banner-link { position: relative; display: block; }
.banner-img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
}
.banner-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  color: #fff;
}
.banner-title { font-size: 1.5rem; font-weight: 700; }
.banner-desc { font-size: 1.125rem; }

.placeholder-slide {
  display: flex; align-items: center; justify-content: center;
  height: 20rem; background: #e5e7eb; color: #6b7280;
}

/* ---- Category Scroll ---- */
.category-section { margin-bottom: 4rem; }
.section-title {
  font-size: 1.875rem; font-weight: 700; text-align: center;
  margin-bottom: 2rem; color: #1f2937;
}
.dark .section-title { color: #f1f5f9; }

.scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1rem;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

.category-card {
  flex-shrink: 0;
  min-width: 7.5rem;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: center;
}
.category-circle {
  width: 5rem; height: 5rem;
  margin: 0 auto 0.75rem;
  border: 3px solid #e5e7eb;
  border-radius: 50%;
  overflow: hidden;
  transition: all .3s ease;
}
.category-img { width: 100%; height: 100%; object-fit: cover; }
.category-name {
  font-size: 1.125rem; font-weight: 500; color: #374151;
}
.dark .category-name { color: #e2e8f0; }

.category-card:hover .category-circle {
  border-color: #10b981;
  transform: scale(1.08);
}

/* ---- Promo Banner ---- */
.promo-banner {
  margin-bottom: 4rem;
  position: relative;
  /*border-radius: 1.5rem;*/
  overflow: hidden;
}
.promo-img {
  width: 100%; height: 18rem; object-fit: cover;
  transition: transform .5s ease;
}
.promo-link:hover .promo-img { transform: scale(1.05); }
.promo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.7), transparent);
  color: #fff; padding: 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.promo-title { font-size: 1.875rem; font-weight: 700; margin-bottom: .75rem; }
.promo-text { font-size: 1.125rem; margin-bottom: 1.5rem; }
.promo-btn {
    width: 190px;
    background: #fff;
    color: #16a34a;
    font-size: 1.5rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  
/* ---- Product Grid ---- */
.product-grid-section { margin-bottom: 4rem; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem;
}
.see-all {
  color: #16a34a; font-weight: 500; text-decoration: none;
}
.see-all:hover { text-decoration: underline; }

.product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { text-decoration: none; display: block; position: relative; }
.card-inner {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: all .3s ease;
}
.dark .card-inner { background: #1e293b; }

.product-card:hover .card-inner {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

.image-container {
  background: #f3f4f6;
  overflow: hidden;
}
.dark .image-container { background: #334155; }
.product-img {
  width: 100%; height: 14rem; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img { transform: scale(1.08); }

.product-info { padding: 1.25rem; }
.product-name {
  font-weight: 600; color: #111827;
  margin-bottom: .5rem;
}
.dark .product-name { color: #f1f5f9; }
.product-card:hover .product-name { color: #16a34a; }

.product-meta {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: #6b7280;
}
.dark .product-meta { color: #94a3b8; }
.condition { text-transform: capitalize; }
.free-shipping {
  background: #d1fae5; color: #065f46;
  padding: .125rem .5rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 500;
}
.dark .free-shipping { background: #065f46; color: #d1fae5; }

.price-row {
  display: flex; align-items: baseline; gap: .5rem;
}
.price-current { font-weight: 700; color: #16a34a; }
.price-old { font-size: .875rem; text-decoration: line-through; color: #9ca3af; }
.dark .price-old { color: #6b7280; }

/* ---- Deal Badge ---- */
.deal-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: #ef4444; color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .25rem .5rem; border-radius: 9999px; z-index: 10;
}

/* ---- Floating Add to Cart ---- */
.add-to-cart-btn {
  position: absolute; top: .75rem; right: .75rem;
  width: 2.75rem; height: 2.75rem;
  background: #10b981; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(16,185,129,.3);
  opacity: 0; transform: scale(.8);
  transition: all .3s ease; z-index: 10;
}
.product-card:hover .add-to-cart-btn { opacity: 1; transform: scale(1); }
.add-to-cart-btn:hover { background: #059669; transform: scale(1.1); }
.icon-cart { width: 1.25rem; height: 1.25rem; }

/* ---- Line Clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- No Data ---- */
.no-data {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  padding: 3rem 0;
}
.dark .no-data { color: #94a3b8; }

/* ---- Dark Mode Overrides ---- */
html.dark .hero { background: linear-gradient(to right, #059669, #047857); }
html.dark .btn-primary { background: #16a34a; color: #fff; }
html.dark .btn-primary:hover { background: #15803d; }
html.dark .btn-outline { border-color: #16a34a; color: #16a34a; }
html.dark .btn-outline:hover { background: #16a34a; color: #fff; }


/* ==============================================================
   PHONE VIEW ONLY – HOME PAGE (max-width: 640px)
   ============================================================== */

@media (max-width: 640px) {

  /* ---- Hero Section ---- */
  .hero {
    padding: 2.5rem 0;
  }
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  .hero-text {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }

  /* ---- Main Section ---- */
  .main-section {
    padding: 1.5rem 0;
  }

  /* ---- Carousel ---- */
  .carousel-wrapper {
    margin-bottom: 2rem;
  }
  .banner-img {
    height: 11rem;
  }
  .banner-overlay {
    padding: 1rem;
  }
  .banner-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }
  .banner-desc {
    font-size: 0.875rem;
    display: none; /* Hide long text on mobile */
  }
  .placeholder-slide {
    height: 11rem;
  }

  /* ---- Section Title ---- */
  .section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  /* ---- Category Scroll ---- */
  .category-section {
    margin-bottom: 2.5rem;
  }
  .scroll-container {
    gap: 0rem;
    padding: 0.5rem 0.75rem;
  }
  .category-card {
    min-width: 5.7rem;
  }
  .category-circle {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.3rem;
  }
  .category-name {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* ---- Promo Banner ---- */
  .promo-banner {
    margin-bottom: 2.5rem;
  }
  .promo-img {
    height: 12rem;
  }
  .promo-overlay {
    padding: 1.25rem;
  }
  .promo-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .promo-text {
    font-size: 0.8rem;
    margin-bottom: 0;
  }
  .promo-btn {
    width: 120px;
    height: 30px;
    background: #fff;
    color: #16a34a;
    font-size: 0.75rem;
    display: inline-block;
    padding: 0.25rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  /* ---- Product Grid ---- */
  .product-grid-section {
    margin-bottom: 2.5rem;
  }
  .section-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .see-all {
    font-size: 0.875rem;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .product-card {
    font-size: 0.9375rem;
  }
  .card-inner {
    border-radius: 0.75rem;
  }
  .image-container {
    height: 9rem;
  }
  .product-img {
    height: 9rem;
  }
  .product-info {
    padding: 0.75rem;
  }
  .product-name {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
    line-height: 1.3;
  }
  .product-meta {
    font-size: 0.75rem;
    gap: 0.375rem;
    flex-wrap: wrap;
  }
  .free-shipping,
  .condition {
    font-size: 0.625rem;
  }
  .price-row {
    gap: 0.375rem;
  }
  .price-current {
    font-size: 1rem;
  }
  .price-old {
    font-size: 0.75rem;
  }

  /* ---- Deal Badge ---- */
  .deal-badge {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }

  /* ---- Floating Add to Cart Button ---- */
  .add-to-cart-btn {
    width: 2.25rem;
    height: 2.25rem;
    top: 0.5rem;
    right: 0.5rem;
  }
  .icon-cart {
    width: 1rem;
    height: 1rem;
  }

  /* ---- Line Clamp ---- */
  .line-clamp-2 {
    -webkit-line-clamp: 2;
  }

  /* ---- No Data Message ---- */
  .no-data {
    padding: 2rem 0;
    font-size: 1rem;
  }

  /* ---- Swiper Navigation (hide arrows on mobile) ---- */
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  .swiper-pagination {
    bottom: 0.5rem;
  }
  .swiper-pagination-bullet {
    width: 0.5rem;
    height: 0.5rem;
  }
}