/* ==============================================
   INDEX PAGE STYLES - ORANGE THEME
   ============================================== */

/* Store Status Message */
.store-status-message {
    background: linear-gradient(45deg, var(--danger), #e53e3e);
    color: white;
    padding: 15px 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: var(--radius);
    font-weight: 600;
    display: none;
}

.store-status-message.show {
    display: block;
}

.store-status-message i {
    margin-right: 10px;
}

/* Main Carousel Slider */
.main-slider {
    margin: 30px 0;
    position: relative;
    border-radius: 0; /* Changed from var(--radius) to 0 for full width */
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.slide {
    position: relative;
    height: 400px;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px;
}

.slide-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 600px;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    padding: 0;
    margin: 0;
}

.category-card {
    background: white;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary);
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* Category Products Section */
.category-products-section {
    padding: 40px 0;
    width: 100%;
    margin: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
    width: 100%;
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    padding-left: 20px; /* Add padding here instead of on parent */
}

.view-all-category {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding-right: 20px; /* Add padding here instead of on parent */
}

.view-all-category i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-all-category:hover i {
    transform: translateX(5px);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 0 20px; /* Only side padding for mobile */
    margin: 0 0 40px 0;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .image-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    font-weight: 600;
    padding: 8px 15px;
    border: 2px solid white;
    border-radius: 25px;
    font-size: 14px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.product-name a {
    color: var(--gray-800);
    text-decoration: none;
}

.product-name a:hover {
    color: var(--primary);
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.original-price {
    font-size: 14px;
    color: var(--gray-500);
    text-decoration: line-through;
}

.product-availability {
    margin-bottom: 12px;
}

.in-stock {
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
}

.out-of-stock {
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

.product-actions {
    margin-top: 15px;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.add-to-cart-btn svg {
    width: 14px;
    height: 14px;
}

.out-of-stock-btn {
    width: 100%;
    padding: 10px 15px;
    background: var(--gray-200);
    color: var(--gray-600);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: not-allowed;
    font-size: 14px;
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    padding: 12px 25px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 20px; /* Side margins for mobile */
}

.view-all-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Full Width Container Override */
.container {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.body-content.outer-top-xs {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#top-banner-and-menu {
    width: 100% !important;
    max-width: 100% !important;
}

/* Loading Overlay Fix */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none; /* Fixed: hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive Styles for Index Page */
@media (min-width: 768px) {
    .products-grid {
        padding: 0; /* Remove side padding on desktop */
    }
    
    .category-title {
        padding-left: 0;
    }
    
    .view-all-category {
        padding-right: 0;
    }
    
    .view-all-btn {
        margin: 0; /* Remove side margins on desktop */
    }
}

@media (max-width: 768px) {
    .slide {
        height: 250px;
    }

    .slide-content {
        padding: 15px;
        text-align: center;
    }

    .slide-content h2 {
        font-size: 20px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 15px; /* Add side padding for mobile */
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px; /* Ensure side padding for mobile */
    }

    .product-image {
        height: 150px;
    }

    .product-name {
        font-size: 14px;
    }

    .current-price {
        font-size: 14px;
    }

    .original-price {
        font-size: 12px;
    }

    .add-to-cart-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .slide {
        height: 200px;
    }

    .slide-content h2 {
        font-size: 18px;
    }

    .slide-content p {
        font-size: 13px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 10px; /* Reduced padding for very small screens */
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px; /* Reduced padding for very small screens */
    }

    .product-image {
        height: 130px;
    }

    .product-name {
        font-size: 13px;
    }

    .add-to-cart-btn {
        font-size: 12px;
        padding: 7px 10px;
    }
    
    .category-title {
        padding-left: 10px;
        font-size: 18px;
    }
    
    .view-all-category {
        padding-right: 10px;
        font-size: 14px;
    }
}