/* ======= BASE STYLES ======= */
:root {
    --primary: #ff6b00;
    --primary-light: #ff8c33;
    --primary-dark: #e65100;
    --secondary: #2196f3;
    --secondary-light: #64b5f6;
    --secondary-dark: #1976d2;
    --accent: #7c4dff;
    --accent-light: #9e8bff;
    --accent-dark: #5f36e3;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #eeeeee;
    --neutral-300: #e0e0e0;
    --neutral-400: #bdbdbd;
    --neutral-500: #9e9e9e;
    --neutral-600: #757575;
    --neutral-700: #616161;
    --neutral-800: #424242;
    --neutral-900: #212121;
    --box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;
    --transition-slow: 0.5s all ease;
    --transition-normal: 0.3s all ease;
    --transition-fast: 0.15s all ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: var(--neutral-800);
    background-color: var(--neutral-100);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ======= HEADER & NAVIGATION ======= */
.header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    transition: var(--transition-normal);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3Ccircle cx='13' cy='13' r='1'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.banner-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition-normal);
}

.profile-pic:hover {
    transform: scale(1.1);
}

/* Navigation Menu */
.nav-wrapper {
    background: white;
    box-shadow: var(--box-shadow-md);
    position: relative;
    transition: var(--transition-normal);
}

.nav-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    position: relative;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
    text-align: center;
    cursor: pointer;
    z-index: 1;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transform: translateY(100%);
    transition: var(--transition-normal);
    z-index: -1;
    border-radius: var(--border-radius-md);
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: translateY(0);
    opacity: 1;
}

.nav-item:hover,
.nav-item.active {
    color: white;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    position: relative;
    transition: var(--transition-normal);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    transform: translateY(-5px);
}

.nav-label {
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-item:hover .nav-label,
.nav-item.active .nav-label {
    font-weight: 600;
}

/* Logout button */
.nav-item.logout {
    overflow: visible;
}

.nav-item.logout::before {
    background: linear-gradient(135deg, #ff5252, #ff1744);
}

/* Header Collapse on Scroll */
.header.collapsed .banner {
    height: 0;
}

/* Floating Login Buttons */
.floating-login-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-full);
    font-weight: 500;
    color: white;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

.login-btn-email {
    background-image: linear-gradient(135deg, #4285f4, #34a853);
}

.login-btn-line {
    background-image: linear-gradient(135deg, #00c300, #00b300);
}

.login-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.login-btn-icon {
    font-size: 1.2rem;
}

/* Content Area */
.content {
    margin-top: 160px; /* เพิ่มจาก 140px เป็น 160px */
    min-height: calc(100vh - 160px); /* แก้ไขตามค่า margin-top ที่เปลี่ยน */
    padding: 0.25rem;
    transition: var(--transition-normal);
}

/* ===== INPUT STYLING ===== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-500);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
}

input[type="text"] {
    flex: 1;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--neutral-300);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
    width: 100%;
    position: relative;
    z-index: 1;
}

input[type="text"]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.action-button {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-left: 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.action-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.3);
}

.action-button:active {
    transform: translateY(-1px);
}

/* ===== PRODUCT OFFER STYLES ===== */
.offer-anchor {
    display: block;
    margin-top: -130px; /* แก้จาก -140px เป็น -160px */
    padding-top: 130px; /* แก้จาก 140px เป็น 160px */
    visibility: hidden;
}

.offer-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.offer {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    overflow: hidden;
}

.offer:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-5px);
}

.offer-header {
    padding: 1.5rem 1.5rem 1rem;
}

.offer-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--neutral-900);
    line-height: 1.4;
}

/* Compact offer styles */
.compact-offer {
    padding: 1rem;
}

.compact-offer .offer-header {
    padding: 0 0 0.5rem;
}

.compact-offer .offer-header h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.offer-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-label {
    font-weight: 600;
    color: var(--neutral-700);
}

.price-value, .price-range {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.separator {
    height: 1px;
    background-color: var(--neutral-200);
    margin: 1rem 0;
}

.compact-separator {
    margin: 0.5rem 0;
    height: 1px;
    background-color: var(--neutral-200);
}

.offer-details {
    padding: 0 1.5rem;
}

.compact-details {
    padding: 0;
}

.cashback-status {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin: 1rem 0;
}

.cashback-status.positive {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success);
}

.cashback-status.neutral {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--warning);
}

.status-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cashback-status.positive .status-icon {
    color: var(--success);
}

.cashback-status.neutral .status-icon {
    color: var(--warning);
}

.status-text p {
    margin: 0;
    line-height: 1.5;
}

.status-text p:first-child {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cashback-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: rgba(255, 107, 0, 0.05);
    border-radius: var(--border-radius-md);
    margin: 1rem 0;
}

/* Highlight cashback amount */
.highlight-cashback {
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
    background-color: rgba(255, 107, 0, 0.15) !important;
    border: 2px solid rgba(255, 107, 0, 0.3) !important;
    border-radius: var(--border-radius-md) !important;
    font-size: 1.1em !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.amount-label {
    font-weight: 600;
    color: var(--neutral-800);
}

.amount-value, .amount-range, .amount-possible {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--primary-dark) !important;
    background-color: rgba(255, 107, 0, 0.15) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.2) !important;
}

.product-image-container {
    padding: 0 1.5rem;
    text-align: center;
}

.compact-image {
    padding: 0;
    text-align: center;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-sm);
    margin: 1rem 0;
}

.compact-image .product-image {
    max-height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0.5rem 0;
}

.action-container {
    padding: 1rem 1.5rem;
    text-align: center;
}

.shop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    border-radius: var(--border-radius-full);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.shop-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.shop-button i {
    font-size: 1.2rem;
}

.compact-notice {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

.compact-notice p {
    margin: 0 0 0.25rem;
    color: var(--neutral-600);
}

.compact-notice p:last-child {
    margin-bottom: 0;
}

.offer-notes {
    padding: 1.5rem;
    background-color: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.note-header i {
    color: var(--primary);
    font-size: 1.2rem;
}

.note-header h4 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--neutral-800);
}

.note-content {
    font-size: 0.9rem;
    color: var(--neutral-700);
}

.note-content p {
    margin: 0 0 1rem;
    line-height: 1.5;
}

.note-content p:last-child {
    margin-bottom: 0;
}

.special-note {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 3px solid var(--warning);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.special-note p:first-child {
    color: var(--neutral-900);
    font-weight: 500;
}

.note-section {
    margin: 1.5rem 0;
}

.note-section:first-child {
    margin-top: 0;
}

.note-section:last-child {
    margin-bottom: 0;
}

.note-section h5 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--neutral-800);
    font-weight: 600;
}

.note-section ul {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.note-section li {
    margin-bottom: 0.4rem;
}

.note-section li:last-child {
    margin-bottom: 0;
}

/* Redirect countdown */
.redirect-countdown {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1000;
}

/* Animation for offer */
.offer {
    opacity: 0;
    transform: translateY(20px);
}

.offer.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CASHBACK CHECK PAGE STYLES ===== */
.check-cashback-container {
    padding: 20px 20px 0; /* เพิ่ม padding-top เป็น 20px */
}

.check-cashback-container .page-header {
    padding-top: 20px; /* ปรับตามความเหมาะสม */
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    border-radius: 2px;
}

.page-title {
    font-size: 2.2rem;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-600);
}

/* Form Card */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-5px);
}

.check-form-card {
    padding: 2rem;
}

.product-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--neutral-800);
}

/* Results */
.results-container {
    margin-top: 2rem;
    display: none;
}

/* Info Card */
.info-card {
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    overflow: hidden;
}

.info-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.info-header i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.info-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.info-content {
    padding: 1.5rem;
}

.instruction-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: var(--box-shadow-md);
    border: 1px solid var(--neutral-200);
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--neutral-800);
    position: relative;
    padding-bottom: 0.5rem;
}

.info-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.benefit-list li i {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: var(--success);
    font-size: 1.1rem;
}

.benefit-list li i.ri-close-line {
    color: var(--error);
}

.note-box {
    background-color: rgba(255, 107, 0, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    display: flex;
    align-items: flex-start;
}

.note-box i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1rem;
    flex-shrink: 0;
}

.note-box p {
    margin: 0;
    font-size: 0.95rem;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    counter-reset: step-counter;
}

.steps-list li {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(255, 107, 0, 0.2);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 0.5rem;
    color: var(--neutral-800);
}

.step-content p {
    margin: 0;
    color: var(--neutral-600);
}

/* Error Message */
.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--error);
    padding: 1rem;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    color: var(--error);
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.error-message i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* Loading animation */
.loading-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.extracom {
    color: black;
    text-shadow: 
        -1px -1px 0 yellow,
        1px -1px 0 yellow,
        -1px 1px 0 yellow,
        1px 1px 0 yellow;
    font-weight: bold;
}

.shake7 {
    display: inline-block;
    animation: shake8 1s infinite;
    font-weight: bold;
}

@keyframes shake8 {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-2px) rotate(-2deg); }
    75% { transform: translateX(2px) rotate(2deg); }
}

/* ======= FOOTER STYLES ======= */
.site-footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3Ccircle cx='13' cy='13' r='1'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.7;
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
}

.footer-logo h3 {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-contact,
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-contact li,
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-contact a,
.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    opacity: 0.9;
    transition: var(--transition-fast);
}

.footer-contact a:hover,
.footer-links a:hover {
    opacity: 1;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-tagline {
    font-style: italic;
    font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 90;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Animation Keyframes */
@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .banner {
        height: 60px;
    }

    .banner-logo {
        font-size: 1.5rem;
    }

    .profile-pic {
        width: 35px;
        height: 35px;
    }

    .nav-icon {
        font-size: 1.3rem;
    }

    .nav-label {
        font-size: 0.8rem;
    }

    .content {
        margin-top: 120px; /* Reduced Banner + Nav Height */
        min-height: calc(100vh - 120px);
    }

    .floating-login-container {
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }

    .login-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .site-footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-logo-img {
        height: 40px;
    }
    
    .footer-logo h3 {
        font-size: 1.5rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
    
    /* Adjust back-to-top button position when login buttons are present */
    .floating-login-container ~ .back-to-top {
        bottom: 100px;
    }
    
    .check-form-card {
        padding: 1.5rem;
    }
    
    .input-wrapper {
        flex-direction: column;
        align-items: stretch;
        position: relative;
    }

    .input-icon {
        left: 1rem;
        top: 1.25rem;
        transform: translateY(0);
    }
    
    input[type="text"] {
        margin-bottom: 1rem;
        padding-left: 3rem;
    }
    
    .action-button {
        width: 100%;
        margin-left: 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .offer-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    
    .offer-header h3 {
        font-size: 1.2rem;
    }
    
    .offer-details, .product-image-container, .action-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .price-value, .price-range {
        font-size: 1.1rem;
    }
    
    .cashback-amount {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .amount-value, .amount-range, .amount-possible {
        font-size: 1.1rem;
    }
    
    .shop-button {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .offer-notes {
        padding: 1.25rem;
    }
    
    .highlight-cashback {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .amount-value, .amount-range, .amount-possible {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {
    .nav-menu {
        padding: 0.5rem 0;
    }

    .nav-item {
        padding: 0.4rem 0.5rem;
    }

    .nav-icon {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .nav-label {
        font-size: 0.75rem;
    }

    .login-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .info-header {
        padding: 1rem;
    }
    
    .info-content {
        padding: 1rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .offer {
        padding: 1.5rem;
    }
    
    .offer h3 {
        font-size: 1.3rem;
    }
}









/* เพิ่มคลาสสำหรับแสดงผลเต็มจอ */
.full-width {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ปรับส่วนแสดงผลให้เต็มจอ */
.results-container.full-width {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ปรับขนาดและการแสดงผลของ offer เพื่อให้เต็มจอมากขึ้น */
.results-container.full-width .offer {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
}

/* แก้ไขการแสดงผลของ offer ใน container */
.results-container.full-width .offer-link {
    display: block;
    width: 100%;
}

/* แก้ไขการแสดงผลเมื่อหน้าจอขนาดเล็ก */
@media (max-width: 768px) {
    .check-cashback-container.full-width {
        padding: 20px 0 0;
    }
    
    .results-container.full-width {
        padding: 0;
    }
    
    .results-container.full-width .offer {
        margin-bottom: 1rem;
    }
}

/* เพิ่มการปรับขนาดสำหรับหน้าจอขนาดใหญ่ */
@media (min-width: 1200px) {
    .check-cashback-container:not(.full-width) {
        max-width: 1200px;
    }
    
    .results-container:not(.full-width) {
        max-width: 1200px;
    }
}

/* ปรับส่วนแสดงผลของ product-image ให้มีความสูงที่เหมาะสม */
.compact-image .product-image {
    max-height: 300px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0.5rem auto;
    display: block;
}

/* ปรับความกว้างของ compact-offer */
.compact-offer {
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
}

/* ปรับขนาดของส่วนแสดงผลต่างๆ */
.offer-header, 
.compact-details, 
.cashback-status, 
.highlight-cashback, 
.compact-notice, 
.offer-notes {
    width: 100%;
    max-width: 100%;
}



/* เพิ่มคลาสสำหรับแสดงผลเต็มจอ */
.full-width {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ปรับส่วนแสดงผลให้เต็มจอ */
.results-container.full-width {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ปรับขนาดและการแสดงผลของ offer เพื่อให้เต็มจอมากขึ้น */
.results-container.full-width .offer {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
}

/* แก้ไขการแสดงผลของ offer ใน container */
.results-container.full-width .offer-link {
    display: block;
    width: 100%;
}

/* แก้ไขการแสดงผลเมื่อหน้าจอขนาดเล็ก */
@media (max-width: 768px) {
    .check-cashback-container.full-width {
        padding: 20px 0 0;
    }
    
    .results-container.full-width {
        padding: 0;
    }
    
    .results-container.full-width .offer {
        margin-bottom: 1rem;
    }
}

/* เพิ่มการปรับขนาดสำหรับหน้าจอขนาดใหญ่ */
@media (min-width: 1200px) {
    .check-cashback-container:not(.full-width) {
        max-width: 1200px;
    }
    
    .results-container:not(.full-width) {
        max-width: 1200px;
    }
}

/* ปรับส่วนแสดงผลของ product-image ให้มีความสูงที่เหมาะสม */
.compact-image .product-image {
    max-height: 300px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0.5rem auto;
    display: block;
}

/* ปรับความกว้างของ compact-offer */
.compact-offer {
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
}

/* ปรับขนาดของส่วนแสดงผลต่างๆ */
.offer-header, 
.compact-details, 
.cashback-status, 
.highlight-cashback, 
.compact-notice, 
.offer-notes {
    width: 100%;
    max-width: 100%;
}













/* CSS ใหม่สำหรับเมนูสีสันแบบลูกกวาด */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;600;700&display=swap');

:root {
    /* สีพาสเทลลูกกวาด */
    --pastel-orange: #FFB347;
    --pastel-yellow: #FDFD96;
    --pastel-blue: #AEC6CF;
    --pastel-red: #FFB3BA;
    --pastel-green: #B0E57C;
    --pastel-purple: #D8BFD8;
    --pastel-mint: #ADEFD1;
    --pastel-pink: #FFC1CC;
    --pastel-lavender: #E6E6FA;
    --pastel-peach: #FFDAB9;
    
    /* สีเข้มสำหรับไอคอน */
    --vivid-orange: #FF9800;
    --vivid-yellow: #FFCC00;
    --vivid-blue: #4285F4;
    --vivid-green: #34A853;
    --vivid-red: #EA4335;
    --vivid-purple: #9C27B0;
    --vivid-mint: #00BFA5;
    --vivid-pink: #E91E63;
    --vivid-lavender: #7986CB;
    --vivid-peach: #FF7043;
}

.colorful-nav-wrapper {
    font-family: 'Prompt', sans-serif;
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
    background: transparent;
    width: 100%;
}

.colorful-nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.colorful-navbar {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(255, 179, 71, 0.8), rgba(255, 193, 204, 0.8));
    border-radius: 8px;
    padding: 8px 3px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.7);
    width: 100%;
}

.navbar-section {
    display: flex;
    align-items: center;
    width: 100%;
}

.navbar-scroll-container {
    width: 100%;
    overflow-x: hidden;
}

.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: space-evenly;
}

.navbar-item {
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    margin: 0 4px;
    flex: 1;
}

.navbar-item:first-child {
    margin-left: 0;
}

.navbar-item:last-child {
    margin-right: 0;
}

.navbar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333333;
    text-decoration: none;
    padding: 10px 2px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.1),
        inset 0 -2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.navbar-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0) 100%);
    transition: all 0.5s ease;
}

.navbar-link:hover::after {
    left: 100%;
    transition: all 0.7s ease;
}

.navbar-link:hover {
    /*transform: translateY(-5px);*/
    transform: none; 
    box-shadow: 
        0 8px 15px rgba(0, 0, 0, 0.15),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1);
}

.navbar-item.active .navbar-link {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.icon-container {
    background-color: rgba(255, 255, 255, 0.9);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 -2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(45deg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar-item:hover .icon-container::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.navbar-link:hover .icon-container {
    transform: rotate(8deg) scale(1.3)!important;
    box-shadow: 
        0 8px 15px rgba(0, 0, 0, 0.2),
        inset 0 -3px 8px rgba(0, 0, 0, 0.1);
}

.navbar-link i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.navbar-link:hover i {
    transform: scale(1.15);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.menu-text {
    margin-top: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.navbar-link:hover .menu-text {
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* สีเมนูแต่ละรายการ */
.navbar-item.orange-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-orange), #ffcc80); 
}
.navbar-item.yellow-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-yellow), #fff59d); 
}
.navbar-item.blue-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-blue), #81d4fa); 
}
.navbar-item.green-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-green), #c5e1a5); 
}
.navbar-item.red-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-red), #ef9a9a); 
}
.navbar-item.purple-menu .navbar-link { 
    background: linear-gradient(135deg, var(--pastel-purple), #ce93d8); 
}

/* สีไอคอนแต่ละรายการ */
.navbar-item.orange-menu .icon-container i { color: var(--vivid-orange); }
.navbar-item.yellow-menu .icon-container i { color: var(--vivid-yellow); }
.navbar-item.blue-menu .icon-container i { color: var(--vivid-blue); }
.navbar-item.green-menu .icon-container i { color: var(--vivid-green); }
.navbar-item.red-menu .icon-container i { color: var(--vivid-red); }
.navbar-item.purple-menu .icon-container i { color: var(--vivid-purple); }

/* เมนูออกจากระบบ */
.navbar-item.logout .navbar-link {
    background: linear-gradient(135deg, #ff5252, #ff1744);
}

.navbar-item.logout .menu-text,
.navbar-item.logout .icon-container i {
    color: white;
}

.navbar-item.logout .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* เพิ่มเอฟเฟกต์เมื่อกด */
.navbar-link:active {
    transform: translateY(-2px);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.1),
        inset 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-link:active .icon-container {
    transform: scale(0.95);
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.1),
        inset 0 -1px 3px rgba(0, 0, 0, 0.05);
}

/* ดาวสำหรับเมนูที่เลือก */
.navbar-item.active {
    position: relative;
    overflow: hidden;
}

.navbar-item.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, transparent 50%, var(--vivid-blue) 50%);
    border-radius: 0 0 6px 0;
    z-index: 5;
}

.navbar-item.active::after {
    content: '★';
    position: absolute;
    bottom: 3px;
    right: 4px;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: starTwinkle 3s infinite ease-in-out;
    z-index: 10;
}

/* ปรับสีพื้นหลังดาวตามสีเมนู */
.navbar-item.orange-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-orange) 50%); }
.navbar-item.yellow-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-yellow) 50%); }
.navbar-item.blue-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-blue) 50%); }
.navbar-item.green-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-green) 50%); }
.navbar-item.red-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-red) 50%); }
.navbar-item.purple-menu.active::before { background: linear-gradient(135deg, transparent 50%, var(--vivid-purple) 50%); }

/* Animation */
@keyframes shine {
    0% {
        transform: rotate(45deg) translateY(0);
        opacity: 0;
    }
    25% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: rotate(45deg) translateY(-60%);
        opacity: 0;
    }
}

@keyframes starTwinkle {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(15deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-3px) rotate(2deg); }
    75% { transform: translateY(-2px) rotate(-2deg); }
}

.navbar-item:hover .icon-container {
    animation: float 1s ease infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.navbar-item.active .icon-container {
    animation: pulse 2s infinite ease-in-out;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .navbar-link {
        padding: 8px 2px;
    }
    
    .icon-container {
        width: 32px;
        height: 32px;
    }
    
    .menu-text {
        font-size: 0.7rem;
    }
    
    .navbar-item {
        margin: 0 1px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .colorful-navbar {
        padding: 5px 2px;
        border-radius: 5px;
    }
    
    .icon-container {
        width: 28px;
        height: 28px;
    }
    
    .menu-text {
        font-size: 0.65rem;
        margin-top: 3px;
    }
    
    .navbar-item {
        margin: 0 1px;
    }
    
    .navbar-item.active::before {
        width: 25px;
        height: 25px;
    }
    
    .navbar-item.active::after {
        font-size: 12px;
        bottom: 2px;
        right: 3px;
    }
}
