/* ================================================
   View Switcher & Modern Product List Styles
   Cromwell-Inspired Design
   ================================================ */

/* View Switcher Component */
.containerOuter.fluid-container {
    max-width: 100% !important;
    padding: 0 40px;
}

@media (max-width: 767px) {
    .containerOuter.fluid-container {
        padding: 0 20px;
    }
}

.viewSwitcherOuter {
    display: flex;
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0 20px;
    border: 1px solid #ddd;
}

.viewBtn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-right: 1px solid #ddd;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.viewBtn:last-child {
    border-right: none;
}

.viewBtn:hover {
    background: #f5f5f5;
    color: #333;
}

.viewBtn.active {
    background: #00286e;
    color: #fff;
}

.viewBtn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 767px) {
    .viewSwitcherOuter {
        margin: 0 10px;
    }

    .viewBtn {
        width: 36px;
        height: 36px;
    }
}

/* ================================================
   Grid View Styles (Cromwell-Inspired)
   ================================================ */

.listOuter.grid-view .list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

@media (max-width: 1366px) {
    .listOuter.grid-view .list {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .listOuter.grid-view .list {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .listOuter.grid-view .list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .listOuter.grid-view .list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 4-Column Wide Card Layout */
.listOuter.grid-view .list li {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-width: none;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
}

.listOuter.grid-view .list li.show {
    max-height: none;
}

.listOuter.grid-view .list li:hover {
    border-color: #00286e;
    box-shadow: 0 4px 12px rgba(0, 40, 110, 0.15);
    transform: translateY(-2px);
}

.listOuter.grid-view .list li a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

/* Ultra-Compact Image Container */
.listOuter.grid-view .list .imgOuter {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 5px;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box;
}

.listOuter.grid-view .list .imgOuter .img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.listOuter.grid-view .list li:hover .imgOuter .img {
    transform: scale(1.05);
}

/* Ultra-Compact Text Container */
.listOuter.grid-view .list .productInfo {
    padding: 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
    box-sizing: border-box;
}

.listOuter.grid-view .list .productInfo .text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 48px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.listOuter.grid-view .list .productInfo .description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive adjustments */
@media (max-width: 1366px) {
    .listOuter.grid-view .list .imgOuter {
        height: 220px;
        padding: 12px;
    }

    .listOuter.grid-view .list .productInfo {
        padding: 15px;
    }

    .listOuter.grid-view .list .productInfo .text {
        font-size: 14px;
    }

    .listOuter.grid-view .list .productInfo .description {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .listOuter.grid-view .list .imgOuter {
        height: 200px;
        padding: 12px;
    }
}

/* ================================================
   List View Styles (Cromwell-Inspired)
   ================================================ */

.listOuter.list-view .list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.listOuter.list-view .list li {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.listOuter.list-view .list li:hover {
    border-color: #00286e;
    box-shadow: 0 2px 8px rgba(0, 40, 110, 0.1);
}

.listOuter.list-view .list li a {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    min-height: 150px;
}

.listOuter.list-view .list .imgOuter {
    width: 200px;
    min-width: 200px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
}

.listOuter.list-view .list .imgOuter .img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.listOuter.list-view .list .productInfo {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.listOuter.list-view .list .productInfo .text {
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .listOuter.list-view .list li a {
        flex-direction: column;
        min-height: auto;
    }

    .listOuter.list-view .list .imgOuter {
        width: 100%;
        min-width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .listOuter.list-view .list .imgOuter .img {
        max-height: 150px;
    }

    .listOuter.list-view .list .productInfo {
        padding: 15px;
    }

    .listOuter.list-view .list .productInfo .text {
        font-size: 14px;
    }
}

/* ================================================
   Modern Pagination Styles
   ================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 50px 0 30px 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 767px) {
    .pagination {
        margin: 40px 0 20px 0;
        gap: 4px;
    }
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination .page-link:hover {
    border-color: #00286e;
    background: #00286e;
    color: #fff;
}

.pagination .page-item.active .page-link {
    border-color: #00286e;
    background: #00286e;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .firstLink,
.pagination .lastLink {
    gap: 6px;
}

.pagination .firstLink span,
.pagination .lastLink span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pagination .pageIcon {
    font-size: 14px;
}

@media (max-width: 767px) {
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    .pagination .firstLink span,
    .pagination .lastLink span {
        display: none;
    }

    .pagination .firstLink,
    .pagination .lastLink {
        min-width: 36px;
    }
}

@media (max-width: 480px) {
    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 12px;
    }

    .pagination .firstLink,
    .pagination .lastLink {
        min-width: 32px;
    }
}

/* ================================================
   Layout Transitions
   ================================================ */

.listOuter {
    transition: all 0.2s ease;
}

.listOuter .list li {
    animation: fadeInUp 0.3s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for list items */
.listOuter .list li:nth-child(1) {
    animation-delay: 0.03s;
}

.listOuter .list li:nth-child(2) {
    animation-delay: 0.06s;
}

.listOuter .list li:nth-child(3) {
    animation-delay: 0.09s;
}

.listOuter .list li:nth-child(4) {
    animation-delay: 0.12s;
}

.listOuter .list li:nth-child(5) {
    animation-delay: 0.15s;
}

.listOuter .list li:nth-child(6) {
    animation-delay: 0.18s;
}

.listOuter .list li:nth-child(7) {
    animation-delay: 0.21s;
}

.listOuter .list li:nth-child(8) {
    animation-delay: 0.24s;
}

.listOuter .list li:nth-child(9) {
    animation-delay: 0.03s;
}

.listOuter .list li:nth-child(10) {
    animation-delay: 0.06s;
}

.listOuter .list li:nth-child(11) {
    animation-delay: 0.09s;
}

.listOuter .list li:nth-child(12) {
    animation-delay: 0.12s;
}

/* Pagination in Header */
.productionListOuter .header .pagination {
    margin: 0;
    margin-left: auto;
    margin-right: 20px;
}

/* View Switcher in Header */
.productionListOuter .header .viewSwitcherOuter {
    margin: 0;
}

@media (max-width: 900px) {
    .productionListOuter .header {
        flex-wrap: wrap;
    }

    .productionListOuter .header .pagination {
        width: auto;
        margin-left: auto;
        margin-right: 10px;
        margin-top: 0;
    }

    .productionListOuter .header .viewSwitcherOuter {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .productionListOuter .header .pagination {
        width: 100%;
        justify-content: flex-end;
        margin-right: 0;
        margin-top: 10px;
        order: 3;
    }

    .productionListOuter .header .viewSwitcherOuter {
        order: 2;
        margin-left: auto;
    }
}