/* Offer Card Styles */
.offer_post {
    margin: 12px auto;
    padding: 0 10px 15px 10px;
    display: inline-block;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: visible;
    position: relative;
}

/* Reduce margin-top for offer_post cards without badges */
.offer_post:not(.offer_post-featured):not(.offer_post-top-choice):not(.offer_post-most-popular) {
    margin-top: 8px !important; /* Reduced from 12px to sit closer */
}


/* Featured offer cards with enhanced shadow */
.offer_post-featured {
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    margin-top: 20px;
    margin-bottom: 15px;
    padding-top: 10px;
    border: 2px solid;
}

.offer_post-top-choice {
    border-color: #1a1a1a;
}

.offer_post-most-popular {
    border-color: #4A90E2;
}

/* Offer badges - positioned mostly above the card (only ~15% inside) */
.offer-badge {
    position: absolute;
    top: -28px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.offer-badge-top-choice {
    background: #1a1a1a;
}

.offer-badge-most-popular {
    background: #4A90E2;
}

.offer-badge .badge-icon {
    display: flex;
    align-items: center;
}

.offer-badge .badge-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.offer-badge .badge-text {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.offer-header {
    display: block;
    overflow: hidden;
    margin-bottom: 0;
    margin-top: 10px; /* Move down to be closer to divider line above */
    padding: 5px 15px 0 15px; /* Match horizontal padding of offer_content_container */
    position: relative;
    min-height: 100px;
    z-index: 1;
}

.offer-header * {
    margin-bottom: 0;
    padding-bottom: 0;
}

.offer_image {
    max-width: 250px;
    float: left;
    min-height: 80px;
    align-content: flex-start;
    margin-right: 15px;
    margin-left: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.offer_image img {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

a.title__link {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    line-height: 1.2;
}

a.title__link:hover {
    color: inherit; /* Keep original color on hover */
    text-decoration: none; /* Remove underline on hover */
    cursor: pointer; /* Keep pointer cursor */
}

.rating {
    text-align: center;
    margin: 0 auto;
    margin-bottom: 0;
    padding-bottom: 0;
    border-radius: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

span.unit {
    float: left;
    background-color: #3f3f3f;
    border-radius: 50%;
    color: #fff;
    margin-right: 3%;
    margin-top: 15px;
    margin-bottom: 0;
    width: 50px;
    height: 50px;
    padding: 0;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10; /* Ensure it sits on top */
    overflow: visible; /* Prevent number from being cut off */
}

.fivestar-copy-verified {
    font-size: .8em;
    font-weight: 600;
    padding: 2px 0;
    text-align: center;
    margin: 4px auto 1px auto; /* Moved down 1px to visually center with number and stars */
    color: #000;
    text-transform: uppercase;
    width: auto;
    max-width: 90px;
    box-sizing: border-box;
}

.rate {
    background: #46b2aa;
    border-radius: 4px;
    text-align: center;
    padding: 6px 10px;
    display: inline-block;
    margin: 0 auto;
    width: auto;
    min-width: 90px;
    max-width: 110px;
    box-sizing: border-box;
}

.rate .fivestar-copy {
    color: #fff;
    font-size: 1.6em;
    font-weight: bold;
    line-height: 1;
}

.stats {
    float: right;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fivestar {
    color: #ffc767;
    overflow: visible;
    font-size: 1.0em;
    float: right;
    clear: both;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    width: 100%;
    text-align: center;
}

.fivestar .rating {
    display: flex;
    justify-content: center;
    width: 100%;
    float: none;
}

.star-rating {
    font-size: 1.2em;
    color: #ccc;
    display: flex;
    float: right;
    gap: 2px;
    justify-content: center;
    width: auto;
    min-width: 90px;
    max-width: 110px;
    align-items: center;
    box-sizing: border-box;
    margin-top: 0;
    padding-top: 0;
}

.star {
    position: relative;
    width: 1em;
    height: 1em;
    line-height: 1;
}

.star.full {
    color: #ffd700;
}

.star.half {
    color: #ccc;
    overflow: hidden;
    position: relative;
}

.star.half::before {
    content: '★';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    color: #ffd700;
    display: block;
    line-height: 1;
}

.star.half::after {
    content: '';
    display: none;
}

.offer_content_container.gradient {
    border-top: 3px solid #ebf4f8;
    margin-top: 0;
    padding: 0 15px 10px 15px;
    clear: both;
}

.offer_content {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.offer_content * {
    margin-bottom: 0;
}

.offer_content::after {
    content: "";
    display: table;
    clear: both;
}

span.link {
    color: #209818;
    display: table;
    font-weight: 300;
    margin-top: 8px;
    margin-bottom: 5px;
    border: 2px solid #31c287;
    padding: 5px 10px;
    border-radius: 1px;
    float: left;
}

a.text-link {
    font-weight: 400;
    text-decoration: none;
    color: #319f3e;
}

a.price-link {
    color: #353535;
    text-decoration: none;
    font-size: 1.8em;
}

span.price {
    font-size: .8em;
    float: right;
    margin-top: 8px;
    color: #666;
}

p.offer_services {
    display: inline-block;
    background: #eff7fb;
    padding: 12px 22px;
    color: #3a3838;
    font-size: .8em;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.5em;
    margin: 8px auto 5px;
    text-align: left;
    width: 100%;
    clear: both;
}

a.ReadMore_link.button {
    width: 48%;
    float: left;
    background: #fff;
    color: #0c76e9;
    font-weight: 500;
    border: 1px solid #2b9cea;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    font-size: 1.0em;
    overflow: hidden;
    padding: 14px 0;
    text-align: center;
    text-decoration: none;
    margin-right: 2%;
    margin-bottom: 15px;
}

a.ReadMore_link.button:hover {
    background: #0c76e9;
    color: #fff;
}

a.offer_link.button {
    background: #333333;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: block;
    overflow: hidden;
    padding: 14px 0;
    text-align: center;
    text-decoration: none;
    width: 48%;
    float: right;
    font-size: 1.0em;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

a.offer_link.button:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.button {
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: block;
    font-size: 1.0em;
    font-weight: 500;
    overflow: hidden;
    padding: 14px 0;
    text-align: center;
    text-decoration: none;
}

.ReadMore_link img {
    vertical-align: middle;
    margin-right: 0.25rem;
    display: inline-block;
}
/* Mobile: Reduce spacing between icon and text in Read Review button */
@media (max-width: 600px) {
    .ReadMore_link img {
        margin-right: 0.15rem !important;
        vertical-align: middle !important;
        display: inline-block !important;
        position: relative;
        top: -1px; /* Move icon up 1px for visual alignment */
    }
    
    /* Make button text smaller if needed to prevent wrapping */
    a.ReadMore_link.button {
        font-size: 0.9em;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
    }
}

/* Tablet and Desktop: Move icon up 2-3px for visual alignment */
@media (min-width: 601px) {
    .ReadMore_link img {
        position: relative;
        top: -1.5px; /* Move icon up 1.5px for visual alignment with text */
    }
}

/* Clear floats */
.offer_post::after {
    content: "";
    display: table;
    clear: both;
}

/* Tablet and Mobile - Keep rating centered */
@media (max-width: 992px) {
    .offer-header {
        display: block !important;
        overflow: hidden;
    }
    
    .unit {
        float: left !important;
        margin-right: 10px;
        margin-left: 0;
    }
    
    .offer_image {
        float: left !important;
        text-align: left;
        margin-left: 0;
        margin-right: 15px;
        clear: none;
        display: flex;
        align-items: center;
        align-content: flex-start;
        justify-content: flex-start;
    }
    
    .offer_image img {
        margin: 0;
        display: block;
    }
    
    .stats {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        max-width: 100%;
        overflow: visible;
    }

    .rating {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        max-width: 100px;
    }
    
    .rate {
        min-width: 90px;
        max-width: 110px;
        padding: 6px 8px;
    }
    
    .fivestar {
        text-align: center;
        width: auto;
        max-width: 100px;
    }

    .fivestar .rating {
        display: flex;
        justify-content: center;
        width: 100%;
        float: none;
    }

    .fivestar-copy-verified {
        max-width: 90px;
    }

    .star-rating {
        justify-content: center;
        width: auto;
        min-width: 90px;
        max-width: 110px;
        float: none;
    }
}

@media (max-width: 600px) {
    .offer_post {
        padding: 0 10px 15px 10px;
    }

    .offer-header {
        margin-bottom: 0 !important;
        padding: 8px 0 0 0 !important; /* Remove bottom padding and horizontal padding on mobile */
        min-height: auto;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }
    
    .offer_image {
        margin: 0;
        max-width: 150px;
        float: left;
        display: flex;
        align-items: center;
        margin-right: 10px;
        margin-left: 0;
        flex-shrink: 0;
        text-align: left;
    }
    
    .offer_image img {
        max-width: 150px;
        height: auto;
        max-height: 60px;
        object-fit: contain;
        display: block;
    }

    .unit {
        background-color: #3f3f3f;
        border-radius: 50%;
        color: #fff;
        margin-right: 10px;
        margin-top: 0;
        width: 45px;
        height: 45px;
        padding: 0;
        font-size: 1.5em;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        float: left;
    }

    .stats {
        float: right;
        text-align: right;
        width: auto;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        flex-shrink: 0;
        max-width: 100px;
        overflow: visible;
    }

    .rating {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        max-width: 100px;
    }
    
    .rate {
        min-width: 90px;
        max-width: 110px;
        padding: 6px 8px;
    }
    
    .fivestar-copy-verified {
        max-width: 90px;
    }

    .fivestar {
        float: none;
        text-align: center;
        width: 100%;
        margin-top: 3px;
    }

    .fivestar .rating {
        display: flex;
        justify-content: center;
        width: 100%;
        float: none;
    }

    .star-rating {
        float: none;
        justify-content: center;
        width: auto;
        min-width: 90px;
        max-width: 110px;
    }

    .offer_post .title__link {
        display: block;
        font-size: 1.1em !important;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    span.link {
        color: #209818;
        display: block;
        font-weight: 300;
        margin-top: 8px;
        margin-bottom: 8px;
        border: 2px solid #31c287;
        padding: 5px 10px;
        border-radius: 1px;
        width: 100%;
        text-align: center;
        float: none;
        box-sizing: border-box;
    }

    a.text-link {
        font-weight: 400;
        text-decoration: none;
        color: #319f3e;
        font-size: 0.9em;
    }

    span.price {
        font-size: .8em;
        float: right;
        width: auto;
        text-align: right;
        margin-top: 8px;
        margin-bottom: 5px;
    }

    .offer_content_container.gradient {
        padding: 10px 0 5px 0;
        margin-top: 5px;
    }

    .offer_services {
        padding: 0 15px 12px 15px;
        margin: 0 auto 5px;
        line-height: 1.5em;
    }

    .button {
        padding: 12px 0px !important;
        font-size: .9em;
    }

    a.ReadMore_link.button,
    a.offer_link.button {
        width: 48%;
        float: left;
        margin: 8px 2% 0 0;
    }

    a.offer_link.button {
        float: right;
        margin-right: 0;
    }
}

/* Very small screens (smaller iPhones) */
@media (max-width: 375px) {
    .offer_image {
        float: left;
        text-align: left;
    }
    
    .offer_image img {
        max-width: 120px;
    }
}


/* Smaller mobile devices - reduce rating section to fit on one line with logo */
@media (max-width: 400px) {
    /* Reduce rating number size */
    .rate {
        padding: 4px 4px !important; /* Equal left/right padding, smaller than before */
        min-width: 70px !important;
        max-width: 85px !important;
    }
    
    .rate .fivestar-copy {
        font-size: 1.3em !important;
    }
    
    /* Reduce EXCELLENT text size */
    .fivestar-copy-verified {
        font-size: 0.65em !important;
        padding: 1px 0 !important;
        margin: 2px auto 0 auto !important;
        max-width: 75px !important;
    }
    
    /* Reduce star rating size */
    .star-rating {
        font-size: 0.9em !important;
    }
    
    /* Reduce overall rating container spacing */
    .rating {
        gap: 2px !important;
    }
    
    /* Reduce stats container spacing */
    .stats {
        gap: 2px !important;
    }
}

/* Super small mobile - move stats right 5px to give logo more room */
@media (max-width: 400px) {
    .stats {
        margin-left: 5px !important; /* Move right 5px */
        max-width: calc(100% - 5px) !important; /* Ensure stays within container */
    }
    
    /* Exclude site-item-rating-box stats from general stats rules */
    .site-item-rating-box .stats {
        margin-left: 0 !important;
        max-width: 100% !important;
    }
}

/* Super small mobile - reduce logo max-width to fit on one line */
@media (max-width: 400px) {
    .offer_image img {
        max-width: 100px !important; /* Reduced from default to fit on one line */
    }
    
    .offer_image {
        max-width: 100px !important; /* Also reduce container */
    }
}

/* Super small mobile - reduce stats section by 20% */
@media (max-width: 400px) {
    .stats {
        transform: scale(0.8); /* Reduce by 20% */
        transform-origin: top right; /* Scale from top right to maintain alignment */
    }
    
    /* Exclude site-item-rating-box stats from transform scaling */
    .site-item-rating-box .stats {
        transform: none !important;
        transform-origin: center !important;
    }
    
    /* Also reduce individual elements for better control */
    .stats .rate {
        padding: 4px 6px !important; /* Reduced by ~20% */
        min-width: 72px !important; /* 90px * 0.8 */
        max-width: 88px !important; /* 110px * 0.8 */
    }
    
    /* Exclude site-item-rating-box rate from general stats rate rules */
    .site-item-rating-box .stats .rate {
        padding: 3px 3px !important; /* Use specific padding from site-item rules */
        min-width: 45px !important; /* Use specific min-width from site-item rules */
        max-width: 55px !important; /* Use specific max-width from site-item rules */
    }
    
    .stats .rate .fivestar-copy {
        font-size: 1.28em !important; /* 1.6em * 0.8 */
    }
    
    .stats .fivestar-copy-verified {
        font-size: 0.64em !important; /* 0.8em * 0.8 */
        max-width: 72px !important; /* 90px * 0.8 */
    }
    
    /* Exclude site-item-rating-box verified text from general stats rules */
    .site-item-rating-box .stats .fivestar-copy-verified {
        font-size: 0.65em !important; /* Use specific size from site-item rules */
        max-width: none !important;
    }
    
    .stats .star-rating {
        font-size: 0.96em !important; /* 1.2em * 0.8 */
        min-width: 72px !important; /* 90px * 0.8 */
        max-width: 88px !important; /* 110px * 0.8 */
    }
    
    /* Exclude site-item-rating-box star rating from general stats rules */
    .site-item-rating-box .stats .star-rating {
        font-size: 0.9em !important; /* Use specific size from site-item rules */
        min-width: auto !important;
        max-width: none !important;
    }
}

/* Super small mobile - reduce .rate padding by 5px on both sides */
@media (max-width: 400px) {
    .rate {
        padding-left: 3px !important; /* Reduced by 5px from mobile default 8px */
        padding-right: 3px !important; /* Reduced by 5px from mobile default 8px */
    }
    
    /* Exclude site-item-rating-box rate from general rate rules */
    .site-item-rating-box .rate {
        padding: 3px 3px !important; /* Use specific padding from site-item rules */
    }
}






/* Mobile - remove bottom spacing from offer-header */
@media (max-width: 600px) {
    .offer-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}


/* Mobile - increase width and reduce padding for offer_services */
@media (max-width: 600px) {
    .offer_services {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 5px !important; /* Reduced from default */
        padding-right: 5px !important; /* Reduced from default */
        box-sizing: border-box;
    }
}

/* Super small mobile - further reduce padding */
@media (max-width: 400px) {
    .offer_services {
        padding-left: 3px !important; /* Even less padding */
        padding-right: 3px !important; /* Even less padding */
        font-size: 0.9em !important; /* Slightly smaller font to fit more */
    }
    
    .offer_content_container.gradient {
        padding: 10px 0 5px 0 !important; /* Remove left/right padding on super small devices */
    }
}

/* New Site Item Design */
.site-item.site-item-new,
.main .main-content .site-list .site-item.site-item-new {
    position: relative;
    background: #e8f5e9 !important;
    border: 2px solid #1a1a1a !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 30px 0 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 0 0 12px rgba(76, 175, 80, 0.2) !important;
    display: block !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    padding-top: 10px !important;
}

.site-item-badge {
    position: absolute;
    top: -28px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFD700;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.site-item-badge .badge-icon {
    display: flex;
    align-items: center;
}

.site-item-badge .badge-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.site-item-badge .badge-text {
    color: #000;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.site-item-content {
    display: flex !important;
    gap: 20px;
    align-items: flex-start;
    margin-top: 10px;
    width: 100%;
}

.site-item-left {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-item-brand {
    max-width: 220px;
    height: auto;
    margin: 0;
    display: block;
    object-fit: contain;
    width: auto;
}

/* Desktop: Logo same width as Visit Site button */
.site-item-visit-btn {
    display: inline-block;
    background: #1a1a1a;
    border: none;
    border-radius: 4px;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap; /* Prevent button text from wrapping */
}

/* Hide mobile button on desktop */
.site-item-visit-btn-mobile {
    display: none;
}

.site-item-visit-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    color: #fff;
    text-decoration: none;
}

.site-item-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-item-sale-banner {
    background: #ff4444;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-item-sale-banner .sale-icon {
    font-size: 18px;
}

.site-item-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-item-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.site-item-features .check-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.site-item-right {
    flex: 0 0 140px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.site-item-rating-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.site-item-rating-box .rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.site-item-rating-box .rate {
    background: #46b2aa;
    border-radius: 4px;
    padding: 6px 10px;
    min-width: 90px;
    max-width: 110px;
    box-sizing: border-box;
}

.site-item-rating-box .fivestar-copy-verified {
    padding: 2px 0;
    margin: 4px auto 1px auto; /* Moved down 1px to visually center with number and stars */
    color: #000;
    width: auto;
    max-width: 110px;
    box-sizing: border-box;
}

.site-item-rating-box .star-rating {
    font-size: 1.2em;
    gap: 2px;
    margin-top: 0;
    padding-top: 0;
    min-width: 90px;
    max-width: 110px;
}

/* Hide old site-item children for new design */
.site-item.site-item-new .item-title,
.site-item.site-item-new .item-characteristics,
.site-item.site-item-new .item-description {
    display: none !important;
}

/* Responsive Design for New Site Item */
/* Tablet view - positioned like old refills (top left, horizontally in line with visit site button) */
@media (max-width: 992px) {
    .site-item-content {
        flex-wrap: wrap !important;
    }
    
    .site-item-left {
        flex: 0 0 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .site-item-brand {
        max-width: 220px;
        width: auto;
    }
    
    .site-item-visit-btn {
        width: auto;
        white-space: nowrap; /* Prevent button text from wrapping */
        flex-shrink: 0;
    }
    
    .site-item-right {
        flex: 0 0 100%;
        justify-content: center;
        margin-top: 20px; /* Increased from 10px for more top spacing when rating box is at bottom */
    }
    
    /* Horizontal layout for rating box on tablet */
    .site-item-rating-box {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important; /* Center items on mobile */
        gap: 8px;
        padding: 10px 8px 10px 8px !important;
        min-width: auto;
        width: auto;
    }
    
    /* Make .stats horizontal */
    .site-item-rating-box .stats {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        margin: 0 auto !important; /* Center stats within container */
        text-align: center !important; /* Center text alignment */
    }
    
    .site-item-rating-box .stats > .rating {
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        width: auto !important;
        margin: 0 !important;
    }
    
    .site-item-rating-box .rate {
        min-width: auto;
        max-width: none;
        padding: 4px 4px !important; /* Equal left/right padding, smaller than before */
        padding-left: 4px !important; /* Explicitly set left padding to match right */
        padding-right: 4px !important; /* Explicitly set right padding to match left */
        margin: 0;
    }
    
    .site-item-rating-box .fivestar-copy-verified {
        margin: 0 0 0 6px !important; /* Add 4px more on left for tablet (2px + 4px = 6px) */
        padding: 0;
        font-size: 0.7em;
        white-space: nowrap;
    }
    
    .site-item-rating-box .fivestar {
        margin: 0;
        display: flex;
        align-items: center;
    }
    
    .site-item-rating-box .fivestar .rating {
        flex-direction: row !important;
        width: auto;
        margin: 0;
    }
    
    .site-item-rating-box .star-rating {
        min-width: auto;
        max-width: none;
        margin: -4px 0 0 6px !important; /* Move up 4px to align with EXCELLENT text on tablet */
        font-size: 1em;
    }
}

@media (max-width: 600px) {
    .site-item-new {
        padding: 15px;
    }
    
    .site-item-badge {
        left: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .site-item-badge .badge-icon img {
        width: 16px;
        height: 16px;
    }
    
    .site-item-content {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0;
        position: relative;
    }
    
    /* Top row: Logo and Rating side by side */
    /* Mobile: Logo centered */
    .site-item-left {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        width: 100%;
    }
    
    .site-item-brand {
        max-width: 220px;
        width: auto;
        flex-shrink: 0;
        margin: 0 auto;
    }
    
    .site-item-left .site-item-visit-btn {
        display: none; /* Hide from left section on mobile */
    }
    
    /* Rating positioned next to logo */
    .site-item-right {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
        align-self: center;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
    }
    
    .site-item-rating-box {
        width: auto;
        max-width: none;
        margin: 15px 0 0 0 !important; /* Add top spacing above rating box on mobile */
        min-width: 220px;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px;
        padding: 10px 12px !important;
    }
    
    /* Make .stats horizontal on mobile */
    .site-item-rating-box .stats {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 0 auto !important;
        float: none !important;
        text-align: center !important;
    }
    
    /* Arrange rating items horizontally on mobile */
    .site-item-rating-box .stats > .rating {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important; /* Center rating items */
        gap: 4px !important;
        width: auto !important;
        margin: 0 auto !important; /* Center within stats container */
    }
    
    .site-item-rating-box .rate {
        min-width: 50px !important;
        max-width: 60px !important;
        padding: 4px 4px !important; /* Equal left/right padding, smaller than before */
        padding-left: 4px !important; /* Explicitly set left padding to match right */
        padding-right: 4px !important; /* Explicitly set right padding to match left */
        margin: 0 !important;
        width: auto !important;
    }
    
    .site-item-rating-box .fivestar-copy-verified {
        margin: 0 0 0 4px !important; /* Add 2px more on left for mobile (2px + 2px = 4px) */
        padding: 0;
        font-size: 0.7em;
        white-space: nowrap;
    }
    
    .site-item-rating-box .fivestar {
        margin: 0;
        display: flex;
        align-items: center;
        float: none !important;
    }
    
    .site-item-rating-box .fivestar .rating {
        flex-direction: row !important;
        width: auto;
        margin: 0;
        align-items: center !important;
    }
    
    .site-item-rating-box .star-rating {
        min-width: auto;
        max-width: none;
        margin: -2px 0 0 6px !important; /* Move up 2px to align with EXCELLENT text */
        font-size: 1em;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Middle section: Offer details */
    .site-item-middle {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin-top: 15px; /* Add top spacing when rating box is above in horizontal layout */
    }
    
    /* Middle section needs relative positioning for absolute child */
    .site-item-middle {
        position: relative;
    }
    
    .site-item-features {
        margin-top: 10px;
    }
    
    .site-item-features li {
        font-size: 14px;
    }
    
    /* CTA button at bottom */
    .site-item-visit-btn-mobile {
        display: block !important;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        padding: 12px 24px;
        font-size: 16px;
        margin-top: 10px;
        box-sizing: border-box;
        white-space: nowrap; /* Prevent button text from wrapping */
        text-align: center;
    }
    
    /* Hide desktop button on mobile */
    .site-item-left .site-item-visit-btn {
        display: none;
    }
}

/* Smaller mobile devices - reduce unit size when layout is cramped */
@media (max-width: 400px) {
    .unit {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.4em !important;
        margin-right: 6px !important;
        margin-left: 0 !important;
        margin-top: 23px !important;
        z-index: 10 !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    
    /* Fix rating box for small devices */
    .site-item-rating-box {
        min-width: auto !important;
        max-width: 100% !important;
        padding: 8px 12px !important;
        gap: 4px !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 15px !important; /* Add top spacing above rating box on smaller mobile */
    }
    
    .site-item-rating-box .stats {
        gap: 4px !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        /* Override general stats rules */
        transform: none !important;
        transform-origin: center !important;
        margin-left: 0 !important;
        max-width: 100% !important;
        float: none !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    .site-item-rating-box .stats > .rating {
        gap: 3px !important;
        align-items: center !important;
        justify-content: center !important; /* Center rating items on smaller mobile */
        margin: 0 auto !important; /* Center within stats container */
    }
    
    .site-item-rating-box .rate {
        min-width: 45px !important;
        max-width: 55px !important;
        padding: 3px 3px !important; /* Equal left/right padding, smaller than before */
        font-size: 0.9em !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important; /* Center the number horizontally in the green box */
    }
    
    .site-item-rating-box .fivestar-copy-verified {
        font-size: 0.65em !important;
        display: flex !important;
        align-items: center !important;
        margin-left: 4px !important; /* Match mobile spacing (2px + 2px = 4px) */
    }
    
    .site-item-rating-box .fivestar {
        display: flex !important;
        align-items: center !important;
    }
    
    .site-item-rating-box .fivestar .rating {
        align-items: center !important;
        display: flex !important;
    }
    
    .site-item-rating-box .star-rating {
        font-size: 0.9em !important;
        margin: 0 0 0 4px !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* Very small mobile devices - make unit even smaller if rating is pushed */
@media (max-width: 360px) {
    .unit {
        width: 30px !important;
        height: 30px !important;
        font-size: 1.3em !important;
        margin-right: 5px !important;
        margin-left: 0 !important;
        margin-top: 23px !important;
        z-index: 10 !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    
    /* Further reduce rating box for very small devices */
    .site-item-rating-box {
        min-width: auto !important;
        padding: 10px 12px 8px 12px !important;
        gap: 3px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .site-item-rating-box .stats {
        gap: 3px !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    .site-item-rating-box .stats > .rating {
        gap: 2px !important;
        align-items: center !important;
    }
    
    .site-item-rating-box .rate {
        min-width: 40px !important;
        max-width: 50px !important;
        padding: 2px 2px !important;
        font-size: 0.85em !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .site-item-rating-box .fivestar-copy-verified {
        font-size: 0.6em !important;
        display: flex !important;
        align-items: center !important;
        margin-left: 2px !important; /* Move 2px to the right to visually center between green box and stars */
    }
    
    .site-item-rating-box .fivestar {
        display: flex !important;
        align-items: center !important;
    }
    
    .site-item-rating-box .fivestar .rating {
        align-items: center !important;
        display: flex !important;
    }
    
    .site-item-rating-box .star-rating {
        font-size: 0.85em !important;
        margin: 0 0 0 3px !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
}
