/**
 * ComprasGuate Theme — Homepage styles.
 * Loaded only on the front page (is_front_page).
 */

/* =========================
   PAGE WRAPPER
   ========================= */
.cg-page-wrap {
  background: var(--c-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  margin-top: 16px;
  overflow: hidden;
}

/* =========================
   HERO BANNER
   ========================= */
.cg-hero {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDBA74 100%);
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 500px;
}
.cg-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}
.cg-hero-tag {
  display: inline-block;
  background: var(--c-sale);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  width: fit-content;
  position: relative;
  z-index: 1;
}
.cg-hero-title {
  font-size: 56px;
  font-weight: 900;
  color: #7C2D12;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}
.cg-hero-subtitle {
  font-size: 18px;
  color: #7C2D12;
  margin: 0 0 24px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.cg-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.cg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--c-blue);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.cg-btn:hover { background: var(--c-blue-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.cg-hero-timer {
  font-size: 13.5px;
  font-weight: 700;
  color: #7C2D12;
  background: rgba(255, 255, 255, 0.55);
  padding: 8px 14px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .cg-hero { padding: 28px 22px; min-height: 280px; }
  .cg-hero::after { width: 200px; height: 200px; right: -40px; }
  .cg-hero-title { font-size: 38px; }
  .cg-hero-subtitle { font-size: 15px; }
}

/* =========================
   SECTION HEADER (shared)
   ========================= */
.cg-section {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 16px;
}
.cg-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cg-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cg-section-title .icon { color: var(--c-hot); font-size: 18px; }
.cg-see-all {
  font-size: 12px;
  color: var(--c-blue);
  font-weight: 700;
  text-decoration: none;
}
.cg-see-all:hover { text-decoration: underline; }

/* =========================
   CATEGORY STRIP (round icons row)
   ========================= */
.cg-category-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
}
@media (max-width: 1280px) { .cg-category-strip { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 768px)  { .cg-category-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px)  { .cg-category-strip { grid-template-columns: repeat(3, 1fr); } }

.cg-category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--c-text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: transform 0.12s, background 0.12s;
}
.cg-category-tile:hover { transform: translateY(-2px); background: #F9FAFB; color: var(--c-text); text-decoration: none; }
.cg-category-emoji {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.cg-category-name {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* =========================
   PRODUCT GRID
   ========================= */
.cg-product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1280px) { .cg-product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .cg-product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .cg-product-grid { grid-template-columns: repeat(2, 1fr); } }

.cg-product-card {
  display: block;
  text-decoration: none;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 12px;
  position: relative;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  cursor: pointer;
}
.cg-product-card:hover {
  border-color: var(--c-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 115, 190, 0.10);
  color: var(--c-text);
  text-decoration: none;
}

.cg-product-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.cg-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cg-product-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color 0.12s;
  opacity: 0;
}
.cg-product-card:hover .cg-product-fav { opacity: 1; }
.cg-product-fav:hover { color: var(--c-sale); }
.cg-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 2;
  letter-spacing: 0.04em;
}
.cg-product-badge--sale { background: var(--c-sale); color: #fff; }
.cg-product-badge--hot  { background: var(--c-promo); color: var(--c-promo-text); }
.cg-product-badge--new  { background: var(--c-trust); color: #fff; }

.cg-product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.cg-product-vendor {
  font-size: 11.5px;
  color: var(--c-text-muted);
  margin: 0 0 6px;
}
.cg-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.cg-product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-text);
}
.cg-product-price--sale { color: var(--c-sale); }
.cg-product-price-old {
  font-size: 12px;
  color: var(--c-text-muted);
  text-decoration: line-through;
}
.cg-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--c-text-muted);
}
.cg-product-shipping { color: var(--c-trust); font-weight: 600; }
.cg-product-rating { display: inline-flex; align-items: center; gap: 4px; }
.cg-product-rating .stars { color: #FBBF24; }

/* =========================
   TRUST FEATURES STRIP (4 columns)
   ========================= */
.cg-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 768px) { .cg-features { grid-template-columns: repeat(2, 1fr); } }
.cg-feature {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cg-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--c-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cg-feature h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 4px;
}
.cg-feature p {
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.4;
}
