/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Segoe UI', Tahoma, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.page-subtitle {
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.95;
}

/* Container */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    position: sticky;
    top: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.category-list {
    list-style: none;
    padding: 8px 0;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-left: 3px solid transparent;
    position: relative;
    margin: 4px 8px;
    border-radius: 8px;
}

.category-item:first-child {
    border-top: none;
}

.category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 4px 4px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.category-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.category-item:hover::before {
    width: 3px;
    height: 60%;
    opacity: 1;
}

.category-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    border-left: 3px solid #667eea;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.category-item.active::before {
    width: 3px;
    height: 60%;
    opacity: 1;
}

.category-name {
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-item:hover .category-name {
    color: #667eea;
    transform: translateX(4px);
}

.category-item.active .category-name {
    color: #667eea;
    font-weight: 600;
}

.category-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.category-item.active .category-number {
    background: #5568d3;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.category-name {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 0.3px;
}

.category-item.active .category-name {
    color: #333;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Pooja Grid */
.pooja-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Pooja Card */
.pooja-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pooja-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f0f0f0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pooja-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    /* padding: 20px; */
    display: flex;
    flex-direction: column;
    /* gap: 12px; */
    flex: 1;
}

.pooja-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.4;
    /* min-height: 50px; */
    display: flex;
    padding-top: 5px;
    align-items: center;
    justify-content: center;
}

.price-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* padding: 10px 0; */
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.book-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-btn:hover {
    text-decoration: none;
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* No Products Message */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-products p {
    font-size: 1.1rem;
    color: #666;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-filter-btn:hover {
    transform: scale(1.05);
}

.mobile-filter-btn span {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pooja-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 9999;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        width: 300px;
        overflow-y: auto;
        background: white;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        left: 0;
        animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    .sidebar-header {
        display: block !important;
        background: #667eea;
        padding: 20px;
        border-bottom: none;
        text-align: center;
    }

    .sidebar-header h3 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0;
    }

    .category-list {
        padding-top: 0;
    }

    .category-item {
        padding: 15px 20px;
    }

    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-filter-btn.visible {
        display: flex !important;
    }

    .search-input {
        padding: 12px 15px;
    }

    .main-content {
        width: 100%;
    }

    .pooja-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-image {
        height: 200px;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 0;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .pooja-title {
        font-size: 1rem;
        min-height: 45px;
    }

    .current-price {
        font-size: 1.2rem;
    }

    .original-price {
        font-size: 0.9rem;
    }

    .book-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .card-content {
        padding: 15px;
    }
}

/* Laravel Pagination Styling - Override Bootstrap */
.pagination-wrapper {
    overflow-x: auto;
    padding: 20px 0;
}

.pagination-wrapper .pagination,
.pagination-wrapper nav ul.pagination,
.pagination-wrapper nav .pagination {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.pagination-wrapper .pagination li,
.pagination-wrapper nav ul.pagination li {
    display: inline-block !important;
    margin: 0 2px !important;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span,
.pagination-wrapper .pagination .page-link,
.pagination-wrapper .pagination .page-item span,
.pagination-wrapper nav ul.pagination li a,
.pagination-wrapper nav ul.pagination li span {
    padding: 8px 12px !important;
    border: 1px solid #e0e0e0 !important;
    background: white !important;
    color: #667eea !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    min-width: 36px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.pagination-wrapper .pagination li a:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.pagination-wrapper .pagination li.active .page-link,
.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination .active span {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.pagination-wrapper .pagination li.disabled .page-link,
.pagination-wrapper .pagination li.disabled span,
.pagination-wrapper .pagination .disabled span {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    color: #999 !important;
    background: #f5f5f5 !important;
}

/* Arrow/Pagination Button Styling */
.pagination-wrapper .pagination li:first-child a,
.pagination-wrapper .pagination li:first-child span,
.pagination-wrapper .pagination li:last-child a,
.pagination-wrapper .pagination li:last-child span,
.pagination-wrapper .pagination .page-item:first-child .page-link,
.pagination-wrapper .pagination .page-item:last-child .page-link,
.pagination-wrapper nav ul.pagination li:first-child a,
.pagination-wrapper nav ul.pagination li:last-child a {
    padding: 8px 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    min-width: 36px !important;
    width: auto !important;
}

/* Hide the mobile-only pagination section in bootstrap-5 */
.pagination-wrapper .d-flex.d-sm-none {
    display: none !important;
}

/* Row Pagination Styling */
.row-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    width: 100%;
}

.row-pagination .pagination,
.row-pagination nav ul.pagination {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

.row-pagination .pagination li,
.row-pagination nav ul.pagination li {
    display: inline-block !important;
    margin: 0 2px !important;
}

.row-pagination .pagination li a,
.row-pagination .pagination li span,
.row-pagination .pagination .page-link,
.row-pagination .pagination .page-item span {
    padding: 8px 12px !important;
    border: 1px solid #e0e0e0 !important;
    background: white !important;
    color: #667eea !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    min-width: 36px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.row-pagination .pagination li a:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.row-pagination .pagination li.active .page-link,
.row-pagination .pagination li.active span {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.row-pagination .pagination li.disabled .page-link,
.row-pagination .pagination li.disabled span {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    color: #999 !important;
    background: #f5f5f5 !important;
}

.row-pagination .pagination li:first-child a,
.row-pagination .pagination li:last-child a {
    padding: 8px 10px !important;
    font-size: 16px !important;
}

/* Ensure SVG icons in pagination are small */
.pagination-wrapper .pagination svg,
.pagination-wrapper .pagination i,
.pagination-wrapper nav svg,
.pagination-wrapper nav i {
    width: 12px !important;
    height: 12px !important;
    display: inline-block !important;
}
