/* public/assets/css/index.css */

/* ========== 1. General ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent {
  color: var(--brand-accent);
}

/* ========== 2. Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  color: var(--brand-primary);
}

.logo-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.5px;
}

.main-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.main-nav a {
  color: var(--brand-primary);
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--brand-accent);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* ========== 3. Hero ========== */
.hero {
  padding: 3.5rem 0;
  background-color: var(--brand-light);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: #E6EEF7;
  color: var(--brand-primary);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--brand-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-search-box {
  background: white;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hero-search-box label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-muted);
}

.hero-search-box input {
  min-height: 50px;
  padding: 0 1rem;
  border: 1px solid var(--brand-border);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  background: var(--brand-light);
}

.hero-search-box input:focus {
  outline: none;
  border-color: var(--brand-accent);
  background: white;
}

.search-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-tags .tag {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
}

.search-tags .tag.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

/* ========== 4. Products Grid ========== */
.products-section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.view-all {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-accent);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: white;
  border: 1px solid var(--brand-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #E8EDF3;
}

.product-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.badge-verified {
  background: #E5F3EC;
  color: #1F7A4D;
}

.badge-buyer {
  background: #E6EEF7;
  color: var(--brand-primary);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 0.25rem;
}

.product-vendor {
  font-size: 0.85rem;
  color: var(--brand-muted);
  margin-bottom: 1rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--brand-border);
  font-size: 0.85rem;
  margin-top: auto;
}

.product-price {
  color: var(--brand-accent);
  font-weight: 700;
}

/* Loading State */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--brand-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--brand-border);
  border-top-color: var(--brand-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 5. Footer ========== */
.site-footer {
  border-top: 1px solid var(--brand-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--brand-muted);
  font-size: 0.9rem;
  background: white;
}

/* ========== 6. Responsive ========== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
  }
  .hero-title {
    font-size: 2rem;
  }
}