/* Minimal utility CSS for bootstrap phase */
/* Replace with TailwindCSS CLI output for production */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; }

/* Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.grid { display: grid; }
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.min-h-screen { min-height: 100vh; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Spacing */
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.p-5 { padding: 1.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-12 { margin-bottom: 3rem; }
.p-6 { padding: 1.5rem; }
.max-w-2xl { max-width: 42rem; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.leading-snug { line-height: 1.375; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Colors */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-100 { background-color: #dcfce7; }
.bg-amber-50 { background-color: #fffbeb; }
.text-white { color: #fff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-900 { color: #111827; }
.text-blue-600 { color: #2563eb; }
.text-green-800 { color: #166534; }
.text-amber-400 { color: #fbbf24; }
.text-amber-800 { color: #92400e; }
.border-gray-200 { border-color: #e5e7eb; }
.border-amber-200 { border-color: #fde68a; }

/* Borders & Rounded */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Effects */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.transition-shadow { transition: box-shadow 0.2s; }
.transition-colors { transition: color 0.2s, background-color 0.2s; }

/* Interactive */
a { text-decoration: none; color: inherit; }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.block { display: block; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.nav-links { display: flex; gap: 0.5rem; font-size: 0.8125rem; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: #4b5563; padding: 0.25rem 0.5rem; border-radius: 0.375rem; transition: background 0.15s, color 0.15s; }
.nav-links a:hover { background: #f3f4f6; color: #111827; }

/* Product images */
.product-img { max-width: 100%; height: auto; max-height: 160px; object-fit: contain; display: block; }

/* ===== Homepage & Category Components ===== */

/* Hero */
.hero { text-align: center; padding: 3rem 1rem 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid #e5e7eb; }
.hero-title { font-size: 2.25rem; font-weight: 800; color: #111827; letter-spacing: -0.025em; margin-bottom: 0.75rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.125rem; color: #6b7280; max-width: 36rem; margin: 0 auto; line-height: 1.6; }

/* Sections */
.section { margin-bottom: 3rem; }
.section-header { margin-bottom: 1.5rem; }
.section-title { font-size: 1.375rem; font-weight: 700; color: #111827; margin-bottom: 0.375rem; }
.section-desc { font-size: 0.9375rem; color: #6b7280; }

/* Card grid */
.card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }

/* Category cards */
.category-card {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 0.75rem;
    overflow: hidden; text-decoration: none; color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}
.category-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.category-card--accent { border-color: #bbf7d0; background: linear-gradient(to bottom, #f0fdf4, #fff 40%); }

.category-card__img-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem 1rem 0.75rem; height: 140px;
}
.category-card__img { max-height: 120px; max-width: 100%; object-fit: contain; }

.category-card__body { padding: 0 1.25rem 1.25rem; }
.category-card__title { font-size: 0.9375rem; font-weight: 600; color: #111827; margin-bottom: 0.375rem; line-height: 1.35; }
.category-card__badge {
    display: inline-block; font-size: 0.75rem; font-weight: 500;
    color: #6b7280; background: #f3f4f6; padding: 0.175rem 0.5rem;
    border-radius: 9999px;
}
.category-card__badge--green { color: #166534; background: #dcfce7; }

/* Department grid */
.dept-grid {
    display: grid; gap: 0.75rem;
    grid-template-columns: repeat(2, 1fr);
}
.dept-card {
    display: flex; flex-direction: column; align-items: center;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
    padding: 1.25rem 0.75rem; text-align: center;
    text-decoration: none; color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}
.dept-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.dept-card__img-wrap { height: 72px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.dept-card__img { max-height: 72px; max-width: 90%; object-fit: contain; }
.dept-card__label { font-size: 0.8125rem; font-weight: 600; color: #111827; line-height: 1.3; }

/* Trending strip */
.trending-strip { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.trending-item {
    flex: 0 0 260px; display: flex; gap: 0.75rem; align-items: center;
    background: linear-gradient(135deg, #f0fdf4, #fff); border: 1px solid #bbf7d0;
    border-radius: 0.75rem; padding: 0.75rem; text-decoration: none; color: inherit;
    transition: box-shadow 0.2s;
}
.trending-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.trending-item__img { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.trending-item__body { min-width: 0; }
.trending-item__dept { display: block; font-size: 0.6875rem; font-weight: 600; color: #16a34a; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.125rem; }
.trending-item__title { display: block; font-size: 0.75rem; color: #374151; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-item__badge { display: inline-block; font-size: 0.6875rem; font-weight: 600; color: #166534; background: #dcfce7; padding: 0.1rem 0.375rem; border-radius: 9999px; margin-top: 0.25rem; }

/* How it works */
.how-it-works {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
    padding: 2rem 1.5rem; text-align: center;
}
.how-it-works__title { font-size: 1.25rem; font-weight: 700; color: #111827; margin-bottom: 1.5rem; }
.how-it-works__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.how-it-works__step { padding: 0 0.5rem; }
.how-it-works__icon {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: #2563eb; color: #fff; font-weight: 700; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 0.75rem;
}
.how-it-works__step-title { font-size: 0.9375rem; font-weight: 600; color: #111827; margin-bottom: 0.25rem; }
.how-it-works__step-desc { font-size: 0.8125rem; color: #6b7280; line-height: 1.5; }

/* ===== Responsive ===== */

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .dept-grid { grid-template-columns: repeat(3, 1fr); }
    .how-it-works__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .dept-grid { grid-template-columns: repeat(4, 1fr); }
}
