/* ==========================================================================
   Editor's Choice CSS (16:9 Aspect Ratio Setup)
   ========================================================================== */

.editors-custom-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

.edi-side-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card Large (Left Side) */
.edi-card-large {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-soft, #f8f9fa);
}

.edi-large-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.edi-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.edi-card-large:hover .edi-large-img {
    transform: scale(1.03);
}

.edi-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    z-index: 2;
}

.edi-title {
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.edi-title a {
    color: #ffffff;
    text-decoration: none;
}

/* Card Small (Right Side) */
.edi-card-small {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--bg-white, #ffffff);
    padding: 10px;
    border-radius: 10px;
}

.edi-small-img-wrapper {
    width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--bg-soft, #f1f5f9);
}

.edi-small-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.edi-card-small:hover .edi-small-img {
    transform: scale(1.05);
}

.edi-small-content {
    flex-grow: 1;
    min-width: 0;
}

.edi-small-title {
    margin: 6px 0 0 0;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge Classes */
.meta-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.cat-wellness { background: #2ecc71; color: #fff; }
.bg-pink { background: #ff527b; color: #fff; }
.bg-coral { background: #ff7f50; color: #fff; }
/* ==========================================================================
   [1] PRIMARY FEED PAGE & ARTICLES MASONRY
   ========================================================================== */
.articles-masonry-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 25px; 
}

.article-card-item {
    background-color: #ffffff; 
    border-radius: 18px; 
    overflow: hidden;
    border: 1px solid rgba(241, 228, 230, 0.6); 
    box-shadow: 0 10px 25px rgba(255, 82, 123, 0.01);
    display: flex; 
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.article-card-item:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(255, 82, 123, 0.08); 
}

.art-img-holder { 
    height: 210px; 
    background-size: cover; 
    background-position: center; 
    background-color: #f8f9fa;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); 
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

.article-card-item:hover .art-img-holder { 
    transform: scale(1.05); 
}

.art-body { 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.art-category { 
    font-size: 12px; 
    font-weight: 700; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
}

.beauty-color { color: #ff4757; }
.fashion-color { color: #9b59b6; }
.lifestyle-color { color: #e67e22; }
.parenting-color { color: #2ecc71; }
.lifeandlove-color { color: #e84393; }

.art-title { 
    font-size: 17px; 
    font-weight: 700; 
    line-height: 1.5; 
    margin-bottom: 10px; 
    color: #2c3e50; 
}

.art-title a:hover { color: #ff527b; }

.art-excerpt { 
    font-size: 13.5px; 
    color: #7f8c8d; 
    margin-bottom: 20px; 
    flex-grow: 1; 
    line-height: 1.6; 
}

.art-footer-rating { 
    border-top: 1px solid #f8f9fa; 
    padding-top: 14px; 
    font-size: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.rating-stars { color: #ff527b; font-weight: 700; }
.vote-count { color: #a4b0be; }


/* ==========================================================================
   [2] CATEGORY LISTINGS PAGE ZONE
   ========================================================================== */
.category-banner-zone {
    background: linear-gradient(135deg, #fff5f7 0%, #fdfbfc 100%);
    padding: 24px 0 20px 0;
    border-bottom: 1px solid rgba(255, 82, 123, 0.08); 
    margin-bottom: 25px;
}

.category-banner-zone .container {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: flex-end;
}

.category-title-details {
    display: flex;
    flex-direction: column;
}

.breadcrumb-nav { 
    display: flex; 
    gap: 8px; 
    list-style: none; 
    font-size: 13px; 
    color: #7f8c8d; 
    margin-bottom: 8px;
}
.breadcrumb-nav li::after { content: "/"; margin-left: 8px; }
.breadcrumb-nav li:last-child::after { content: ""; }
.breadcrumb-nav a:hover { color: #ff527b; }

.category-main-title { 
    font-size: 28px; 
    font-weight: 800; 
    color: #2c3e50; 
    margin-bottom: 6px; 
}

.category-subtitle-desc { 
    font-size: 14px; 
    color: #7f8c8d; 
    line-height: 1.5;
    margin: 0;
}

.sub-cat-scroll-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: flex-start; 
    gap: 8px; 
    margin-top: 0; 
    padding-bottom: 0; 
}

.sub-cat-pill { 
    background: #ffffff; 
    color: #57606f; 
    font-size: 13px; 
    font-weight: 500; 
    padding: 6px 14px; 
    border-radius: 20px; 
    border: 1px solid #f1f2f6; 
    white-space: nowrap; 
    transition: all 0.2s ease;
}

.sub-cat-pill.active, 
.sub-cat-pill:hover { 
    background: #ff527b; 
    color: #ffffff; 
    border-color: #ff527b; 
    box-shadow: 0 4px 12px rgba(255, 82, 123, 0.15); 
}


/* ==========================================================================
   [3] SINGLE ARTICLE FULL DETAIL VIEW & SHARED BUTTONS
   ========================================================================== */
.single-article-wrapper { 
    background: #ffffff; 
    border-radius: 24px; 
    padding: 35px; 
    border: 1px solid #f1f2f6; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
}

.post-main-title { 
    font-size: 26px; 
    font-weight: 800; 
    line-height: 1.4; 
    color: #2c3e50; 
    margin: 15px 0; 
}

.post-author-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #f1f2f6; 
    padding-bottom: 20px; 
    margin-bottom: 25px; 
}

.author-info-mini { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.author-avatar-img { 
    width: 42px; 
    height: 42px; 
    border-radius: 50%; 
    background-size: cover; 
    background-position: center; 
    background-color: #f1f5f9;
    image-rendering: -webkit-optimize-contrast;
}

.author-name { display: block; font-size: 14px; font-weight: 600; color: #2c3e50; }
.post-date { font-size: 12px; color: #95a5a6; }
.post-feature-image-holder { border-radius: 16px; overflow: hidden; margin-bottom: 30px; }

.article-entry-content { font-size: 18px; line-height: 1.8; color: #333333; }
.article-entry-content p { margin-bottom: 1.5em !important; }
.article-entry-content p.lead-paragraph { font-size: 18px; font-weight: 500; color: #2c3e50; }
.article-entry-content h3 { font-size: 19px; font-weight: 700; color: #2c3e50; margin: 30px 0 15px 0; }
.article-pullquote { border-left: 4px solid #ff527b; background: #fff5f7; padding: 20px; margin: 25px 0; font-size: 16px; font-style: italic; font-weight: 500; color: #db3a60; border-radius: 0 12px 12px 0; }

/* Article Content Image Alignments */
.article-entry-content img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin: 15px auto !important; 
    display: block; 
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.article-entry-content img[align="left"], .article-entry-content img.alignleft { display: inline-block; margin: 5px 15px 15px 0 !important; float: left; }
.article-entry-content img[align="right"], .article-entry-content img.alignright { display: inline-block; margin: 5px 0 15px 15px !important; float: right; }
.article-entry-content center, .article-entry-content .text-center, .article-entry-content p[align="center"] { text-align: center !important; }
.article-entry-content::after { content: ""; display: table; clear: both; }

/* Social Share Buttons Group */
.article-share-footer-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 20px 0; margin: 30px 0; border-top: 1px dashed #e2e8f0; border-bottom: 1px dashed #e2e8f0; }
.share-label-text { font-size: 15px; font-weight: 600; color: #475569; }
.share-buttons-group { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-share-social {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; width: 130px; 
    border-radius: 50px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: none; outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); background-color: #475569; color: #ffffff !important; box-sizing: border-box;
}
.btn-share-social i { color: #ffffff !important; font-size: 15px; }
.btn-share-social:hover { transform: translateY(-2px); opacity: 0.95; }
.btn-share-social.line:hover { background-color: #06c755; box-shadow: 0 4px 12px rgba(6, 199, 85, 0.35); }
.btn-share-social.fb:hover { background-color: #1877f2; box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35); }
.btn-share-social.messenger:hover { background-color: #006aff; box-shadow: 0 4px 12px rgba(0, 106, 255, 0.35); }
.btn-share-social.pinterest:hover { background-color: #bd081c; box-shadow: 0 4px 12px rgba(189, 8, 28, 0.35); }
.btn-share-social.twitter:hover { background-color: #000000; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.btn-share-social.copy-link:hover { background-color: #1e293b; box-shadow: 0 4px 12px rgba(30, 41, 59, 0.35); }

/* Related Articles & Article Tags */
.related-articles-section { margin-top: 40px; }
.related-heading-title { font-size: 16.5px; font-weight: 700; color: #2c3e50; margin-bottom: 20px; }
.related-mini-card { background: #ffffff; border-radius: 14px; padding: 12px; border: 1px solid #f1f2f6; display: flex; flex-direction: column; gap: 10px; }
.related-img { 
    height: 130px; 
    border-radius: 8px; 
    background-size: cover; 
    background-position: center; 
    background-color: #f8f9fa;
    image-rendering: -webkit-optimize-contrast;
}
.related-mini-card h4 { font-size: 13.5px; font-weight: 700; line-height: 1.4; }

.tag-container { margin-top: 30px; padding-top: 15px; border-top: 1px solid #eeeeee; }
.tag-container h4 { display: inline-block; margin-right: 10px; font-size: 16px; color: #555555; }
.tag { display: inline-block; background: #f5f5f5; color: #666666; padding: 4px 12px; border-radius: 20px; font-size: 14px; margin-right: 8px; margin-bottom: 8px; text-decoration: none; transition: background 0.2s; }
.tag:hover { background: #f68d8d; color: #ffffff; }


/* ==========================================================================
   [4] 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; 
    object-position: center;
    background-color: #f8f9fa;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.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-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); 
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.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; }


/* ==========================================================================
   [5] COMMERCIAL BLOCKS
   ========================================================================== */

/* ==========================================================================
   PR NEWS SECTION - HD CRISP DISPLAY (เทียบเท่า Editor's Choice)
   ========================================================================== */

.premium-pr-section { 
    background-color: #ffffff; 
    border: 1px solid rgba(241, 228, 230, 0.7); 
    border-radius: 20px; 
    padding: 24px; 
    margin-bottom: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.01); 
}

.pr-block-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    border-bottom: 2px solid #fcf8f9; 
    padding-bottom: 14px; 
    margin-bottom: 20px; 
}
.pr-sub-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #ff527b; font-weight: 700; display: block; margin-bottom: 4px; }
.pr-main-title { font-size: 22px; font-weight: 800; color: #2c3e50; margin: 0; }
.pr-view-all { font-size: 13px; color: #7f8c8d; font-weight: 600; text-decoration: none; }
.pr-view-all:hover { color: #ff527b; }

.pr-premium-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 24px; 
    align-items: start;
}

/* Featured Box Left */
.pr-featured-box { 
    background: #ffffff; 
    border-radius: 16px; 
    overflow: hidden; 
    border: 1px solid rgba(241, 228, 230, 0.5); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.01); 
    transition: all 0.3s ease; 
}

.pr-feat-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background-color: #f8f9fa;
}

.pr-feat-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
    display: block;
    transition: transform 0.5s ease; 
}
.pr-featured-box:hover .pr-feat-img { transform: scale(1.03); }

.pr-feat-content { padding: 18px 20px; position: relative; }
.brand-identity { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.brand-official-name { font-size: 13px; font-weight: 700; color: #2c3e50; }
.brand-official-name i { color: #1e90ff; font-size: 12px; }

.pr-feat-content h3 { font-size: 17px; font-weight: 800; line-height: 1.4; margin: 6px 0 10px 0; color: #2c3e50; }
.pr-feat-content h3 a { color: #2c3e50; text-decoration: none; }
.pr-feat-content h3 a:hover { color: #ff527b; }

.pr-badge-tag { 
    position: absolute; 
    top: 18px; 
    right: 20px; 
    background-color: #ffe5ec; 
    color: #ff527b; 
    font-size: 10px; 
    font-weight: 700; 
    padding: 3px 9px; 
    border-radius: 6px; 
    text-transform: uppercase; 
}

/* PR Sub-List Right (จุดแก้หลักเพื่อให้ภาพคมกริบแบบ Editor's Choice) */
.pr-sub-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.pr-row-card { 
    display: flex; 
    gap: 16px; 
    align-items: center; 
    background: #ffffff; 
    padding: 10px 14px; 
    border-radius: 14px; 
    border: 1px solid #fcf2f4;
    transition: all 0.2s ease; 
}
.pr-row-card:hover { 
    transform: translateX(4px); 
    border-color: rgba(255, 82, 123, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* ปรับความกว้างกรอบภาพขวาเป็น 170px และใช้ aspect-ratio 16/9 ให้รับภาพขนาด 600x400 / 740x380 ได้พอดี */
.pr-row-img-wrapper { 
    width: 170px !important; 
    aspect-ratio: 16 / 9 !important;
    border-radius: 10px; 
    overflow: hidden; 
    flex-shrink: 0; 
    background-color: #f1f5f9; 
    position: relative;
}

.pr-sub-img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    object-position: center !important; 
    display: block !important; 
    
    /* เทคนิคการเรนเดอร์ภาพให้ไม่แตกและเบลอ */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform 0.3s ease;
}

.pr-row-card:hover .pr-sub-img {
    transform: scale(1.05);
}

.pr-row-info { flex-grow: 1; min-width: 0; }
.brand-label-mini { font-size: 11px; font-weight: 700; color: #ff527b; margin-bottom: 3px; display: block; }
.pr-row-title { margin: 2px 0 6px 0; font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.pr-row-title a { color: #2c3e50; text-decoration: none; }
.pr-row-title a:hover { color: #ff527b; }
.pr-time-text { font-size: 11px; color: #95a5a6; display: flex; align-items: center; gap: 4px; }


/* --------------------------------------------------------------------------
   5.2 Recommended Clinic Directory
   -------------------------------------------------------------------------- */
.recommended-clinic-section { margin-top: 20px; margin-bottom: 50px; }
.clinic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 20px; }
.clinic-card { background: #ffffff; border: 1px solid rgba(241, 228, 230, 0.7); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 25px rgba(255, 82, 123, 0.01); transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); position: relative; display: flex; flex-direction: column; }
.clinic-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(255, 82, 123, 0.08); border-color: rgba(255, 82, 123, 0.15); }
.clinic-cover-wrapper { position: relative; height: 180px; overflow: hidden; background-color: #f1f5f9; }

.clinic-cover-img { 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    transition: transform 0.6s ease; 
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.clinic-card:hover .clinic-cover-img { transform: scale(1.04); }
.clinic-verified-badge { position: absolute; top: 15px; left: 15px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); color: #1e90ff; padding: 4px 10px; border-radius: 30px; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); z-index: 2; }
.clinic-gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px 4px 0 4px; background-color: #ffffff; }

.clinic-th-img { 
    height: 48px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: opacity 0.2s; 
    background-color: #f1f5f9;
    image-rendering: -webkit-optimize-contrast;
}
.clinic-th-img:hover { opacity: 0.85; }
.clinic-core-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.clinic-tag-meta { font-size: 11px; font-weight: 700; color: #ff527b; text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.3px; }
.clinic-name-title { font-size: 16px; font-weight: 800; color: #2c3e50; line-height: 1.4; margin-bottom: 8px; }
.clinic-name-title a:hover { color: #ff527b; }
.clinic-location-text { font-size: 12.5px; color: #7f8c8d; display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.clinic-rating-row { border-top: 1px solid #fcf8f9; padding-top: 14px; margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.clinic-stars { color: #ffa502; font-weight: 700; font-size: 13px; }
.clinic-stars span { color: #a4b0be; font-weight: 500; font-size: 12px; }
.btn-clinic-cta { background-color: #fff2f5; color: #ff527b; padding: 6px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 700; transition: all 0.2s ease; text-decoration: none; }
.btn-clinic-cta:hover { background-color: #ff527b; color: #ffffff; }


/* --------------------------------------------------------------------------
   5.3 Sponsored Products Widget
   -------------------------------------------------------------------------- */
.sponsored-products-widget { background-color: #ffffff; border-radius: 18px; padding: 24px; border: 1px solid rgba(241, 228, 230, 0.6); box-shadow: 0 8px 20px rgba(0,0,0,0.01); }
.product-review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.product-review-card { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px dashed #fcf8f9; }
.product-review-card:last-child { border-bottom: none; padding-bottom: 0; }
.prod-rank-num { font-size: 14px; font-weight: 800; color: #a4b0be; width: 20px; text-align: center; }
.product-review-card:nth-child(1) .prod-rank-num { color: #ff527b; }
.product-review-card:nth-child(2) .prod-rank-num { color: #ffa502; }
.product-review-card:nth-child(3) .prod-rank-num { color: #1e90ff; }

.prod-img { 
    width: 60px; 
    height: 60px; 
    border-radius: 10px; 
    object-fit: cover; 
    object-position: center;
    background-color: #fcf8f9; 
    border: 1px solid rgba(241, 228, 230, 0.5); 
    flex-shrink: 0; 
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.prod-info { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.prod-info h5 { font-size: 13.5px; font-weight: 700; color: #2c3e50; line-height: 1.4; margin: 0; }
.prod-info h5 a { color: #2c3e50; text-decoration: none; }
.prod-info h5 a:hover { color: #ff527b; }
.prod-score { font-size: 11.5px; color: #7f8c8d; display: flex; align-items: center; gap: 4px; }
.prod-score i { color: #ff4757; }
.prod-brand-tag { font-size: 10px; font-weight: 700; color: #ff527b; background-color: #fff2f5; padding: 1px 6px; border-radius: 4px; width: fit-content; text-transform: uppercase; margin-top: 2px; }


/* ==========================================================================
   [6] COMBINED RESPONSIVE PAGE BREAKPOINTS
   ========================================================================== */

/* Tablet Breakpoint (<= 992px) */
@media (max-width: 992px) {
    .main-layout-grid, .responsive-main-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .secondary-sidebar { position: static !important; min-width: 0; margin-top: 20px; }
    .gateway-grid { grid-template-columns: repeat(2, 1fr); }
    .editors-custom-grid { grid-template-columns: 1fr; gap: 20px; }
    .edi-card-large { height: 360px; }
    .edi-card-small { height: auto; grid-template-columns: 130px 1fr; gap: 16px; }
    .edi-small-content { padding: 14px 14px 14px 0; }
    .edi-small-title { font-size: 14px; }
    .footer-grid-layout { grid-template-columns: 1fr; gap: 35px; }
    .pr-premium-grid { grid-template-columns: 1fr; gap: 25px; }
    .clinic-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .main-navigation {
        display: none; flex-direction: column; position: absolute; top: 69px; left: 0; right: 0;
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid #f1f2f6; border-bottom: 3px solid #ff527b; padding: 24px; gap: 18px; align-items: flex-start; box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    }
    .main-navigation.open { display: flex; }
    .nav-link { width: 100%; padding: 4px 0; }
    .nav-link::after { content: none !important; }
    .header-action-group span { display: none; }
    .footer-bottom-flex { flex-direction: column; gap: 12px; text-align: center; }

    .slider-hint-text { display: block; animation: pulseHint 2s infinite; }
    .editors-slider-container { margin-left: -4%; margin-right: -4%; padding-left: 4%; padding-right: 4%; }
    .edi-slide-item { flex: 0 0 85%; }

    .forum-grid-cards, .articles-masonry-grid { grid-template-columns: 1fr; gap: 20px; }
    .edi-overlay-content { padding: 20px; bottom: 15px; left: 15px; right: 15px; }
    .edi-title { font-size: 19px; }
    .edi-desc { display: none; }
    .cat-featured-card { grid-template-columns: 1fr; }
    .cat-feat-body { padding: 20px; }
    .single-article-wrapper { padding: 20px; }
    .post-main-title { font-size: 20px; }
    
    .editors-custom-grid, .pr-premium-grid { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 15px !important; 
    }

    /* การ์ดเล็กสลับเป็นแนวตั้งสำหรับ Mobile UX */
    .edi-card-small, .pr-row-card { 
        display: flex !important;
        flex-direction: column !important; 
        align-items: stretch !important; 
        padding: 0 !important; 
        overflow: hidden; 
        width: 100% !important;
        height: auto !important;
    }

    /* ควบคุมขนาดรูปภาพบน Mobile */
    .edi-small-img-wrapper, .pr-row-img-wrapper { 
        width: 100% !important; 
        height: 180px !important; 
        border-radius: 8px 8px 0 0 !important; 
    }

    .edi-small-content, .pr-row-info { 
        padding: 14px !important; 
        width: 100% !important;
        box-sizing: border-box;
    }

    .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; }
}

/* Small Mobile Breakpoint (<= 576px) */
@media (max-width: 576px) {
    .gateway-grid { grid-template-columns: 1fr; gap: 14px; }
    .premium-pr-section { padding: 20px; }
    .pr-main-title { font-size: 20px; }
    .clinic-grid { grid-template-columns: 1fr; }

    .article-share-footer-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
    .share-buttons-group { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .btn-share-social { width: 100%; justify-content: center; font-size: 13px; padding: 10px 12px; height: 42px; }
}

/* Extra Small Devices (<= 480px) */
@media (max-width: 480px) {
    .deal-card-premium { grid-template-columns: 90px 1fr; padding: 10px; }
    .deal-visual { height: 90px; }
    .price-now { font-size: 15px; }
    .deal-title-text { font-size: 12.5px; }
}