/* RealShop — สไตล์ส่วนท้ายเว็บ, หน้าต่างสินค้า, การ์ด Facebook และ sticky footer
   ย้ายมาจาก <style> ใน index.php (เดิมอยู่ท้าย <body>) โหลดเป็นไฟล์สุดท้ายใน <head> ลำดับ cascade จึงเหมือนเดิม */
    .rs-footer { position: relative; margin-top: 0; background: linear-gradient(180deg, rgba(10, 16, 32, .94), rgba(5, 9, 20, .98)) !important; border-top: 1px solid rgba(148, 163, 184, .16);
        color: #aab6cc; font-size: 14.5px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
    .rs-footer-main { padding: 40px 0 28px; }
    .content { padding-bottom: 40px; } /* เว้นระยะก่อน footer ภายในพื้นที่เนื้อหา เพื่อไม่ให้เห็นแถบสีพื้นคั่น */
    /* sticky footer: ดัน footer ให้ติดขอบล่างเสมอเมื่อเนื้อหาสั้นกว่าความสูงจอ (จอ 2K/สูง) */
    body.main { display: flex; flex-direction: column; min-height: 100vh; }
    body.main > .content { flex: 1 0 auto; }
    body.main > .rs-footer { flex-shrink: 0; }
    .rs-footer-bottom { padding-right: 0; }
    @media (min-width: 992px) { .rs-footer .rs-footer-bottom .container { justify-content: flex-start; } .rs-footer-legal { margin-left: 12px; } } /* เว้นด้านขวาไว้สำหรับปุ่มแชทลอย */
    @media (max-width: 991.98px) { .rs-footer .rs-footer-bottom { padding-bottom: 80px; } }
    .rs-footer-logo img { height: 45px; width: auto; display: block; margin-bottom: 14px; }
    .rs-footer-about { line-height: 1.7; margin: 0 0 16px; max-width: 360px; }
    .rs-footer-dbd img { height: 48px; width: auto; background: transparent; filter: brightness(1.75) saturate(1.25); transition: filter .15s; } /* ปรับโลโก้ DBD ให้สว่างขึ้นเพื่อให้อ่านได้บนพื้นสีเข้ม */
    .rs-footer-dbd:hover img { filter: brightness(1.95) saturate(1.3); }
    .rs-footer-h { color: #fff; font-size: 15px; font-weight: 600; margin: 4px 0 14px; letter-spacing: .2px; }
    .rs-footer-links, .rs-footer-pay { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
    .rs-footer-links a { color: #aab6cc !important; text-decoration: none !important; transition: color .15s; }
    .rs-footer-links a:hover { color: #fff !important; }
    .rs-footer-pay li { display: flex; align-items: center; gap: 8px; }
    .rs-footer-pay i { width: 16px; text-align: center; color: #67e8f9; }
    .rs-footer-meta { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, .14); font-size: 13.5px; color: #8ea0bf; }
    .rs-fb-card { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 163, 184, .18); }
    .rs-fb-top { display: flex; align-items: center; gap: 12px; }
    .rs-fb-top img { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 3px; flex: 0 0 52px; box-shadow: 0 0 0 2px #1877f2; }
    .rs-fb-top b { display: block; color: #fff; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
    .rs-fb-top span { font-size: 13px; color: #8ea0bf; }
    .rs-fb-top span i { color: #4f9bff; }
    .rs-fb-card p { margin: 12px 0 14px; font-size: 13.5px; line-height: 1.6; }
    .rs-fb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .rs-fb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 12px; font-weight: 600; color: #fff !important; text-decoration: none !important; transition: filter .15s, transform .15s; }
    .rs-fb-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
    .rs-fb-follow { background: #1877f2; }
    .rs-fb-chat { background: linear-gradient(135deg, #0a7cff, #a033ff 70%, #ff5280); }
    .rs-footer-bottom { border-top: 1px solid rgba(148, 163, 184, .12); padding: 16px 0; font-size: 13.5px; color: #8392ab; }
    .rs-footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; }
    .rs-footer-legal { display: flex; gap: 18px; }
    .rs-footer-legal a { color: #aab6cc !important; text-decoration: none !important; }
    .rs-footer-legal a:hover { color: #fff !important; }
    @media (max-width: 991.98px) {
        .rs-footer-main { padding: 32px 0 20px; }
        .rs-footer-bottom .container { justify-content: center; text-align: center; }
    }

    .rs-chat-btn { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px;
        border-radius: 999px; color: #fff !important; text-decoration: none !important; font: 600 15px/1.15 Kanit, system-ui, sans-serif;
        background: linear-gradient(135deg, #0a7cff, #a033ff 70%, #ff5280); box-shadow: 0 10px 28px rgba(10, 124, 255, .35), 0 2px 6px rgba(0, 0, 0, .3);
        transition: transform .15s, box-shadow .15s, bottom .2s; }
    .rs-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(10, 124, 255, .45), 0 2px 6px rgba(0, 0, 0, .3); }
    .rs-chat-btn i { font-size: 26px; }
    .rs-chat-txt small { display: block; font-size: 11.5px; font-weight: 400; opacity: .92; margin-top: 1px; }
    @media (max-width: 575px) {
        .rs-chat-btn { right: 12px; bottom: 12px; padding: 9px 14px 9px 10px; font-size: 14px; }
        .rs-chat-btn i { font-size: 24px; }
    }
    @media print { .rs-chat-btn { display: none; } }

    .product_view .modal-dialog { max-width: 920px; width: 100%; }
    .product_view .modal-content.rs-pv {
        position: relative; border: 1px solid var(--rs-line-2); border-radius: 20px; color: var(--rs-text);
        background: linear-gradient(180deg, rgba(20, 28, 46, .98), rgba(12, 18, 32, .99));
        box-shadow: 0 30px 70px rgba(0, 0, 0, .5); overflow: hidden;
    }
    .rs-pv-close { position: absolute; top: 14px; right: 14px; z-index: 3; opacity: .7; filter: invert(1) grayscale(1) brightness(1.6); }
    .rs-pv-close:hover { opacity: 1; }
    .rs-pv-grid { display: grid; grid-template-columns: 300px 1fr; }
    .rs-pv-media { padding: 20px; display: flex; align-items: flex-start; justify-content: center; border-right: 1px solid var(--rs-line);
        background: radial-gradient(120% 90% at 30% 10%, rgba(79, 140, 255, .14), transparent 60%); }
    .rs-pv-media img { width: 100%; max-width: 300px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px;
        border: 1px solid var(--rs-line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); background: rgba(255, 255, 255, .02); }
    .rs-pv-body { padding: 26px 26px 24px; display: flex; flex-direction: column; }
    .rs-pv-title { font-size: 21px; font-weight: 600; color: #fff; line-height: 1.35; margin: 2px 36px 8px 0; }
    .rs-pv-id { align-self: flex-start; font-size: 12.5px; color: var(--rs-muted); background: rgba(148, 163, 184, .12);
        border: 1px solid var(--rs-line); padding: 2px 10px; border-radius: 999px; margin-bottom: 12px; }
    .rs-pv-info { color: #c2cde0; font-size: 14.5px; line-height: 1.6; margin: 0; padding-top: 16px; border-top: 1px solid var(--rs-line); }
    .rs-pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
    .rs-pv-stat { text-align: center; background: rgba(255, 255, 255, .035); border: 1px solid var(--rs-line); border-radius: 14px; padding: 10px 8px; }
    .rs-pv-stat > small { display: block; font-size: 12px; color: var(--rs-muted); margin-bottom: 4px; }
    .rs-pv-stat b { font-size: 17px; color: #fff; font-weight: 600; }
    .rs-pv-stat-price b { color: #6ee7b7; white-space: nowrap; }
    .rs-pv-stat .rs-pv-baht { display: inline; font-size: .62em; font-weight: 600; margin-left: 1px; opacity: .8; }
    .rs-pv-stat-price .pre-cost { display: block; font-size: 13px; margin-top: 3px; color: #90a0bd; }
    .rs-pv-buy { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; } /* ปุ่มซื้ออยู่ก่อนรายละเอียด: รายละเอียดสินค้าจริงยาว หากไว้ท้ายสุดลูกค้าต้องเลื่อนหาปุ่ม */
    .rs-pv-qty { display: inline-flex; align-items: stretch; flex: 0 0 auto; border: 1px solid var(--rs-line-2); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .03); }
    .rs-pv-qbtn { width: 40px; border: 0; background: transparent; color: #cdd8ee; font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s; }
    .rs-pv-qbtn:hover { background: rgba(255, 255, 255, .08); }
    .rs-pv-qty input { width: 54px; border: 0 !important; background: transparent !important; color: #fff !important; box-shadow: none !important; -moz-appearance: textfield; }
    .rs-pv-qty input::-webkit-outer-spin-button, .rs-pv-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .rs-pv-add { flex: 1; min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 600; }
    /* คูปองหน้าตะกร้า: บังคับมุมโค้งซ้าย/ขวาให้ชนะ .form-control{border-radius:12px!important} ของธีม เพื่อให้ช่อง+ปุ่มชิดรับกันเนียน */
    .rs-coupon .input-group { flex-wrap: nowrap; }
    .rs-coupon .input-group .form-control { border-radius: 12px 0 0 12px !important; min-height: 46px; }
    .rs-coupon .input-group .btn { border-radius: 0 12px 12px 0 !important; min-height: 46px; min-width: 72px; font-weight: 600; padding-inline: 16px; }
    @media (min-width: 768px) and (max-width: 991.98px) {
        .rs-pv-grid { grid-template-columns: 250px 1fr; }
        .rs-pv-media { padding: 18px; }
    }
    @media (min-width: 576px) and (max-width: 767.98px) {
        .rs-pv-grid { grid-template-columns: 210px 1fr; }
        .rs-pv-media { padding: 16px; }
        .rs-pv-body { padding: 20px 20px 22px; }
    }
    @media (max-width: 575.98px) {
        .product_view .modal-dialog { max-width: 100%; }
        .rs-pv-grid { grid-template-columns: 1fr; }
        .rs-pv-media { border-right: 0; border-bottom: 1px solid var(--rs-line); padding: 18px 18px 6px; }
        .rs-pv-media img { max-width: 240px; }
        .rs-pv-body { padding: 18px; }
        .rs-pv-title { margin-right: 30px; font-size: 19px; }
        .rs-pv-stats { gap: 8px; }
        .rs-pv-stat { padding: 8px 4px; }
        .rs-pv-stat b { font-size: 15px; }
        .rs-pv-buy { flex-wrap: wrap; }
        .rs-pv-add { flex: 1 1 100%; }
    }
