/* =========================================
   ROVER MART - HOME PAGE STYLES (css/style.css)
   ========================================= */

/* --- HERO SECTION --- */
.hero-banner { 
    background: linear-gradient(rgba(0,40,90,0.8), rgba(0,40,90,0.8)), url('../images/bg.jpg') center/cover no-repeat; 
    text-align: center; 
    color: var(--white); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 0 20px;
    height: 75vh; 
}

.hero-banner h1 { 
    font-size: 3.5rem; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5); 
    margin-bottom: 15px; 
    font-family: 'Playfair Display', serif;
}

.hero-banner p { 
    font-size: 1.1rem; 
    max-width: 600px; 
    margin-bottom: 30px; 
    opacity: 0.9; 
}

/* --- SHOP BY CATEGORY (Horizontal Scroll / Swipe) --- */
.categories-section {
    padding: 50px 20px;
    background: #fff;
    text-align: center;
}

.categories-section h2, .trending-products h2, .customization-banner h2 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.category-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
}

/* Hide scrollbar Chrome/Safari/Webkit */
.category-slider::-webkit-scrollbar {
    display: none; 
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 90px;
    scroll-snap-align: start;
}

.category-item img {
    width: 75px; 
    height: 75px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid var(--border-color);
    padding: 5px;
    transition: 0.3s;
    background: #fdfdfd;
}

.category-item:hover img {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2);
}

.category-item span {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    margin-top: 10px;
}

/* --- TRENDING PRODUCTS GRID --- */
.trending-products {
    padding: 50px 20px;
    background: var(--bg-color);
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid var(--border-color);
}

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

.product-card img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
    aspect-ratio: 1/1;
    object-fit: contain; 
    background: #f9f9f9;
}

.product-card h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    height: 2.8em; /* restrict to 2 lines */
    overflow: hidden;
}

.product-card .price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.add-to-cart-btn:hover { background: var(--primary-dark); }

/* --- BANNERS --- */
.customization-banner {
    padding: 60px 20px;
    text-align: center;
    background: #e9f2fb;
    border-top: 1px solid #d1e3f8;
    border-bottom: 1px solid #d1e3f8;
}

.customization-banner p { color: #555; margin-bottom: 25px; font-size: 1.1rem; }

/* --- USP SECTION --- */
.usp-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    background: #fff;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
}

.usp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
    font-weight: 600;
}

.usp-item i { font-size: 30px; color: var(--primary); }

/* --- MOBILE RESPONSIVE (Index Specific) --- */
@media (max-width: 768px) {
    .hero-banner { height: 60vh; }
    .hero-banner h1 { font-size: 2.2rem; }
    .categories-section h2, .trending-products h2, .customization-banner h2 { font-size: 1.8rem; }
    .usp-section { gap: 20px; }
    
    /* Product grid adjustments for smaller phones */
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns on mobile */
        gap: 10px;
    }
    .product-card { padding: 10px; }
    .product-card .price { font-size: 1.1rem; }
    .add-to-cart-btn { font-size: 0.9rem; padding: 8px; }
}