:root {
    --primary-green: #16a34a;
    --primary-green-hover: #15803d;
    --primary-green-light: #f0fdf4;
    --header-height: 64px;
    --bottom-nav-height: 64px;
}

* {
    box-sizing: border-box;
}

/* ========== HEADER ========== */
.site-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 1.5rem;
        gap: 1.5rem;
    }
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1.25rem;
    }
}

.header-nav {
    display: none;
    gap: 0.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .header-nav {
        gap: 1.5rem;
    }
}

.header-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .header-nav a {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .header-nav a {
        font-size: 0.9375rem;
    }
}

.header-nav a:hover {
    color: var(--primary-green);
}

/* ========== HEADER SEARCH ========== */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-form:focus-within {
    background: white;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    outline: none;
}

.search-btn {
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.search-btn:hover {
    color: var(--primary-green);
}

/* ========== AUTH BUTTONS ========== */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .auth-buttons {
        gap: 0.75rem;
    }
}

.btn-auth {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-auth.primary {
    background: var(--primary-green);
    color: white;
}

.btn-auth.primary:hover {
    background: var(--primary-green-hover);
}

.btn-auth.outline {
    background: white;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
}

.btn-auth.outline:hover {
    background: var(--primary-green-light);
}

/* ========== WALLET & ICON BUTTONS ========== */
.wallet-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.wallet-badge.buyer {
    background: var(--primary-green);
    color: white;
}

.wallet-badge.buyer:hover {
    background: var(--primary-green-hover);
}

.wallet-badge.merchant {
    background: #2563eb;
    color: white;
}

.wallet-badge.merchant:hover {
    background: #1d4ed8;
}

.wallet-icon {
    font-size: 0.875rem;
}

.wallet-amount {
    white-space: nowrap;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #e5e7eb;
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== USER DROPDOWN ========== */
.user-dropdown {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar-btn:hover {
    background: #e5e7eb;
}

.user-avatar {
    font-size: 1.25rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 100;
}

.dropdown-header {
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-user-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9375rem;
}

.dropdown-user-email {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.25rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: var(--primary-green);
}

.dropdown-item.text-red-600 {
    color: #dc2626;
}

.dropdown-item.text-red-600:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ========== MOBILE MENU ========== */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay[style*="block"] {
    opacity: 1;
    pointer-events: auto;
}

.mobile-search {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-search .search-form {
    background: #f3f4f6;
}

.mobile-nav {
    padding: 0.5rem 0;
}

.mobile-nav-item {
    display: block;
    padding: 1rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.mobile-nav-item:hover {
    background: #f3f4f6;
    color: var(--primary-green);
}

.mobile-nav-item.text-red-600 {
    color: #dc2626;
}

.mobile-nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Mobile User Header */
.mobile-user-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px;
    line-height: 1;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mobile-user-email {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    height: var(--bottom-nav-height);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.5rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-green);
}

.bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.bottom-nav-label {
    font-size: 0.625rem;
    font-weight: 500;
}

.badge-count-bottom {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    width: 16px;
    height: 16px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: 1.5rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 767px) {
    .main-content {
        padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
    }
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1f2937;
    color: white;
    padding: 2.5rem 1rem 1.5rem;
    margin-top: 3rem;
}

.site-footer.has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
}

@media (min-width: 768px) {
    .site-footer {
        padding: 3rem 2rem 2rem;
    }
    .site-footer.has-bottom-nav {
        padding-bottom: 2rem;
    }
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 4rem;
    }
}

.footer-brand {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-brand {
        text-align: left;
        flex-shrink: 0;
    }
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-logo {
        font-size: 1.5rem;
        justify-content: flex-start;
    }
}

.footer-tagline {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-links {
        flex-direction: row;
        gap: 4rem;
        text-align: left;
    }
}

.footer-link-group h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .footer-link-group h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

.footer-link-group a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .footer-link-group a {
        font-size: 0.875rem;
        padding: 0.375rem 0;
    }
}

.footer-link-group a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        padding-top: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-bottom p {
    color: #6b7280;
    font-size: 0.75rem;
    margin: 0.25rem 0;
}

@media (min-width: 768px) {
    .footer-bottom p {
        font-size: 0.8125rem;
        margin: 0;
    }
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    left: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .toast-container {
        left: auto;
        width: auto;
        min-width: 300px;
    }
}

.toast-container.toast-success {
    background: var(--primary-green);
    color: white;
}

.toast-container.toast-error {
    background: #dc2626;
    color: white;
}

/* ========== PRODUCT CARDS (IMPROVED) ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-badges {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.125rem;
    padding: 0.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-card-badges::-webkit-scrollbar {
    display: none;
}

.product-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.5625rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .product-badge {
        padding: 0.1875rem 0.5rem;
        font-size: 0.625rem;
    }
}

.product-badge-discount {
    background: #ef4444;
    color: white;
}

.product-badge-new {
    background: var(--primary-green);
    color: white;
}

.product-badge-hot {
    background: #f97316;
    color: white;
}

.product-card-wishlist {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    font-size: 1rem;
}

.product-card-wishlist:hover {
    transform: scale(1.1);
}

.product-card-wishlist.active {
    color: #ef4444;
}

.product-card-content {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .product-card-content {
        padding: 1rem;
    }
}

.product-card-merchant {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.product-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-card-title {
        font-size: 0.9375rem;
    }
}

.product-card-price {
    margin-top: auto;
}

.product-card-original-price {
    font-size: 0.6875rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 0.125rem;
}

.product-card-current-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.product-card-discount-rate {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ef4444;
}

.product-card-amount {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
}

@media (min-width: 768px) {
    .product-card-amount {
        font-size: 1.0625rem;
    }
}

.product-card-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    color: #9ca3af;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

/* ========== SKELETON LOADING ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.skeleton-image {
    aspect-ratio: 1 / 1;
}

.skeleton-content {
    padding: 1rem;
}

.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

.skeleton-price {
    height: 1.25rem;
    width: 40%;
    margin-top: 0.75rem;
}

/* ========== LANDING PAGE ========== */
.landing-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .landing-hero {
        padding: 4rem 1rem;
    }
}

.landing-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-content {
    text-align: center;
}

.hero-tag {
    display: inline-block;
    background: white;
    color: var(--primary-green);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hero-headline {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-headline {
        font-size: 3rem;
    }
}

.text-brand {
    color: var(--primary-green);
}

.hero-subtext {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-subtext {
        font-size: 1.125rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.landing-btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.landing-btn-primary {
    background: var(--primary-green);
    color: white;
}

.landing-btn-primary:hover {
    background: var(--primary-green-hover);
    transform: translateY(-2px);
}

.landing-btn-secondary {
    background: #3b82f6;
    color: white;
}

.landing-btn-secondary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.landing-btn-outline {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.landing-btn-outline:hover {
    background: var(--primary-green-light);
}

.landing-btn-block {
    width: 100%;
}

/* ========== LANDING SECTIONS ========== */
.landing-section {
    padding: 3rem 1rem;
}

@media (min-width: 768px) {
    .landing-section {
        padding: 4rem 1rem;
    }
}

.landing-section-gray {
    background: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

.section-subtitle {
    font-size: 1rem;
    color: #6b7280;
}

/* ========== CATEGORY SECTION ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(8, 1fr);
        max-width: 100%;
    }
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: white;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .category-item {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
}

.category-item:hover {
    background: var(--primary-green-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.15);
    border-color: var(--primary-green);
}

.category-icon {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .category-icon {
        font-size: 2.5rem;
    }
}

.category-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
}

@media (min-width: 768px) {
    .category-label {
        font-size: 0.9375rem;
        font-weight: 600;
    }
}

/* ========== FILTER SECTION ========== */
.filter-section {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.channel-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.channel-tab {
    padding: 0.75rem 1rem;
    white-space: nowrap;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.channel-tab.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
    font-weight: 600;
}

/* ========== BUYER TABS ========== */
.buyer-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.buyer-tab {
    padding: 1rem 1rem;
    white-space: nowrap;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.buyer-tab.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
    font-weight: 600;
}

/* ========== TABLE RESPONSIVE ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .table-responsive table {
        display: none;
    }
}

.mobile-card-view {
    display: none;
}

@media (max-width: 767px) {
    .mobile-card-view {
        display: block;
    }

    .mobile-card {
        background: white;
        border-radius: 0.75rem;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .mobile-card-row:last-child {
        border-bottom: none;
    }

    .mobile-card-label {
        font-weight: 600;
        color: #6b7280;
        font-size: 0.875rem;
    }

    .mobile-card-value {
        color: #1f2937;
        font-size: 0.875rem;
        text-align: right;
    }
}

/* ========== UTILITIES ========== */
.touchable {
    min-height: 44px;
    min-width: 44px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
    font-size: 16px;
}

/* ========== KPI CARDS ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi-card {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.kpi-value-primary {
    color: var(--primary-green);
}

.kpi-value-danger {
    color: #ef4444;
}

/* ========== FEATURE CARDS ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
    }
}

.feature-card {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-green);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

.feature-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.375rem;
}

@media (min-width: 768px) {
    .feature-title {
        font-size: 1.0625rem;
        margin-bottom: 0.5rem;
    }
}

.feature-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .feature-desc {
        font-size: 0.8125rem;
        line-height: 1.6;
    }
}

/* ========== INFO CARDS ========== */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .two-col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-card-primary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.info-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.info-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #374151;
}

.info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 700;
}

/* ========== VISION SECTION ========== */
.landing-section-vision {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.vision-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.vision-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .vision-title {
        font-size: 2.5rem;
    }
}

.vision-text {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* ========== STICKY CTA ========== */
.sticky-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    z-index: 40;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .sticky-bottom-cta {
        display: none;
    }
}

/* ========== IMAGE GALLERY ========== */
.image-gallery-thumb {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .image-gallery-thumb {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========== LOGIN FORM ========== */
.hero-login-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.login-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.login-form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .login-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
    }
}

.login-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.login-form-footer {
    margin-top: 0.75rem;
    text-align: center;
}

.login-signup-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.875rem;
}

.login-signup-link:hover {
    text-decoration: underline;
}

/* ========== CART SUMMARY ========== */
.cart-summary-mobile {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    margin: 0 -1rem -1.5rem;
}

@media (min-width: 1024px) {
    .cart-summary-mobile {
        position: static;
        border-top: none;
        padding: 0;
        margin: 0;
    }
}

/* ========== MOBILE FILTER ========== */
.mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .mobile-filter-toggle {
        display: none;
    }
}

.filter-content {
    display: none;
}

.filter-content.show {
    display: block;
}

@media (min-width: 640px) {
    .filter-content {
        display: block !important;
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .filter-grid {
        grid-template-columns: 1fr auto auto auto;
    }
}

/* ========== REGION SELECTOR BAR ========== */
.region-selector-bar {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 1px solid #bbf7d0;
    padding: 0.625rem 0;
    position: sticky;
    top: var(--header-height);
    z-index: 40;
}

.region-selector-bar .text-green-600 {
    color: var(--primary-green);
}

[x-cloak] {
    display: none !important;
}
