/* =========================================
   Variables & Reset (From Tailwind Config)
   ========================================= */
:root {
    --primary: #a83900;
    --primary-container: #fc5b08;
    --on-primary: #ffffff;
    --surface: #f7f9ff;
    --on-surface: #161c22;
    --on-surface-variant: #5b4137;
    --surface-container-highest: #dde3eb;
    --surface-container-high: #e3e9f1;
    --surface-container: #e9eef7;
    --surface-container-low: #eff4fc;
    --surface-container-lowest: #ffffff;
    --surface-dim: #d5dae3;
    --surface-tint: #a83900;
    --secondary: #595f67;
    --primary-fixed: #ffdbcf;
    --outline-variant: #e4beb2;

    --font-sans: 'Anuphan', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

/* 🚀 ตัวแปรสำคัญ: ป้องกัน overflow: hidden จากไฟล์อื่นมาพังระบบ Sticky */
html, body {
    overflow-x: clip !important; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface);
    color: var(--on-surface);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-container-highest);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c1c7d0;
}

/* Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.fill-icon {
    font-variation-settings: 'FILL' 1;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-auto {
    margin-top: auto;
}

/* =========================================
   Layout & Header
   ========================================= */
.page-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    border-bottom: 1px solid var(--surface-container-high);
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .page-header {
        padding: 0 2rem;
    }
}

.btn-back {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: var(--secondary);
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: var(--surface-container);
}

.btn-back:active {
    transform: scale(0.95);
}

.main-layout {
    padding-top: 2.5rem;
    padding-bottom: 8rem;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch; /* ให้ column สูงเท่ากัน */
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: repeat(12, 1fr);
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .content-left {
        grid-column: span 8 / span 8;
    }

    .content-right {
        grid-column: span 4 / span 4;
        height: 100%; /* บังคับให้สูงเต็มเพื่อให้มี "ราง" ในการเลื่อนการ์ดลงมา */
    }
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* =========================================
   Breadcrumbs
   ========================================= */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0rem !important;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.breadcrumbs::-webkit-scrollbar {
    display: none;
}

.breadcrumb-link {
    color: var(--secondary);
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary-container);
}

.breadcrumb-separator {
    font-size: 16px;
    color: var(--surface-dim);
}

.breadcrumb-current {
    color: var(--on-surface);
    text-overflow: ellipsis;
    overflow: hidden;
}

/* =========================================
   Hero Bento Grid
   ========================================= */
.hero-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
    height: 400px;
    border-radius: 0.75rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-bento {
        height: 500px;
    }
}

.bento-main {
    grid-column: span 4 / span 4;
    grid-row: span 2 / span 2;
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

@media (min-width: 768px) {
    .bento-main {
        grid-column: span 3 / span 3;
    }
}

/* ค้นหาคลาสนี้ในไฟล์ service-detail.css (ประมาณบรรทัดที่ 149) และเพิ่ม object-position ลงไป */

.bento-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* 🚀 เพิ่มบรรทัดนี้: ควบคุมจุดโฟกัสของภาพ (แกน X แกน Y) */
    object-position: 50% 5%; /* 50% 50% คือจุดกึ่งกลาง (ค่าเริ่มต้น) */
    
    transition: transform 0.5s ease;
}

.group-hover-zoom:hover img {
    transform: scale(1.05);
}

.bento-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

.bento-sub {
    display: none;
    grid-column: span 1 / span 1;
    grid-row: span 1 / span 1;
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

@media (min-width: 768px) {
    .bento-sub {
        display: block;
    }
}

.bento-sub img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
    cursor: pointer;
}

.hover-opacity:hover img {
    opacity: 0.9;
}

.more-photos-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--surface-container);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-container);
    cursor: pointer;
    transition: background-color 0.2s;
}

.hover-bg-change:hover .more-photos-overlay {
    background-color: var(--surface-container-high);
}

.icon-large {
    font-size: 1.875rem;
    margin-bottom: 0.25rem;
}

.more-photos-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =========================================
   อัปเดต: การจัดวาง SKU และ Badges
   ========================================= */
.product-header { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.sku-badge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; 
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--on-surface);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 1.875rem;
    }
}

.product-sku {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 500;
}

.badges-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.5rem; 
}

.badge-primary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background-color: #fc5b08;
    color: white;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
}

.badge-primary .material-symbols-outlined {
    font-size: 16px;
}

.divider {
    border: 0;
    border-top: 1px solid var(--surface-container-high);
    width: 100%;
}

/* =========================================
   Tabs
   ========================================= */
.service-tabs-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-buttons-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    width: max-content;
    width: 100%;
}

.related-section.no-border-top {
    border-top: none; 
    padding-top: 0;   
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    color: var(--secondary);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--on-surface);
}

.tab-btn.active {
    border-bottom-color: var(--primary-container);
    color: var(--primary-container);
}

.tab-content {
    display: none;
    margin-top: 1rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Tab 1: Details Layout
   ========================================= */
.service-description {
    color: var(--secondary);
    line-height: 1.625;
}

.info-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .info-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-card {
    background-color: var(--surface-container-lowest);
    border: 1px solid var(--surface-container-high);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: var(--surface-container);
    color: var(--primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--on-surface);
}

.icon-check {
    font-size: 18px;
    color: #fc5b08;
    margin-top: 2px;
}

.icon-number {
    font-size: 18px;
    color: var(--secondary);
    margin-top: 2px;
}

/* Gradient Cards */
.gradient-card-orange {
    background: linear-gradient(135deg, #fc5b08 0%, #d14904 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.gradient-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.glass-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #f8f6f5;
}

.text-white {
    color: #f8f6f5 !important;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    z-index: 10;
    color: #f8f6f5;
}

.rule-item .material-symbols-outlined {
    font-size: 20px;
    margin-top: 2px;
}

.rule-item h4 {
    font-size: 0.875rem;
    font-weight: 700;
}

.rule-item p {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.sub-list {
    list-style-type: disc;
    list-style-position: outside;
    margin-left: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.full-width {
    grid-column: 1 / -1;
}

.border-top-glass {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.gradient-card-dark {
    background: linear-gradient(135deg, #464545 0%, #2a2a2a 100%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: #f8f6f5;
}

.neon-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: #d0ff2c;
}

.content-indent {
    padding-left: 52px;
}

.bullet-list {
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: disc inside;
}

.neon-text {
    font-size: 10px;
    font-weight: 700;
    color: #d0ff2c;
}

/* =========================================
   Tab 2: Reviews
   ========================================= */
.review-header-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.review-score-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--on-surface);
}

.stars-primary {
    display: flex;
    color: var(--primary-container);
}

.score-desc {
    font-size: 0.75rem;
    color: var(--secondary);
}

.response-time-box {
    background-color: var(--surface-container);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.response-label {
    font-size: 0.75rem;
    color: var(--secondary);
}

.response-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--on-surface);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: opacity 0.3s ease;
}

.review-card {
    background-color: var(--surface-container-lowest);
    border: 1px solid var(--surface-container-high);
    border-radius: 0.75rem;
    padding: 1rem;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.reviewer-name {
    font-size: 0.875rem;
    font-weight: 700;
}

.review-date {
    font-size: 0.75rem;
    color: var(--secondary);
}

.review-text {
    font-size: 0.875rem;
    color: var(--on-surface);
}

.admin-reply {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(252, 91, 8, 0.3);
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.reply-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-container);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reply-date {
    font-size: 10px;
    color: var(--secondary);
}

.reply-text {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-container-high);
}

.page-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    background-color: var(--surface-container-lowest);
    border: 1px solid var(--surface-container-high);
    color: var(--secondary);
    transition: color 0.2s;
}

.page-btn.active {
    background-color: var(--primary-container);
    color: var(--on-primary);
    border-color: var(--primary-container);
}

.page-btn:hover:not(.active) {
    color: var(--primary-container);
}

.page-dots {
    color: var(--secondary);
}

.text-btn {
    width: auto;
    padding: 0 1rem;
}

/* =========================================
   🚀 Right Sidebar Widget (Sticky ระบบเลื่อนตาม Scrollbar)
   ========================================= */
.sticky-widget-container {
    position: -webkit-sticky !important; /* รองรับ Safari */
    position: sticky !important; /* บังคับใช้ให้มีความสำคัญสูงสุดเหนือ Tailwind */
    top: 6rem !important; /* ห่างจากขอบจอ 6rem */
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: max-content; /* ป้องกันการ์ดโดนยืดสูงผิดปกติ */
}

.widget-card {
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-favorite-corner {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: var(--secondary);
    transition: color 0.2s;
}

.btn-favorite-corner:hover {
    color: var(--primary-container);
}

.btn-favorite-corner:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.price-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.price-main {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-container);
}

.price-unit {
    font-size: 0.875rem;
    color: var(--secondary);
}

.price-note {
    font-size: 10px;
    color: var(--secondary);
    opacity: 0.7;
    margin-top: 0.25rem;
}

.promo-box {
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(252, 91, 8, 0.3);
    background-color: rgba(255, 219, 207, 0.1);
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: var(--primary-container);
}

.promo-header .material-symbols-outlined {
    font-size: 18px;
}

.promo-header h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--on-surface);
}

.promo-desc {
    font-size: 10px;
    color: var(--secondary);
}

.seller-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.seller-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid var(--surface-container-high);
    background-color: var(--surface-container);
}

.seller-name-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.seller-name-row h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--on-surface);
}

.icon-verified {
    font-size: 16px;
    color: #fc5b08;
}

.seller-stats {
    font-size: 0.75rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.icon-small {
    font-size: 14px;
}

.btn-chat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-container);
    border: 1px solid rgba(252, 91, 8, 0.3);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}

.btn-chat:hover {
    background-color: var(--primary-fixed);
}

.btn-chat .material-symbols-outlined {
    font-size: 16px;
}

.service-summary {
    padding-bottom: 0.5rem;
}

.summary-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--on-surface);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--secondary);
}

.summary-list .icon-check {
    font-size: 14px;
    color: var(--primary-container);
}

.quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qty-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface);
}

.qty-controls {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    background-color: var(--surface-container);
    border: 1px solid var(--surface-container-high);
    border-radius: 2rem;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 2rem;
    background-color: var(--surface-container-lowest);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: color 0.2s;
}

.qty-btn:hover {
    color: var(--primary-container);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn .material-symbols-outlined {
    font-size: 18px;
}

.qty-value {
    width: 2.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface);
}

.action-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* 🚀 เพิ่มบรรทัดนี้: ดึงส่วนปุ่มกดทั้งหมดขยับขึ้นไปด้านบนให้ระยะห่างสวยงามพอดี */
    margin-top: -1.15rem !important; 
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-primary-action,
.btn-outline-action {
    flex: 1;
    padding: 1rem;
    border-radius: 2.5rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary-action {
    background-color: var(--primary-container);
    color: var(--on-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary-action:hover {
    background-color: var(--surface-tint);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-outline-action {
    border: 2px solid var(--primary-container);
    color: var(--primary-container);
}

.btn-outline-action:hover {
    background-color: rgba(252, 91, 8, 0.05);
}

.share-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.share-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
}

.social-buttons { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.social-btn {
    width: 2rem; 
    height: 2rem; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #ffffff !important; 
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.social-btn:hover { 
    opacity: 0.85; 
}

.social-btn svg { 
    width: 1rem; 
    height: 1rem; 
    fill: currentColor; 
}

.bg-facebook { 
    background-color: #1877F2 !important; 
}

.bg-line { 
    background-color: #00C300 !important; 
}

.bg-x { 
    background-color: #000000 !important; 
}

.bg-x svg { 
    width: 0.875rem; 
    height: 0.875rem; 
}

.bg-messenger { 
    background: linear-gradient(45deg, #00B2FF, #006AFF) !important; 
}

.bg-copy { 
    background-color: var(--secondary) !important; 
    color: #ffffff !important; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

.bg-copy:hover { 
    opacity: 0.85; 
}

.bg-copy .material-symbols-outlined { 
    font-size: 18px; 
}

.disclaimer-text {
    font-size: 11px;
    text-align: center;
    color: var(--secondary);
}

/* =========================================
   Related Products
   ========================================= */
.related-section {
    padding: 4rem 0;
    border-top: 1px solid var(--surface-container-high);
}

.pb-large {
    padding-bottom: 6rem;
}

.container {
    padding: 0 1rem;
    max-width: 80rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.section-header {
    display: flex;
    items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--on-surface);
}

.view-all-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-container);
    display: none;
}

@media (min-width: 640px) {
    .view-all-link {
        display: block;
    }
}

.view-all-link:hover {
    text-decoration: underline;
}

.mobile-only {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .mobile-only {
        display: none;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--surface-container-high);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card.bg-lowest {
    background-color: var(--surface-container-lowest);
}

.product-card:hover {
    border-color: var(--outline-variant);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-img-wrapper {
    height: 8rem;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.img-indicators {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: #d1d5db;
}

.dot.active {
    background-color: #fc5b08;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.card-footer {
    margin-top: auto;
}

.survey-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: var(--surface-container);
    border-radius: 9999px;
    font-size: 10px;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.price-action-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-container);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-actions button {
    color: var(--secondary);
    transition: color 0.2s;
}

.card-actions button:hover {
    color: var(--primary-container);
}

.card-actions .material-symbols-outlined {
    font-size: 18px;
}

/* =========================================
   Active และ Dark Theme 
   ========================================= */
.btn-favorite-corner.active,
.card-actions button.active {
    color: var(--primary-container);
}

.btn-favorite-corner.active .material-symbols-outlined,
.card-actions button.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

body.dark-theme {
    --surface: #121212;
    --on-surface: #e0e0e0;
    --surface-container-highest: #333333;
    --surface-container-high: #2c2c2c;
    --surface-container: #1e1e1e;
    --surface-container-low: #1a1a1a;
    --surface-container-lowest: #000000;
    --secondary: #a0a0a0;
}

body.dark-theme .glass-panel,
body.dark-theme .glass-header,
body.dark-theme .glass-card {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .product-card {
    border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   การจัดส่ง และ ซินโตคลับ (ฉบับ 2-7 วันชิดขวา)
   ========================================= */

.promo-box {
    border-radius: 0.75rem;
    padding: 0.875rem;
    margin-top: 1rem;
    border: 1px solid rgba(252, 91, 8, 0.3);
    background-color: rgba(255, 219, 207, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.375rem; 
}

/* กล่องการจัดส่ง */
.shipping-status-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background-color: #f0fdf4; 
    border: 1px solid #bbf7d0; 
    border-radius: 0.75rem; 
    color: var(--on-surface);
    width: 100%; /* บังคับให้กล่องเต็มความกว้าง */
}

.shipping-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.125rem;
}

.shipping-icon-wrapper .material-symbols-outlined {
    font-size: 22px;
    color: #16a34a; 
}

/* 🚀 ส่วนสำคัญ: ให้รายละเอียดขยายเต็มพื้นที่ที่เหลือ เพื่อให้ดันไปชิดขวาได้ */
.shipping-details {
    display: flex;
    flex-direction: column;
    gap: 0.375rem; 
    flex: 1; 
}

/* แถวสำหรับหัวข้อและระยะเวลาจัดส่ง */
.shipping-header-row {
    display: flex;
    justify-content: space-between; /* ดันข้อความไปซ้าย-ขวา */
    align-items: center;
    width: 100%;
}

.shipping-details h4 {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.shipping-duration {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 500;
}

.shipping-time {
    font-size: 0.75rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    line-height: 1.4;
}

/* จุดวงกลมและตัวหนังสือสีเขียว "พร้อมจัดส่ง" */
.status-ready {
    color: #16a34a; 
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #16a34a; 
    border-radius: 50%;
    display: inline-block;
}

/* =========================================
   การจัดกลุ่ม จำนวน และ ซินโตคลับ
   ========================================= */

/* คลาสใหม่สำหรับครอบกล่องให้ชิดกัน */
.qty-reward-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* 🚀 ปรับตัวเลขตรงนี้ได้เลย ถ้าน้อยลงคือชิดขึ้น (เช่น 0.125rem หรือ 0) */
}

/* กล่องคะแนนซินโตคลับ */
.reward-points-section {
    background-color: rgba(252, 91, 8, 0.05);
    border: 1px solid rgba(252, 91, 8, 0.2);
    border-radius: 0.75rem; 
    padding: 0.875rem 1rem;
    margin: 0.5rem !important; /* เคลียร์ margin ทิ้งให้หมด */
    display: flex;
    flex-direction: column;
    gap: 0.375rem; 
}

.reward-points-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-container);
    line-height: 1.3;
}

.reward-points-header .material-symbols-outlined {
    font-size: 18px;
}

.reward-points-note {
    font-size: 0.7rem;
    color: var(--secondary);
    padding-left: 1.625rem; 
    line-height: 1.4;
}

/* =========================================
   Top Navigation (สไตล์เคลือบเงา มินิมอล ไม่ใช่กระจก)
   ========================================= */
.navbar {
    position: -webkit-sticky !important; 
    position: sticky !important;         
    top: 0 !important;                   
    z-index: 9999 !important;            
    
    /* 🚀 1. สร้างพื้นผิวเคลือบเงาด้วยการไล่สี (ขาวบน -> เทาอ่อนล่าง) */
    background: linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%) !important; 
    
    /* 🚀 2. ปิดเอฟเฟกต์กระจกตามต้องการ */
    backdrop-filter: none !important; 
    -webkit-backdrop-filter: none !important;
    
    /* 🚀 3. สร้างมิติความเงา: ไฮไลท์สีขาวด้านบนขอบ + เงาฟุ้งๆ ด้านล่าง */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 1), /* แสงสะท้อนขอบบน */
        0 8px 24px -4px rgba(0, 0, 0, 0.04),  /* เงาตกกระทบแบบนุ่มลึก */
        0 2px 6px -2px rgba(0, 0, 0, 0.02) !important; 
    
    /* เส้นขอบล่างบางๆ ตัดขอบให้งานดูเนี้ยบ */
    border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
    
    width: 100%;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease;
}

/* 🚀 ดันกลุ่มปุ่ม (.nav-actions) และปุ่มมือถือ (.btn-mobile-menu) ไปขวาสุด */
.nav-actions,
.btn-mobile-menu {
    margin-left: auto !important;
}

/* บังคับให้ลิงก์เมนู (.nav-links) ลอยอยู่ตรงกลางเป๊ะๆ (บนหน้าจอคอมพิวเตอร์) */
@media (min-width: 768px) {
    .nav-links {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        white-space: nowrap; 
    }
}

/* รองรับโหมดมืด (Dark Mode) ปรับเป็นสีดำเคลือบเงา */
body.dark-theme .navbar {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%) !important; 
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05), /* ไฮไลท์บางๆ สำหรับพื้นดำ */
        0 8px 24px -4px rgba(0, 0, 0, 0.4) !important; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.4) !important;
}

/* =========================================
   Top Promotion Banner (แบนเนอร์เหนือเมนู พร้อมแสงวิ่ง)
   ========================================= */
.top-promo-banner {
    width: 100%;
    display: block;
    overflow: hidden;
    background-color: var(--surface); 
    z-index: 10000;
    
    /* 🚀 เพิ่ม relative เพื่อล็อกให้แสงวิ่งอยู่แค่ในกรอบแบนเนอร์นี้ */
    position: relative; 
}

.top-promo-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; 
    object-position: center -35px; 
    max-height: 100px; 
}

/* 🚀 1. สร้างเส้นแสงสีขาวพาดเอียงๆ คลุมทับรูปภาพ */
.top-promo-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    /* ไล่สีโปร่งใส -> ขาวขุ่น -> โปร่งใส */
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);    transform: skewX(-25deg); /* จับเอียง 25 องศา */
    animation: shineSweepBanner 6s infinite; /* ตั้งเวลาวิ่ง 6 วินาที วนลูป */
    pointer-events: none; /* ป้องกันไม่ให้ตัวแสงไปบล็อกการคลิกภาพ (ถ้าอนาคตใส่ลิงก์) */
    z-index: 2; /* บังคับให้อยู่เหนือรูปภาพ */
}

/* 🚀 2. กำหนดจังหวะการวิ่งของแสง (ซ้ายไปขวา แล้วหยุดพัก) */
@keyframes shineSweepBanner {
    0% { left: -150%; }
    30% { left: 200%; }  /* วิ่งผ่านเสร็จภายใน 30% แรกของเวลา (ประมาณ 1.8 วิ) */
    100% { left: 200%; } /* หยุดพักไปจนครบ 6 วิ แล้วค่อยเริ่มใหม่ */
}

/* รองรับโหมดมืด (Dark Mode) */
body.dark-theme .top-promo-banner {
    background-color: var(--surface-container);
}

/* =========================================
   Modern Luxury Banner Hook (สไตล์ 2026)
   ========================================= */
.promo-banner-hook {
    width: 100%;
    height: auto;
    border-radius: 16px; /* มนขึ้นเพื่อความนุ่มนวล */
    margin-top: 1rem;
    display: block;
    object-fit: cover;
    cursor: pointer;
    position: relative;
    
    /* 🎨 เงาแบบซ้อนเลเยอร์ (Soft Layered Shadows) ให้ดูเหมือนลอยจริงๆ */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 🚀 การเคลื่อนไหวแบบ Floating (ลอยช้าๆ) */
    animation: floatingSmooth 4s ease-in-out infinite;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    filter: brightness(1);
}

/* 🚀 เมื่อเมาส์ชี้: หยุดลอยแล้วขยายออกแบบนุ่มนวล พร้อมเพิ่มความสว่าง */
.promo-banner-hook:hover {
    transform: translateY(-8px) scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 25px 50px -12px rgba(252, 91, 8, 0.3);
}

/* 🚀 คีย์เฟรมการลอยแบบนุ่มนวล (ไม่กระตุก) */
@keyframes floatingSmooth {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 🚀 เพิ่มแสงวิ่งพาด (Premium Shimmer) แบบเดียวกับปุ่มผู้ช่วย */
/* เราจะสร้าง Layer แสงทับบนภาพ */
.sticky-widget-container::after {
    /* ใช้เทคนิคใส่แสงพาดผ่านภาพแบบละเอียด */
}

/* =========================================
   3D Luxury Banner (สไตล์ Minimalist 2026)
   ========================================= */
.premium-promo-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 20px; /* มนพิเศษแบบโมเดิร์น */
    overflow: hidden;
    perspective: 1000px; /* สร้างมิติ 3D */
    cursor: pointer;
    background: #000; /* ฐานสีดำเพื่อขับสีภาพ */
    
    /* 🎨 เงาแบบ Ambient Occlusion (นุ่มนวลและลึก) */
    box-shadow: 
        0 10px 20px rgba(0,0,0,0.1),
        0 30px 60px rgba(0,0,0,0.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.modern-promo-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: contrast(1.05) brightness(1);
}

/* 🚀 ป้าย Label ขนาดเล็กสไตล์แบรนด์เนม */
.promo-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 🚀 เอฟเฟกต์แสงวิ่งแบบของเหลว (Liquid Shine) */
.liquid-shine {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    transform: skewX(-20deg);
    animation: liquidFlow 8s infinite cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

/* 🚀 เมื่อ Hover: เอฟเฟกต์ Tilt และขยายมิติภาพ */
.premium-promo-wrapper:hover {
    transform: translateY(-8px) rotateX(4deg) rotateY(-2deg);
    box-shadow: 
        0 20px 40px rgba(252, 91, 8, 0.2), /* เรืองแสงสีส้มบางๆ ตามแบรนด์ */
        0 40px 80px rgba(0,0,0,0.15);
}

.premium-promo-wrapper:hover .modern-promo-img {
    transform: scale(1.1); /* ซูมภาพข้างในเบาๆ */
}

/* คีย์เฟรมแสงวิ่งแบบนุ่มนวล ไม่แย่งสายตา */
@keyframes liquidFlow {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

/* Floating Cart Style */
.floating-cart-btn {
    position: fixed;
    bottom: 110px; /* วางไว้เหนือ Floating Menu เดิม */
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-container);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(252, 91, 8, 0.4);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* แสดงผลเมื่อมีสินค้า */
.floating-cart-btn.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* เอฟเฟกต์เด้งเมื่อเพิ่มสินค้า */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.cart-bounce { animation: cartBounce 0.4s ease; }

/* =========================================
   จัดการ Floating Menu (เฉพาะหน้า Service Detail)
   ========================================= */

/* ซ่อนปุ่มโทร, ปุ่มคำนวณสินเชื่อ, เส้นคั่น และเมนูฝั่งขวา */
#floatingMenu-placeholder .item-call,
#floatingMenu-placeholder .item-call + .bar-divider,
#floatingMenu-placeholder .item-calc,
#floatingMenu-placeholder .item-calc + .bar-divider,
#floatingActionRight {
    display: none !important;
}