.wifri-grid-container {
    display: grid;
    gap: 0;
    width: 100%;
    align-items: start;
}

.wifri-grid-item {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Vertical dividers between items */
.wifri-grid-item:not(:last-child) {
    border-right: 1px solid #e0e0e0;
}

.wifri-icon {
    width: 70px;
    height: 70px;
    border: 2px solid #d3d3d3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: transparent;
}

.wifri-icon i {
    font-size: 30px;
    color: #4a5d23;
}

.wifri-icon svg {
    width: 30px;
    height: 30px;
    fill: #4a5d23;
}

.wifri-title {
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

.wifri-desc {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #444444;
    margin: 0;
    max-width: 200px;
}

/* Mobile Slider Container */
.wifri-grid-container-mobile-slider {
    display: none;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.wifri-grid-container-mobile-slider.swiper {
    width: 100%;
    height: auto;
    padding-bottom: 60px;
    overflow: hidden;
}

.wifri-grid-container-mobile-slider .swiper-wrapper {
    display: flex;
    width: 100%;
}

.wifri-grid-container-mobile-slider .swiper-slide {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wifri-grid-container-mobile-slider .swiper-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    width: auto;
}

.wifri-grid-container-mobile-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d3d3d3;
    opacity: 1;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    margin: 0 4px;
}

.wifri-grid-container-mobile-slider .swiper-pagination-bullet-active {
    background: #4a5d23;
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wifri-grid-container {
        display: none !important;
    }

    .wifri-grid-container-mobile-slider {
        display: block !important;
    }

    .wifri-grid-item {
        padding: 40px 20px;
        border: none !important;
        min-height: 300px;
        justify-content: center;
    }

    .wifri-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 25px;
    }

    .wifri-icon i {
        font-size: 40px;
    }

    .wifri-icon svg {
        width: 40px;
        height: 40px;
    }

    .wifri-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .wifri-desc {
        font-size: 15px;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .wifri-grid-item {
        padding: 30px 15px;
        min-height: 220px;
    }

    .wifri-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .wifri-icon i {
        font-size: 35px;
    }

    .wifri-icon svg {
        width: 35px;
        height: 35px;
    }

    .wifri-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .wifri-desc {
        font-size: 13px;
        max-width: 250px;
    }

    .wifri-grid-container-mobile-slider .swiper-pagination {
        bottom: 10px;
        gap: 6px;
    }

    .wifri-grid-container-mobile-slider .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

/* ===== POST GRID WIDGET STYLES ===== */

/* Section Header */
.wifri-post-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.wifri-post-header-left {
    flex: 1;
    min-width: 200px;
}

.wifri-post-section-title {
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
    letter-spacing: 1.5px;
    line-height: 1.2;
}

.wifri-post-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 46px;
    height: 4px;
    background-color: #c0392b;
}

.wifri-post-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-top: 4px;
}

.wifri-post-view-all {
    font-size: 12px;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.wifri-post-view-all:hover {
    color: #96281b;
}

/* Grid Container */
.wifri-post-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

/* Post Card */
.wifri-post-card {
    background-color: #ffffff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease;
}

.wifri-post-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}

.wifri-post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #e8e4de;
    flex-shrink: 0;
}

.wifri-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.wifri-post-card:hover .wifri-post-image img {
    transform: scale(1.04);
}

.wifri-post-content {
    padding: 18px 18px 20px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

.wifri-post-title {
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    line-height: 1.35;
}

.wifri-post-excerpt {
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.6;
    color: #555555;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.wifri-post-link {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.wifri-post-link:hover {
    color: #96281b;
}

/* Mobile Slider Container */
.wifri-post-grid-slider {
    display: none;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.wifri-post-grid-slider.swiper {
    width: 100%;
    height: auto;
    padding-bottom: 60px;
    overflow: hidden;
}

.wifri-post-grid-slider .swiper-wrapper {
    display: flex;
    width: 100%;
}

.wifri-post-grid-slider .swiper-slide {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.wifri-post-grid-slider .swiper-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    width: auto;
}

.wifri-post-grid-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d3d3d3;
    opacity: 1;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    margin: 0 4px;
}

.wifri-post-grid-slider .swiper-pagination-bullet-active {
    background: #c0392b;
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wifri-post-section-header {
        margin-bottom: 25px;
    }

    .wifri-post-section-title {
        font-size: 22px;
    }

    .wifri-post-grid-container {
        display: none !important;
    }

    .wifri-post-grid-slider {
        display: block !important;
    }

    .wifri-post-card {
        padding: 0;
        border: none;
        border-radius: 0;
    }

    .wifri-post-image {
        height: 220px;
    }

    .wifri-post-content {
        padding: 22px 18px;
    }

    .wifri-post-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .wifri-post-excerpt {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .wifri-post-link {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .wifri-post-section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .wifri-post-section-title {
        font-size: 19px;
    }

    .wifri-post-image {
        height: 190px;
    }

    .wifri-post-content {
        padding: 18px 15px;
    }

    .wifri-post-title {
        font-size: 15px;
        margin-bottom: 9px;
    }

    .wifri-post-excerpt {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .wifri-post-link {
        font-size: 11px;
    }

    .wifri-post-grid-slider .swiper-pagination {
        bottom: 10px;
        gap: 6px;
    }

    .wifri-post-grid-slider .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}


/* ===== PRODUCT LIST WIDGET STYLES ===== */

.wifri-product-list-wrap {
    background-color: #ffffff;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.wifri-pl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #1a1a1a;
}

.wifri-pl-section-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.wifri-pl-view-all {
    font-size: 12px;
    font-weight: 600;
    color: #c0392b;
    text-decoration: none;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.wifri-pl-view-all:hover {
    color: #96281b;
}

/* Product List */
.wifri-pl-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Single Product Item */
.wifri-pl-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e8e8e8;
}

.wifri-pl-item:first-child {
    padding-top: 4px;
}

.wifri-pl-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

/* Thumbnail */
.wifri-pl-thumb-link {
    flex-shrink: 0;
    display: block;
}

.wifri-pl-thumb {
    width: 80px;
    height: 80px;
    overflow: hidden;
    background-color: #f0ede8;
    flex-shrink: 0;
}

.wifri-pl-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.wifri-pl-thumb-link:hover .wifri-pl-thumb img {
    opacity: 0.85;
}

/* Info */
.wifri-pl-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wifri-pl-title-link {
    text-decoration: none;
}

.wifri-pl-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.wifri-pl-title-link:hover .wifri-pl-title {
    color: #c0392b;
}

.wifri-pl-meta {
    font-size: 12px;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

.wifri-pl-doi {
    font-size: 11.5px;
    color: #666666;
    margin: 0;
    line-height: 1.4;
    word-break: break-all;
}

/* Button */
.wifri-pl-button-wrap {
    margin-top: 20px;
}

.wifri-pl-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #c0392b;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 20px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.wifri-pl-button:hover {
    background-color: #96281b;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 480px) {
    .wifri-product-list-wrap {
        padding: 18px 16px;
    }

    .wifri-pl-section-title {
        font-size: 14px;
    }

    .wifri-pl-thumb,
    .wifri-pl-thumb img {
        width: 64px;
        height: 64px;
    }

    .wifri-pl-title {
        font-size: 13px;
    }

    .wifri-pl-button {
        font-size: 12px;
        padding: 12px 16px;
    }
}
