/* ==========================================================================
   AFFILIATE & PREMIUM RELATED SYSTEM (ระบบขายสินค้าพันธมิตรและบทความพรีเมียม)
   ========================================================================== */
.affiliate-section-break {
    margin-top: 40px;
    border-top: 2px dashed #f68d8d;
    padding-top: 20px;
}
.affiliate-title {
    color: #ff4d4d;
    font-size: 20px;
    margin-bottom: 15px;
}
.affiliate-grid-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}
.affiliate-box {
    border: 1px solid #ffeded;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(246, 141, 141, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.5s ease;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    text-decoration: none;
}
.affiliate-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(246, 141, 141, 0.3);
    border-color: #f68d8d;
}
.affiliate-box img {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
}
.affiliate-price {
    margin-top: 10px;
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    background: #f68d8d;
    padding: 4px 8px;
    border-radius: 5px;
    display: block;
}

/* Premium Related Articles Grid */
.premium-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}
.premium-card-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
}
.premium-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(246, 141, 141, 0.2);
    border-color: #f68d8d;
}
.premium-thumb-wrapper {
    width: 100%;
    position: relative;
    padding-top: 60%; 
    overflow: hidden;
    background-color: #f9f9f9;
}
.premium-card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-card-item:hover .premium-card-thumb {
    transform: scale(1.06);
}
.premium-card-info {
    padding: 15px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.premium-card-title {
    font-size: 15px;
    color: #222222;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    height: 3em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}
.premium-card-item:hover .premium-card-title {
    color: #ff4d4d;
}

@media (max-width: 768px) {
    .premium-related-grid {
        grid-template-columns: 1fr !important; 
        gap: 20px;
        padding: 0 16px !important;
        box-sizing: border-box;
    }
    .premium-card-item {
        border-radius: 12px; 
    }
    .premium-thumb-wrapper {
        padding-top: 56.25% !important;
    }
    .premium-card-info {
        padding: 14px 16px !important;
    }
    .premium-card-title {
        font-size: 15px !important;
        height: auto !important;   
        max-height: 3em;
    }
}