/* Home Page Styles */

.home-page {
    background: var(--bg-surface);
    overflow-x: hidden;
    max-width: 100vw;
}

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: var(--space-md);
}

.hero-slide {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.hero-content h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.hero-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-md);
}

/* Section Styles */
.section-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-extrabold);
    margin: 0 0 var(--space-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.section-link {
    font-size: var(--font-size-sm);
    color: var(--accent);
    font-weight: var(--font-weight-semibold);
}

/* Categories */
.home-categories {
    padding: var(--space-md);
    background: white;
    margin-bottom: var(--space-md);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--primary);
    padding: 12px 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    min-width: 0;
}

.category-card:active {
    transform: scale(0.97);
    border-color: var(--primary);
}

.category-card img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 6px;
}

.category-card span {
    font-size: 12px;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

/* Products Section */
.home-products {
    padding: var(--space-md) 0;
    background: white;
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.home-products .section-header {
    padding: 0 var(--space-md);
}

.product-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 var(--space-md) var(--space-sm);
}

.product-carousel::-webkit-scrollbar {
    display: none;
}

.product-card-mini {
    flex: 0 0 140px;
    scroll-snap-align: start;
}

.product-card-mini a {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
}

.product-card-mini img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.product-card-mini h3 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-mini .price {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
}

/* Banner */
.home-banner {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-md);
}

.banner-card {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    text-align: center;
}

.banner-card h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.banner-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-lg);
}

.banner-card .btn {
    background: white;
    color: var(--accent);
}

/* Responsive */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .product-card-mini {
        flex: 0 0 180px;
    }
    
    .product-card-mini img {
        width: 180px;
        height: 180px;
    }
}
