﻿@import url(./font.css);

:root {
    --bs-primary-rgb: 81, 92, 206;
    --primary-color: #FFE600;
}

html {
  scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'AttenNew', 'DindanMai', sans-serif !important;
    background-color: white;
    color: var(--text-color);
    scroll-behavior: smooth;

    background-color: #F7F6F2;
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: top center;
}

.bg-color {
    background-color: #F7F6F2;
}

.btn-warning {
    background-color: #FFE600 !important;
    border-color: #FFE600 !important;
    color: #000 !important;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #e6cf00 !important;
    border-color: #e6cf00 !important;
    color: #000 !important;
}

/* ====== HEADER AREA ====== */

/* Header area */
.top-nav {
  background-color: #f9f7f2;
  height: 95px;
  border-bottom: 1px solid #ddd;
}

.top-nav .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo section */
.logo {
  width: 180px; /* ความกว้างช่องโลโก้ตาม design Figma */
  display: flex;
  align-items: center;
  justify-content: center; /* <<< สำคัญ: จัดกึ่งกลางแนวนอน */
}

.logo img {
  max-height: 72px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ส่วนเมนู (อยู่ตรงกลาง header) */
.main-menu {
  flex-grow: 1;
  justify-content: center;
}

/* ส่วนขวา (cart / user) */
.right-menu {
  width: 274px; /* ความกว้างเท่ากับช่องโลโก้ */
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.menu-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 95px;
  border-left: 1px solid #A7A7A7;  
}

.menu-item2 {
  flex: 0.45;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 95px;
  border-left: 1px solid #A7A7A7;
  position: relative;
}

.header-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: transparent;
  color: #000;
  font-size: 20px;
}

.header-search-icon:hover {
  color: #e08b00;
}

.header-search-form {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 260px;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #D0D0D0;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  z-index: 50;
}

.header-search-form.is-open {
  display: flex;
}

.header-search-input {
  width: 100%;
  height: 34px;
  padding: 4px 8px;
  border: 1px solid #D0D0D0;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
}

.header-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #000;
}

.header-search-button:hover {
  color: #e08b00;
}

.menu-item:last-child {
  border-right: 1px solid #A7A7A7;
}

.menu-item .nav-link {
  width: 100%;
  padding: 0 10px;
  font-size: 20px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
}

.menu-item .nav-link:hover {
  color: #e08b00;
}

.right-menu .menu-item {
  height: 95px;
  display: flex;
  align-items: center;
  border-color: #A7A7A7;
}

.right-menu .nav-link {
  font-weight: 500;
}

.right-menu {
  width: 274px; /* ให้สมดุลกับช่องโลโก้ */
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* เส้นคั่นแนวตั้ง */
.cart-link {
  padding-right: 1rem;
  margin-right: 1rem;
  border-right: 1px solid #d9d9d9; /* สีเทาอ่อนตาม Figma */
}

.user-info img {
  border-radius: 50%;
}

.user-info span {
  font-size: 20px;
  font-weight: 500;
}

/* =========================
   Footer Section
========================= */
.footer-section {
  background: url('../img/footer_bg.png') no-repeat center bottom;
  background-size: cover;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-section .footer-links {
    font-size: 24px;
}

/* Logo */
.footer-logo {
  max-width: 180px;
  height: auto;
}

/* Social Icons */
.social-icons a {
  color: #FFE600;
  font-size: 24px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #FEEB3B; /* สีเหลืองตามธีม */
}

/* Footer Links */
.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #FEEB3B;
}

/* Footer Bottom */
.footer-bottom {
  padding-top: 15px;
  color: #aaa;
  font-size: 14px;
}

.footer-bottom .small {
    font-size: 18px;
}

/* Cart */
.offcanvas {
    width: 400px;
}

.btn-outline-secondary {
    border-color: #ccc;
    color: #333;
}

.btn-outline-secondary:hover {
    background-color: #f1f1f1;
}

.offcanvas-body input[type="text"] {
padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-section {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-links {
    text-align: center;
  }
}

/* Override Bootstrap Container Max Width */
@media (min-width: 1400px) {
  .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 93%;
  }
}

.text-price {
    color: #515CCE;
}

.text-price-sale {
    color: #FF0036;
}

.text-price-sale .text-muted {
    font-size: 18px;
}

.imgzoom:hover {
    opacity: 0; /* ซ่อนภาพต้นฉบับเมื่อ hover */
}

.onsale_form_loading {
	background-image: url("/content/img/loading.gif");
	background-repeat: no-repeat;
	min-height: 32px;
	width: 100%;
}

.status-out {
    color: #FF0036;
}

/* Overlay */
#cartPopupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: none;

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

/* Popup Box */
.cart-popup-box {
    width: 450px;
    max-width: 90%;
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    height: auto;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
    cursor: pointer;

    animation: popupFade 0.25s ease-out;
}

/* Icon Circle */
.cart-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    color: #fff;
}

/* Success */
.cart-popup-icon.success {
    background: #1abc9c;
}

/* Error */
.cart-popup-icon.error {
    background: #e74c3c;
}

/* Text */
.cart-popup-text {
    font-size: 18px;
    font-weight: 500;
}

/* Animation */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.item-template {
    display: none !important;
}
