:root {
    --primary: #FF512F;       /* แดงส้ม Coral สว่าง */
    --secondary: #DD2476;     /* แดงอมชมพู ทันสมัย */
    --accent: #F09819;        /* เหลืองทอง ละมุน */
    --success: #11998e;       /* เขียว Emerald */
    --text-main: #2b2b2b;
    --text-light: #636e72;
    --bg-light: #fdfbf7;      /* พื้นหลังขาวอมครีมนิดๆ ให้ดูแพง */
    --white: #ffffff;
    --dark: #1e272e;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Prompt', sans-serif; scroll-behavior: smooth;}
body { background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; overflow-x: hidden;}

/* 📋 Top Bar */
.top-bar { background-color: var(--white); border-bottom: 2px solid #f4f5f7; padding: 12px 5%; display: flex; justify-content: center; }
.top-bar-info { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 1200px;}
.contact-pill { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #6d4c41; font-weight: 800; font-size: 15px; transition: 0.2s; }
.contact-pill.clickable:hover { transform: translateY(-2px); color: var(--primary); }
.contact-pill.clickable:hover .icon-circle { background-color: var(--primary); box-shadow: 0 4px 8px rgba(255, 81, 47, 0.3); }
.icon-circle { width: 28px; height: 28px; background-color: #6d4c41; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; transition: 0.2s; flex-shrink: 0;}

/* Navbar */
.navbar { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 10px 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05);}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-img { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); box-shadow: 0 2px 5px rgba(255, 81, 47, 0.3); transition: 0.3s; }
.nav-brand:hover .nav-logo-img { transform: rotate(10deg) scale(1.1); }
.nav-brand-text { font-size: 22px; font-weight: 800; color: var(--primary); display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand-sub { font-size: 11px; color: var(--secondary); font-weight: 600; letter-spacing: 0.5px; }

.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; transition: all 0.3s ease; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 600; transition: color 0.3s; font-size: 15px; }
.nav-links a:hover { color: var(--secondary); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 28px; color: var(--primary); cursor: pointer; }
.mobile-menu-wrapper { display: none; }
.mobile-quick-btn { position: relative; cursor: pointer; font-size: 24px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none;}
.mobile-quick-btn .badge { position: absolute; top: -5px; right: -8px; background: var(--primary); color: white; font-size: 11px; padding: 2px 6px; border-radius: 10px; font-weight: bold; border: 2px solid white; }

/* Buttons General */
.btn { padding: 10px 25px; border-radius: 30px; font-weight: 700; text-decoration: none; cursor: pointer; border: none; transition: all 0.3s ease; display: inline-block; text-align: center; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary) !important; background: transparent; display: flex; align-items: center; gap: 5px; background: white;}
.btn-outline:hover { background: var(--primary); color: var(--white) !important; }

/* 🌟 เอฟเฟกต์แบบที่ 3: ปุ่มเมนูด้านบน (สวัสดี/จัดการคำสั่งซื้อ) สีไหลวน + แสงวิ่งช้อนขึ้น */
#nav-auth-btn, #nav-manage-order-btn, #mobile-auth-btn, #mobile-manage-order-btn {
    background: linear-gradient(270deg, var(--secondary), var(--primary), var(--secondary)) !important;
    background-size: 200% 200% !important;
    animation: gradientFlow 4s ease infinite !important;
    color: var(--white) !important; 
    padding: 10px 24px; 
    font-size: 15px; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(221, 36, 118, 0.3);
    border: none !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
#nav-manage-order-btn, #mobile-manage-order-btn {
    background: linear-gradient(270deg, #11998e, #38ef7d, #11998e) !important; 
    box-shadow: 0 4px 10px rgba(17, 153, 142, 0.3);
}
#nav-auth-btn::after, #nav-manage-order-btn::after, #mobile-auth-btn::after, #mobile-manage-order-btn::after {
    content: ''; position: absolute; bottom: -100%; left: 0;
    width: 100%; height: 60%;
    background: linear-gradient(to top, transparent, rgba(255,255,255,0.4), transparent);
    animation: verticalWipe 3.5s infinite ease-in-out;
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes verticalWipe { 
    0% { bottom: -100%; } 
    25% { bottom: 200%; } 
    100% { bottom: 200%; } 
}

/* ปุ่มยืนยันขนาดใหญ่ (Giant) */
.btn-giant { width: 100%; padding: 16px 20px; font-size: 18px; font-weight: 800; border-radius: 12px; border: none; color: var(--white); cursor: pointer; transition: all 0.2s ease; display: block; box-shadow: 0 4px 12px rgba(0,0,0,0.1); position: relative; overflow: hidden; }
.btn-giant-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.btn-giant-success { background: linear-gradient(135deg, var(--success), #0cb0a0); box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3); }
.btn-giant:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-giant::after { 
    content: ''; position: absolute; top: 0; left: -100%; width: 40%; height: 100%; 
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%); 
    transform: skewX(-25deg); animation: fastShine 2s infinite; pointer-events: none; 
}
@keyframes fastShine { 0% { left: -100%; } 40% { left: 200%; } 100% { left: 200%; } }

/* 🎵 Floating Music Player */
.music-player { position: fixed; bottom: 30px; left: 30px; display: flex; align-items: center; gap: 15px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); padding: 10px 20px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 2px solid #eee; cursor: pointer; transition: 0.3s; z-index: 9999; }
.music-player:hover { transform: scale(1.05); border-color: var(--primary); }
.visualizer { display: flex; align-items: flex-end; gap: 4px; height: 24px; width: 30px; }
.v-bar { width: 5px; background-color: var(--text-light); border-radius: 3px; height: 5px; transition: height 0.1s ease, background-color 0.3s; }
.music-player.playing .v-bar { background-color: var(--primary); animation: sound-bounce 0.8s infinite alternate ease-in-out; }
.music-player.playing .v-bar:nth-child(1) { animation-delay: 0.0s; }
.music-player.playing .v-bar:nth-child(2) { animation-delay: 0.2s; }
.music-player.playing .v-bar:nth-child(3) { animation-delay: 0.4s; }
.music-player.playing .v-bar:nth-child(4) { animation-delay: 0.6s; }
@keyframes sound-bounce { 0% { height: 5px; } 100% { height: 24px; } }
.music-info { display: flex; flex-direction: column; }
.music-title { font-size: 13px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.music-status { font-size: 11px; color: var(--primary); font-weight: bold; }

/* 🎬 Hero Banner & ✨ Text Animation */
.hero { padding: 80px 5%; background: linear-gradient(135deg, #FFE4D6 0%, #FFDDBA 100%), url('https://www.transparenttextures.com/patterns/cubes.png'); min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-radius: 0 0 40px 40px; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(255, 81, 47, 0.05); }
.hero-subtitle { font-size: 20px; color: var(--dark); font-weight: 400; margin-bottom: 20px; line-height: 1.6; background: rgba(255,255,255,0.7); padding: 15px 30px; border-radius: 50px; display: inline-block; backdrop-filter: blur(5px); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.5);}

.rw-wrapper { font-weight: 900; font-size: 45px; color: var(--dark); margin-bottom: 30px; text-shadow: 2px 2px 0px white; letter-spacing: -1px; height: 60px; position: relative; width: 100%; display: flex; justify-content: center; align-items: center;}
.rw-words { position: relative; margin-left: 15px; display: inline-block; width: 350px; text-align: left; }
.rw-words span { position: absolute; top: 0; opacity: 0; overflow: hidden; color: var(--primary); animation: rotateWord 9s linear infinite 0s; white-space: nowrap; left: 0;}
.rw-words span:nth-child(2) { animation-delay: 3s; color: var(--secondary); }
.rw-words span:nth-child(3) { animation-delay: 6s; color: var(--dark); }
@keyframes rotateWord {
    0% { opacity: 0; transform: translateY(20px); }
    5% { opacity: 1; transform: translateY(0px); }
    28% { opacity: 1; transform: translateY(0px); }
    33% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* ➡️ Carousel Products Section */
.products { padding: 40px 5% 80px; text-align: left; }
.section-title { font-size: 38px; color: var(--dark); margin-bottom: 10px; font-weight: 900; text-align: center; line-height: 1.2;}
.section-subtitle { color: var(--text-light); margin-bottom: 40px; font-size: 16px; text-align: center; }
.category-block { margin-bottom: 50px; background: white; padding: 25px 20px; border-radius: 24px; box-shadow: 0 5px 30px rgba(0,0,0,0.03); border: 1px solid #f9f9f9; }
.category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px dashed #eee; padding-left: 10px; padding-right: 10px; }
.category-title { font-size: 26px; font-weight: 900; color: var(--dark); display: flex; align-items: center; gap: 10px; }
.slider-controls { display: flex; gap: 10px; }
.btn-arrow { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-light); border: 2px solid #eee; color: var(--dark); font-size: 18px; font-weight: bold; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.05);}
.btn-arrow:hover { background: var(--primary); color: white; border-color: var(--primary); transform: scale(1.1); }
.slider-wrapper { position: relative; }
.product-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 20px; padding: 15px 5px 25px 5px; scrollbar-width: none; -ms-overflow-style: none;}
.product-slider::-webkit-scrollbar { display: none; }
.product-card { flex: 0 0 280px; scroll-snap-align: start; background: var(--white); border-radius: 20px; padding: 15px; transition: 0.3s; position: relative; border: 1px solid #f4f5f7; display: flex; flex-direction: column; text-align: left; }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(255, 81, 47, 0.15); border-color: #ffccc7; z-index: 2;}
.p-img-box { width: 100%; height: 200px; border-radius: 12px; overflow: hidden; margin-bottom: 15px; background: #fafbfc; display: flex; justify-content: center; align-items: center; position: relative;}
.product-img { width: 100%; height: 100%; object-fit: contain; transition: 0.5s; mix-blend-mode: multiply; border-radius: 0; margin-bottom: 0; background: transparent; }
.product-card:hover .product-img { transform: scale(1.08); }
.product-name { font-size: 18px; font-weight: 800; color: var(--dark); line-height: 1.3; margin-bottom: 10px; height: 46px; overflow: hidden; }
.price-box { margin-bottom: 15px; background: #fffaf0; padding: 10px 12px; border-radius: 12px; border: 1px dashed #ffd591; position: relative;}
.price-sale-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;}
.price-full { font-size: 13px; color: #a0aabf; text-decoration: line-through; display: block; margin-bottom: 2px; font-weight: 600;}
.price-current { font-size: 26px; font-weight: 900; color: var(--primary); line-height: 1; }
.price-normal { font-size: 24px; font-weight: 800; color: var(--dark); }

/* 🌟 เอฟเฟกต์แบบที่ 2: ป้ายลดราคา เอียง + ขยายตุ๊บๆ + แสงแฟลชแวววาว */
.discount-badge { 
    position: absolute; top: -12px; right: -5px; 
    background: linear-gradient(45deg, var(--accent), var(--primary)); 
    color: white; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; 
    box-shadow: 0 4px 10px rgba(255, 81, 47, 0.4); 
    z-index: 10;
    overflow: hidden;
    animation: pulse-red 1.5s infinite; 
}
@keyframes pulse-red { 
    0%, 100% { transform: scale(1) rotate(5deg); } 
    50% { transform: scale(1.1) rotate(5deg); } 
}
.discount-badge::after {
    content: ''; position: absolute; top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-15deg);
    animation: badgeShine 2.5s infinite ease-in-out;
    animation-delay: 1s; 
}
@keyframes badgeShine { 0% { left: -150%; } 15% { left: 150%; } 100% { left: 150%; } }


/* 🌟 เอฟเฟกต์แบบที่ 1: ปุ่มหยิบใส่ตะกร้า แสง Ambient เรืองแสงฟุ้งๆ (Ambient Glow) ดูพรีเมียม */
.add-to-cart-btn { 
    width: 100%; 
    color: white; padding: 12px; border-radius: 12px; font-weight: 700; font-size: 15px; 
    border: none; cursor: pointer; transition: 0.3s; margin-top: auto; display: block; text-align: center; 
    position: relative; 
    z-index: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* สร้างแสง Ambient ฟุ้งๆ ด้านหลังปุ่มที่กระเพื่อมเบาๆ */
.add-to-cart-btn::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary), var(--primary));
    background-size: 300% 300%;
    border-radius: 12px;
    z-index: -1;
    filter: blur(12px); /* ปรับความฟุ้งกระจายของแสง */
    opacity: 0.8;
    animation: ambientGlowMove 3s ease-in-out infinite;
}

@keyframes ambientGlowMove { 
    0% { background-position: 0% 50%; opacity: 0.6; transform: scale(1); } 
    50% { background-position: 100% 50%; opacity: 1; transform: scale(1.05); } 
    100% { background-position: 0% 50%; opacity: 0.6; transform: scale(1); } 
}

.add-to-cart-btn:hover { 
    transform: translateY(-2px); 
}
.add-to-cart-btn:hover::before {
    filter: blur(16px);
    opacity: 1;
}

.btn-disabled { background: #f4f5f7; color: #adb5bd; cursor: not-allowed; border: none;}
.btn-disabled::before { display: none; }
.btn-disabled:hover { background: #f4f5f7; transform: none; box-shadow: none; color: #adb5bd; filter: none;}


/* Modals (Cart & Auth) */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.cart-modal { 
    display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important;
    background: var(--white); padding: 30px; border-radius: 20px; width: 500px; max-width: 95%; max-height: 90vh; 
    overflow-y: auto; overflow-x: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.2); position: relative; animation: slideUp 0.3s ease-out; 
}
.cart-modal > div, .cart-modal > ul, .cart-modal > h3 { width: 100% !important; box-sizing: border-box !important; }

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-modal-btn { position: absolute; top: 15px; right: 15px; background: #f4f5f7; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-weight: bold; color: var(--text-light); display: flex; justify-content: center; align-items: center; z-index: 10; transition: 0.2s;}
.close-modal-btn:hover { background: #ff4d4f; color: var(--white); transform: rotate(90deg); }
.cart-title { font-size: 24px; color: var(--dark); font-weight: 900; margin-bottom: 20px; border-bottom: 2px dashed #eee; padding-bottom: 15px; }
.cart-items-list { list-style: none; margin-bottom: 20px; max-height: 350px; overflow-y: auto; padding-right: 5px;}
.cart-item-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item-info { flex: 1; padding-right: 10px; }
.cart-item-name { font-weight: bold; font-size: 15px; color: var(--text-main); margin-bottom: 4px;}
.cart-item-price { font-size: 14px; color: var(--primary); font-weight: 800; }
.cart-qty-control { display: flex; align-items: center; gap: 8px; background: #fafbfc; padding: 5px; border-radius: 30px; border: 1px solid #eee;}
.cart-qty-btn { width: 30px; height: 30px; border-radius: 50%; border: none; background: white; cursor: pointer; font-weight: bold; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s; font-size: 16px;}
.cart-qty-btn:hover { background: var(--primary); color: white;}
.cart-qty-val { font-weight: 800; min-width: 25px; text-align: center; font-size: 15px; }
.cart-del-btn { color: #ff4d4f; cursor: pointer; margin-left: 10px; font-size: 18px; background: none; border: none; transition: 0.2s; }
.cart-del-btn:hover { transform: scale(1.2); }
.cart-summary-box { background: linear-gradient(135deg, #fffaf0, #fff0e6); padding: 20px; border-radius: 16px; border: 1px solid #ffe0b2; margin-bottom: 20px; }
.cart-total-line { display: flex; justify-content: space-between; font-size: 22px; font-weight: 900; color: var(--secondary); }

.auth-input { width: 100%; padding: 14px 15px; margin-bottom: 15px; border: 2px solid #eee; border-radius: 12px; font-size: 15px; background: #fafbfc; transition: 0.3s;}
.auth-input:focus { border-color: var(--primary); outline: none; background: white; box-shadow: 0 0 0 4px rgba(255,81,47,0.1);}
.auth-input:disabled { background-color: #f4f5f7; color: #aaa; cursor: not-allowed; border-color: #ddd;}
.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 15px; }
.address-grid .full-width { grid-column: span 2; }
.address-grid .auth-input { margin-bottom: 0; }
.auth-toggle-text { text-align: center; font-size: 14px; color: var(--text-light); margin-top: 25px; border-top: 1px dashed #eee; padding-top: 15px; }
.auth-toggle-link { color: var(--primary); font-weight: 800; cursor: pointer; text-decoration: underline; margin-left: 5px; font-size: 15px; }
footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 40px 5%; text-align: center; margin-top: auto; font-size: 14px;}

@media (max-width: 768px) {
    .top-bar { padding: 10px; }
    .top-bar-info { gap: 12px; justify-content: flex-start; flex-direction: row; flex-wrap: wrap;}
    .contact-pill { font-size: 13px; width: 45%; }
    
    .mobile-menu-btn { display: block; }
    
    .mobile-menu-wrapper { display: flex; align-items: center; gap: 15px; }
    .hide-on-mobile { display: none !important; }

    .nav-links { position: absolute; top: 100%; left: 0; width: 100%; background: var(--white); flex-direction: column; padding: 0; gap: 0; box-shadow: 0 10px 15px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; }
    .nav-links.active { max-height: 450px; padding: 10px 0 20px 0; }
    .nav-links li { width: 100%; text-align: center; padding: 12px 0; border-bottom: 1px solid #f4f5f7; }
    .nav-links li:last-child { border-bottom: none; }
    .mobile-auth-btn { width: 80%; margin: 10px auto 0 auto; display: block; }
    
    .hero { padding: 50px 5%; min-height: 350px;}
    .rw-wrapper { font-size: 32px; flex-direction: column; height: auto;}
    .rw-words { margin-left: 0; width: 100%; text-align: center; height: 40px; margin-top: 10px;}
    .rw-words span { left: 50%; transform: translateX(-50%); text-align: center; width: 100%; }
    
    .category-title { font-size: 22px; }
    .btn-arrow { display: none; }
    .product-card { flex: 0 0 240px; }
    .music-player { bottom: 20px; left: 20px; padding: 8px 15px; }
    .music-title { display: none; }
}