/* 
  Global Luxury Theme - ใช้โทนสีเดียวกันทุกหน้า
  สีหลัก: พื้นหลังเข้ม (#1B2951), ทอง (#D4AF37), เขียว (#22C55E)
*/

:root {
    /* สีหลัก */
    --luxury-gold: #D4AF37;
    --luxury-gold-light: #FFD700;
    --luxury-gold-dark: #B8860B;
    --luxury-navy: #1B2951;
    --luxury-navy-light: #2C3E50;
    --luxury-charcoal: #36454F;
    --luxury-cream: #F5F5DC;
    --luxury-pearl: #F8F6F0;
    --luxury-green: #22C55E;
    --luxury-green-dark: #16A34A;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #B8860B 100%);
    --gradient-dark: linear-gradient(135deg, #1B2951 0%, #36454F 50%, #2C3E50 100%);
    --gradient-green: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

/* ========== Page Background ========== */
body {
    background: linear-gradient(135deg, #F8F6F0 0%, #FFFFFF 50%, #F5F5DC 100%);
    min-height: 100vh;
}

/* ========== Page Headers / Hero Sections ========== */
.page-header,
.analyze-header,
.search-header,
.numbers-header,
.category-header,
.blog-header,
.contact-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.page-header::before,
.analyze-header::before,
.search-header::before,
.numbers-header::before,
.category-header::before,
.blog-header::before,
.contact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1,
.analyze-header h1,
.search-header h1,
.numbers-header h1,
.category-header h1,
.blog-header h1,
.contact-header h1,
.page-header .page-title {
    background: linear-gradient(135deg, #ffd700 0%, #ffec8b 15%, #ffd700 30%, #f5c400 45%, #ffd700 60%, #ffec8b 75%, #ffd700 90%, #daa520 100%) !important;
    background-size: 300% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    font-weight: 800 !important;
    animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.page-header p,
.analyze-header p,
.search-header p,
.numbers-header p,
.category-header p,
.blog-header p,
.contact-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========== Section Titles ========== */
.section-title,
h2.text-primary,
h3.text-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
}

/* ========== Cards - Global Style ========== */
.card,
.number-card,
.number-card-glass,
.result-card,
.prediction-card,
.category-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08), 
        0 2px 8px rgba(212, 175, 55, 0.15) !important;
    border-radius: 16px !important;
    position: relative;
    overflow: visible !important;
}

/* ใช้ border-top แทน ::before */
.card,
.number-card,
.number-card-glass,
.result-card,
.prediction-card {
    border-top: 4px solid var(--luxury-gold) !important;
}

/* Number Card จาก app.js */
.number-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
    border: 2px solid rgba(212, 175, 55, 0.25) !important;
    border-top: 4px solid #D4AF37 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 
                0 2px 8px rgba(212, 175, 55, 0.15) !important;
    padding: 1rem !important;
    transition: all 0.3s ease !important;
}

.number-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12), 
                0 4px 15px rgba(212, 175, 55, 0.25) !important;
    border-color: #D4AF37 !important;
}

.number-card.vip-card {
    border-top: 5px solid #D4AF37 !important;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2) !important;
}

.number-card .phone-number {
    color: #1B2951 !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
}

.number-card .number-price {
    color: #B8860B !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.number-card .number-sum {
    color: #36454F !important;
    font-size: 0.85rem !important;
}

.number-card .operator-badge {
    background: linear-gradient(135deg, #1B2951 0%, #36454F 100%) !important;
    color: #F8F6F0 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.number-card .cart-btn {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
    border: none !important;
    font-weight: 600 !important;
}

.number-card .cart-btn:hover {
    background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%) !important;
}

.number-card .cart-btn.btn-danger {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%) !important;
    color: #1B2951 !important;
}

.card:hover,
.number-card:hover,
.number-card-glass:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.12), 
        0 4px 15px rgba(212, 175, 55, 0.3) !important;
    border-color: var(--luxury-gold) !important;
}

/* ========== Number Card Specific Enhancements ========== */
.number-card-glass {
    padding-top: 1rem;
}

/* ========== Mobile Number Cards ========== */
body .mobile-number-card {
    background: linear-gradient(145deg, #ffffff 0%, #fefdfb 50%, #fffef5 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-top: 4px solid #D4AF37 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06),
                0 1px 4px rgba(212, 175, 55, 0.1) !important;
    padding: 0.6rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.3rem !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

body .mobile-number-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 215, 0, 0.05) 100%);
    pointer-events: none;
}

body .mobile-number-card .phone-num {
    color: #1e3a8a !important;
    font-weight: 800 !important;
    font-size: clamp(1rem, 4.5vw, 1.4rem) !important;
    letter-spacing: 0.3px !important;
    margin: 0.25rem 0 !important;
    font-family: 'Kanit', sans-serif !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.05) !important;
}

body .mobile-number-card .price-tag {
    color: #b45309 !important;
    font-weight: 600 !important;
    font-size: clamp(0.75rem, 3vw, 0.95rem) !important;
    margin-bottom: 0.25rem !important;
    white-space: nowrap !important;
}

.mobile-number-card .price-tag.free {
    color: #22C55E !important;
}

.mobile-number-card .sum-badge {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%) !important;
    color: #1B2951 !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 10px !important;
    font-size: clamp(0.6rem, 2.5vw, 0.75rem) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(27, 41, 81, 0.1) !important;
    white-space: nowrap !important;
}

.mobile-number-card .add-cart-btn {
    width: 100% !important;
    padding: 0.5rem 0.5rem !important;
    border-radius: 8px !important;
    font-size: clamp(0.7rem, 3vw, 0.85rem) !important;
    font-weight: 700 !important;
    border: none !important;
    margin-top: 0.4rem !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

.mobile-number-card .add-cart-btn.add {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3) !important;
}

.mobile-number-card .add-cart-btn.add:active {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important;
    transform: scale(0.98);
}

.mobile-number-card .add-cart-btn.remove {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

.mobile-number-card.selected {
    border-color: #22C55E !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2),
                0 6px 20px rgba(34, 197, 94, 0.15) !important;
}

/* Mobile Grid Layout */
.mobile-numbers-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    padding: 0.5rem !important;
}

/* iPad / Tablet Layout */
@media (min-width: 768px) and (max-width: 1024px) {
    .mobile-numbers-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    .mobile-number-card {
        padding: 1.25rem !important;
    }
    
    .mobile-number-card .phone-num {
        font-size: 1.5rem !important;
    }
    
    .mobile-number-card .price-tag {
        font-size: 1.2rem !important;
    }
}

/* Large Tablet / Small Desktop */
@media (min-width: 1025px) {
    .mobile-numbers-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.25rem !important;
    }
}

/* Small Mobile */
@media (max-width: 374px) {
    .mobile-number-card {
        padding: 0.75rem !important;
    }
    
    .mobile-number-card .phone-num {
        font-size: 1.15rem !important;
    }
    
    .mobile-number-card .price-tag {
        font-size: 0.95rem !important;
    }
    
    .mobile-number-card .add-cart-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
}

/* Category Badge in Mobile Card */
.mobile-number-card .category-badge {
    background: rgba(212, 175, 55, 0.1) !important;
    color: #B8860B !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 12px !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* Desktop Number Cards Responsive */
@media (max-width: 991px) {
    .number-card-glass,
    .number-card {
        padding: 1rem !important;
    }
    
    .number-display-enhanced {
        font-size: 1.25rem !important;
    }
    
    .price-display-enhanced {
        font-size: 1.1rem !important;
    }
}

/* Numbers Page Grid */
.numbers-grid {
    display: grid;
    gap: 1rem;
}

@media (max-width: 575px) {
    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .numbers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .numbers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== Number Display ========== */
.number-display-enhanced,
.phone-number,
.phone-num {
    color: var(--luxury-navy) !important;
    font-weight: 900 !important;
    -webkit-text-fill-color: initial !important;
}

/* ========== Price Display ========== */
.price-display-enhanced,
.price,
.price-tag {
    color: var(--luxury-gold-dark) !important;
    font-weight: 800 !important;
    -webkit-text-fill-color: initial !important;
}

/* ========== Buttons ========== */
.btn-primary,
.btn-success {
    background: var(--gradient-green) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
}

.btn-outline-primary {
    color: var(--luxury-navy) !important;
    border: 2px solid var(--luxury-navy) !important;
    background: transparent !important;
    font-weight: 600 !important;
}

.btn-outline-primary:hover {
    background: var(--gradient-dark) !important;
    color: white !important;
    border-color: transparent !important;
}

.btn-warning,
.btn-gold {
    background: var(--gradient-gold) !important;
    border: none !important;
    color: var(--luxury-navy) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3) !important;
}

.btn-warning:hover,
.btn-gold:hover {
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4) !important;
}

/* ========== Add to Cart Button ========== */
.add-cart-btn,
.add-cart-btn.add {
    background: var(--gradient-green) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.add-cart-btn:hover {
    background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%) !important;
    transform: scale(1.02) !important;
}

.add-cart-btn.added,
.add-cart-btn.in-cart {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
}

/* ========== Badges ========== */
.badge.bg-warning,
.badge-vip {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
}

.badge.bg-success {
    background: var(--gradient-green) !important;
    color: white !important;
}

.badge.bg-info {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
}

.badge.bg-primary {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
}

/* Operator Badges */
.operator-badge .badge,
.operator-tag {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
    font-weight: 600 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
}

.operator-tag.ais,
.badge.operator-ais {
    background: linear-gradient(135deg, #00AA00 0%, #008800 100%) !important;
}

.operator-tag.dtac,
.badge.operator-dtac {
    background: linear-gradient(135deg, #00AAFF 0%, #0088CC 100%) !important;
}

.operator-tag.true,
.badge.operator-true {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%) !important;
}

/* Sum Badge */
.sum-badge {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

/* ========== Pagination ========== */
.pagination .page-link {
    color: var(--luxury-navy) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    background: white !important;
    font-weight: 600 !important;
    margin: 0 2px !important;
    border-radius: 8px !important;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
    border-color: transparent !important;
}

.pagination .page-link:hover {
    background: var(--luxury-pearl) !important;
    border-color: var(--luxury-gold) !important;
}

/* ========== Forms ========== */
.form-control,
.form-select {
    border: 2px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--luxury-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
}

.form-label {
    color: var(--luxury-navy) !important;
    font-weight: 600 !important;
}

/* ========== Alerts ========== */
.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    color: var(--luxury-green-dark) !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: var(--luxury-gold-dark) !important;
}

.alert-info {
    background: linear-gradient(135deg, rgba(27, 41, 81, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%) !important;
    border: 1px solid rgba(27, 41, 81, 0.2) !important;
    color: var(--luxury-navy) !important;
}

/* ========== Analyze Number Page Specific ========== */
.analyze-form-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
    border-top: 4px solid #D4AF37 !important;
}

.analyze-form-card .form-control {
    background: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.5rem !important;
    text-align: center !important;
    letter-spacing: 3px !important;
}

.analyze-form-card .btn-analyze {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
    font-size: 1.1rem !important;
    padding: 0.75rem 2rem !important;
    font-weight: 700 !important;
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, 
        rgba(248, 246, 240, 0.9) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
}

.result-number-display {
    background: var(--gradient-dark) !important;
    color: var(--luxury-gold) !important;
    font-size: 2rem !important;
    font-weight: 900 !important;
    padding: 1rem 2rem !important;
    border-radius: 15px !important;
    letter-spacing: 5px !important;
    display: inline-block !important;
}

.result-sum {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
    font-size: 3rem !important;
    font-weight: 900 !important;
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4) !important;
}

/* ========== Footer ========== */
footer,
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

footer h5,
.footer h5 {
    color: #D4AF37 !important;
}

footer p,
.footer p {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a,
.footer a {
    color: #D4AF37 !important;
}

footer a:hover,
.footer a:hover {
    color: #FFD700 !important;
}

footer .footer-links a {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer .footer-links a:hover {
    color: #D4AF37 !important;
}

footer .social-links a {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

footer .social-links a:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%) !important;
    color: #0f172a !important;
}

/* ========== Visitor Counter ========== */
.visitor-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.visitor-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.visitor-stat:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.visitor-stat i {
    font-size: 1.5rem;
    color: #D4AF37;
}

.visitor-stat.online i {
    color: #22C55E;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.visitor-stat .stat-info {
    display: flex;
    flex-direction: column;
}

.visitor-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFD700;
    line-height: 1.2;
}

.visitor-stat .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 576px) {
    .visitor-counter {
        gap: 0.75rem;
    }
    
    .visitor-stat {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .visitor-stat i {
        font-size: 1.25rem;
    }
    
    .visitor-stat .stat-value {
        font-size: 1rem;
    }
    
    .visitor-stat .stat-label {
        font-size: 0.65rem;
    }
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--luxury-pearl);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--luxury-gold-dark);
}

/* ========== Loading States ========== */
.loading-overlay {
    background: rgba(27, 41, 81, 0.8) !important;
}

.spinner-border {
    color: var(--luxury-gold) !important;
}

/* ========== Animations ========== */
@keyframes gold-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-gold {
    background: linear-gradient(90deg, 
        var(--luxury-gold) 0%, 
        var(--luxury-gold-light) 50%, 
        var(--luxury-gold) 100%);
    background-size: 200% auto;
    animation: gold-shimmer 3s linear infinite;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .page-header,
    .analyze-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.75rem !important;
    }
    
    .mobile-number-card {
        margin-bottom: 0.75rem;
    }
    
    .result-number-display {
        font-size: 1.5rem !important;
        letter-spacing: 3px !important;
    }
    
    .result-sum {
        font-size: 2rem !important;
        width: 80px !important;
        height: 80px !important;
    }
}

/* ========== Premium VIP Card Highlight ========== */
.number-card-glass.premium-border,
.mobile-number-card.vip {
    border: 2px solid var(--luxury-gold) !important;
    box-shadow: 
        0 8px 32px rgba(212, 175, 55, 0.2),
        0 0 0 1px rgba(212, 175, 55, 0.3) !important;
}

.number-card-glass.premium-border::before,
.mobile-number-card.vip::before {
    height: 4px;
    background: var(--gradient-gold);
}

/* ========== Cart Sidebar ========== */
.cart-sidebar {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
}

.cart-sidebar .cart-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #F8F6F0 !important;
}

.cart-item {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
}

.cart-total,
.cart-footer .total-section {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #B8860B 100%) !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
}

.cart-total span,
.cart-footer .total-section span,
.cart-footer .total-section .total-price,
#cartTotalPrice {
    color: #1a1a1a !important;
    font-weight: 800 !important;
}

/* Bottom Action Bar */
.bottom-action-bar {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #B8860B 100%) !important;
}

.bottom-action-bar .selected-info,
.bottom-action-bar .selected-count,
.bottom-action-bar .selected-total,
#bottomCartCount,
#bottomCartTotal {
    color: #1a1a1a !important;
}

.bottom-action-bar .view-cart-btn {
    background: #1a1a1a !important;
    color: #FFD700 !important;
}

/* ========== Floating Cart Button ========== */
.floating-cart-btn {
    background: var(--gradient-green) !important;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4) !important;
}

.floating-cart-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5) !important;
}

.cart-badge {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
}

/* ========== Blog Filters ========== */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.blog-filters .filter-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--luxury-pearl) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.blog-filters .filter-btn:hover,
.blog-filters .filter-btn.active {
    background: var(--gradient-gold) !important;
    color: var(--luxury-navy) !important;
    border-color: transparent !important;
}

/* ========== Search Box in Header ========== */
.page-header .search-box {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.page-header .search-box input {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 0.75rem 1.5rem !important;
    flex: 1;
}

.page-header .search-box button {
    border-radius: 25px !important;
    padding: 0.75rem 1.5rem !important;
}

/* ========== Feature Icons ========== */
.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--luxury-navy) !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* ========== Sidebar Widgets ========== */
.sidebar-widget {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    color: var(--luxury-navy) !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--luxury-gold);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* ========== Blog Cards ========== */
/* Fix: ให้ blog-grid children กว้างเต็ม grid cell */
.blog-grid > * {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.blog-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12), 
                0 4px 15px rgba(212, 175, 55, 0.2) !important;
}

.blog-card .card-title {
    color: var(--luxury-navy) !important;
    font-weight: 700 !important;
}

/* ========== Tables ========== */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
    font-weight: 600;
    border: none;
}

.table tbody td {
    border-color: rgba(212, 175, 55, 0.1);
}

/* ========== Modal ========== */
.modal-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 240, 0.95) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 20px !important;
}

.modal-header {
    background: var(--gradient-dark) !important;
    color: var(--luxury-pearl) !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    background: transparent !important;
}

.breadcrumb-item a {
    color: var(--luxury-gold) !important;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--luxury-pearl) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ========== Text Utilities ========== */
.text-gold {
    color: var(--luxury-gold) !important;
}

.text-navy {
    color: var(--luxury-navy) !important;
}

.bg-gold {
    background: var(--gradient-gold) !important;
}

.bg-navy {
    background: var(--gradient-dark) !important;
}


/* =============================================
   iPad Portrait (768px - 991px) - แนวตั้ง 3 คอลัมน์
   ============================================= */
@media (min-width: 768px) and (max-width: 991px) {
    /* Override Bootstrap col-* ด้วย specificity สูงสุด */
    #featuredNumbers > .col-lg-3,
    #featuredNumbers > .col-lg-3.col-md-6,
    #featuredNumbers > .col-lg-3.col-md-6.stagger-animation,
    #numbersGrid > .col-lg-3,
    #numbersGrid > .col-lg-3.col-md-6,
    #numbersGrid > .col-lg-3.col-md-6.stagger-animation,
    #promotionNumbers > .col-lg-3,
    #promotionNumbers > .col-lg-3.col-md-6,
    #promotionNumbers > .col-lg-3.col-md-6.stagger-animation {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* การ์ดกว้างเต็ม cell */
    .number-card-glass {
        padding: 12px 10px !important;
        min-height: 190px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* เบอร์ */
    .number-card-glass .number-display-enhanced {
        font-size: 14px !important;
        font-weight: 800 !important;
        margin: 26px 0 4px 0 !important;
    }

    /* ราคา */
    .number-card-glass .price-display-enhanced {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    /* badge */
    .number-card-glass .mb-3.d-flex.justify-content-center.gap-2 {
        margin-bottom: 4px !important;
        gap: 2px !important;
        flex-wrap: nowrap !important;
    }

    .number-card-glass .mb-3.d-flex.justify-content-center.gap-2 .badge {
        font-size: 8px !important;
        padding: 2px 4px !important;
        white-space: nowrap !important;
    }

    /* ซ่อน highlight */
    .number-card-glass .text-muted.small.mb-3 {
        display: none !important;
    }

    /* ปุ่ม */
    .number-card-glass .d-flex.gap-2 {
        gap: 4px !important;
        margin-top: 6px !important;
    }

    .number-card-glass .btn {
        padding: 5px 8px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        border-radius: 6px !important;
    }

    .number-card-glass .btn i {
        font-size: 9px !important;
        margin-right: 2px !important;
    }
    
    /* Operator badge */
    .number-card-glass .operator-badge .badge {
        font-size: 8px !important;
        padding: 2px 5px !important;
    }
    
    /* ===== Blog Page iPad Portrait ===== */
    .blog-layout {
        display: block !important;
    }
    
    .blog-main {
        width: 100% !important;
    }
    
    .blog-sidebar {
        width: 100% !important;
        margin-top: 30px !important;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .blog-card-image {
        height: 150px !important;
    }
    
    .blog-card-title {
        font-size: 14px !important;
    }
    
    .blog-card-excerpt {
        font-size: 12px !important;
        -webkit-line-clamp: 2 !important;
    }
}

/* =============================================
   iPad Landscape (992px - 1400px) - แนวนอน 4 คอลัมน์
   ============================================= */
@media (min-width: 992px) and (max-width: 1400px) {
    /* Override Bootstrap col-* ด้วย specificity สูงสุด */
    #featuredNumbers > .col-lg-3,
    #featuredNumbers > .col-lg-3.col-md-6,
    #featuredNumbers > .col-lg-3.col-md-6.stagger-animation,
    #numbersGrid > .col-lg-3,
    #numbersGrid > .col-lg-3.col-md-6,
    #numbersGrid > .col-lg-3.col-md-6.stagger-animation,
    #promotionNumbers > .col-lg-3,
    #promotionNumbers > .col-lg-3.col-md-6,
    #promotionNumbers > .col-lg-3.col-md-6.stagger-animation {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* การ์ดกว้างเต็ม cell ครอบคลุมทุกส่วน */
    .number-card-glass {
        padding: 14px 12px !important;
        min-height: 200px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* เบอร์ */
    .number-card-glass .number-display-enhanced {
        font-size: 15px !important;
        font-weight: 800 !important;
        margin: 28px 0 5px 0 !important;
    }

    /* ราคา */
    .number-card-glass .price-display-enhanced {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }

    /* badge หมวด + ผลรวม */
    .number-card-glass .mb-3.d-flex.justify-content-center.gap-2 {
        margin-bottom: 5px !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
    }

    .number-card-glass .mb-3.d-flex.justify-content-center.gap-2 .badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
        white-space: nowrap !important;
    }

    /* ซ่อนข้อความ highlight */
    .number-card-glass .text-muted.small.mb-3 {
        display: none !important;
    }

    /* ปุ่ม */
    .number-card-glass .d-flex.gap-2 {
        gap: 6px !important;
        margin-top: 8px !important;
    }

    .number-card-glass .btn {
        padding: 6px 10px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        border-radius: 6px !important;
    }

    .number-card-glass .btn i {
        font-size: 10px !important;
        margin-right: 3px !important;
    }
    
    /* Operator badge */
    .number-card-glass .operator-badge .badge {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }
    
    /* ===== Blog Page iPad Landscape ===== */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .blog-card-image {
        height: 160px !important;
    }
    
    .blog-card-title {
        font-size: 15px !important;
    }
    
    .blog-card-excerpt {
        font-size: 13px !important;
    }
}

/* ===== Promo Code Styles ===== */
.promo-code-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.promo-input-group {
    display: flex;
    gap: 10px;
}

.promo-input-group input {
    flex: 1;
}

.btn-apply-promo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-apply-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.promo-result {
    margin-top: 10px;
}

.promo-success {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.promo-success i {
    color: #28a745;
}

.promo-error {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.promo-error i {
    color: #dc3545;
}

.remove-promo {
    background: none;
    border: none;
    color: #155724;
    cursor: pointer;
    margin-left: auto;
    padding: 5px;
}

.remove-promo:hover {
    color: #dc3545;
}

.checkout-total-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.subtotal-row,
.discount-row,
.grandtotal-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.subtotal-row {
    color: #666;
}

.discount-row {
    color: #28a745;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.discount-amount {
    font-weight: 600;
}

.grandtotal-row {
    font-size: 1.1rem;
}

/* ===== Quick Action Buttons on Cards ===== */
.quick-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.quick-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quick-btn:hover {
    transform: scale(1.1);
}

.quick-btn.wishlist-btn:hover,
.quick-btn.wishlist-btn.active {
    background: #ff6b6b;
    color: white;
}

.quick-btn.compare-btn:hover,
.quick-btn.compare-btn.active {
    background: #28a745;
    color: white;
}

/* Desktop card quick actions */
.card-quick-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.number-card-glass:hover .card-quick-actions {
    opacity: 1;
}

.card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.card-action-btn:hover {
    transform: scale(1.1);
}

.card-action-btn[title="เบอร์โปรด"]:hover,
.card-action-btn[title="เบอร์โปรด"].active {
    background: #ff6b6b;
    color: white;
}

.card-action-btn[title="เปรียบเทียบ"]:hover,
.card-action-btn[title="เปรียบเทียบ"].active {
    background: #28a745;
    color: white;
}

/* Mobile - always show buttons */
@media (max-width: 768px) {
    .quick-actions {
        opacity: 1;
        top: 5px;
        left: 5px;
        right: auto;
    }
    
    .card-quick-actions {
        opacity: 1;
        top: 5px;
        left: 5px;
        right: auto;
    }
    
    .quick-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    /* เลื่อน operator tag ไปขวา เพื่อไม่ให้ชนปุ่ม */
    .mobile-number-card .operator-tag {
        margin-left: auto;
        margin-right: 0;
    }
    
    /* หน้าแรก ไม่ต้องแสดงปุ่ม */
    #featuredNumbers .quick-actions,
    #promotionNumbers .quick-actions {
        display: none !important;
    }
}
