/* ===============================
   BONCOM THEME : BLACK / YELLOW
   SYSTEM READY (FINAL)
   =============================== */

:root {
  --bc-black: #0f0f0f;
  --bc-dark: #151515;
  --bc-yellow: #ffcc00;
  --bc-yellow-dark: #e6b800;
  --bc-white: #ffffff;
  --bc-gray: #f5f5f5;
  --bc-text: #222;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Sukhumvit Set",
    "Segoe UI", Tahoma, Arial, "Helvetica Neue", Helvetica,
    "Noto Sans Thai","Noto Sans", sans-serif;
}


/* ===== GLOBAL FONT (Tahoma-like) ===== */
html, body, button, input, select, textarea{
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== GLOBAL ===== */
body {
  background: var(--bc-gray);
  color: var(--bc-text);
  font-family: var(--font-sans);
}

/* ===== LINKS ===== */
a {
  color: var(--bc-yellow);
  text-decoration: none;
}
a:hover {
  color: var(--bc-yellow-dark);
}

/* ===== TOP BAR ===== */
.bc-topbar {
  background: var(--bc-black);
  color: #ccc;
  border-radius: 0 !important;
}
.bc-topbar i {
  color: var(--bc-yellow);
}

/* ===== HEADER / NAVBAR ===== */
.navbar {
  background: var(--bc-black) !important;
  border-radius: 0 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.navbar-brand {
  color: var(--bc-yellow) !important;
  font-weight: 700;
}
.navbar-brand span {
  color: var(--bc-white);
}

.navbar-nav .nav-link {
  color: #ddd !important;
  font-weight: 500;
}
.navbar-nav .nav-link:hover {
  color: var(--bc-yellow) !important;
}

/* ===== TOGGLER (MOBILE) ===== */
.navbar-toggler {
  border: none;
}
.navbar-toggler:focus {
  box-shadow: none;
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* ===== FORM INPUT (GLOBAL) ===== */
form input.form-control {
  border-radius: 999px;
  border: 1px solid #333;
  background: #fff;
  color: #000;
  font-weight: 500;
}

form input.form-control::placeholder {
  color: #aaa;
}

form input.form-control:focus {
  border-color: var(--bc-yellow);
  box-shadow: 0 0 0 0.15rem rgba(255, 204, 0, 0.25);
}

/* ===== FIX INPUT NUMBER (สำคัญมาก) ===== */
input[type="number"],
.qty-input {
  background: #fffefe !important;
  color: #000 !important;                 /* 🔥 แก้เลขหาย */
  -webkit-text-fill-color: #000 !important;
  border: 2px solid var(--bc-yellow);
  font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn-danger,
.btn-primary {
  background: var(--bc-yellow);
  border-color: var(--bc-yellow);
  color: #000;
  font-weight: 600;
}

.btn-danger:hover,
.btn-primary:hover {
  background: var(--bc-yellow-dark);
  border-color: var(--bc-yellow-dark);
  color: #000;
}

.btn-outline-danger {
  border-color: var(--bc-yellow);
  color: var(--bc-yellow);
}
.btn-outline-danger:hover {
  background: var(--bc-yellow);
  color: #000;
}

/* ===== VIEW PRODUCT BUTTON ONLY ===== */
.btn-view-product {
  background-color: var(--bc-yellow);
  border: 1px solid var(--bc-yellow);
  color: #000;
  font-weight: 600;
  border-radius: 999px;
}
.btn-view-product:hover {
  background-color: var(--bc-yellow-dark);
  border-color: var(--bc-yellow-dark);
  color: #000;
}

/* ===== CART BADGE ===== */
.badge.bg-danger {
  background: var(--bc-yellow) !important;
  color: #000;
  font-weight: 700;
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
  border-radius: 12px;
  border: none;
  background: #111;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  padding: 6px 0;
}

.dropdown-item {
  padding: 12px 16px;
  color: #ddd;
}
.dropdown-item:hover {
  background: var(--bc-yellow);
  color: #000;
}

/* ===== CARDS ===== */
.card,
.bg-white {
  border-radius: 14px;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

/* ===== PRICE ===== */
.product-price,
.text-danger,
.text-warning {
  color: #dc3545 !important;   /* 🔴 ราคาเป็นแดง */
  font-weight: 700;
}

/* ===== STOCK STATUS ===== */
.badge-outstock {
  background: #dc3545;
  color: #fff;
  font-weight: 700;
}

.product-out-stock {
  border: 2px solid #dc3545 !important;
}

/* ===== ORDER STATUS ===== */
.badge-status {
  background: var(--bc-yellow);
  color: #000;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== FOOTER ===== */
footer,
.bc-footer {
  background: var(--bc-black);
  color: #bbb;
  border-radius: 0 !important;
}
footer a {
  color: #bbb;
}
footer a:hover {
  color: var(--bc-yellow);
}

/* ===============================
   MOBILE / iPAD FIX
   =============================== */
@media (max-width: 991px) {

  .dropdown-menu {
    position: fixed !important;
    top: 64px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .navbar-nav {
    padding-top: 12px;
  }
}

.bc-logo-img {
  height: 60px;      /* ปรับ 32–42 ได้ */
  width: auto;
  object-fit: contain;
}

/* ===============================
   CATEGORY SIDEBAR (ONLY)
   =============================== */

.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ซ่อน radio จริง */
.category-sidebar input[type="radio"] {
  display: none;
}

/* กล่องหมวด */
.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
  transition: all .2s ease;
}

/* hover */
.category-item:hover {
  background: #ffcc00;
  color: #000;
}

/* icon ซ้าย */
.category-item::before {
  content: "\f07b"; /* folder */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  flex-shrink: 0;
}

/* active (เลือกหมวดอยู่) */
.category-item:has(input[type="radio"]:checked),
.category-item.active {
  background: #ffcc00;
  color: #000;
  font-weight: 600;
}

/* icon ตอน active */
.category-item:has(input[type="radio"]:checked)::before,
.category-item.active::before {
  background: #000;
  color: #ffcc00;
}

/* ===============================
   CATEGORY BANNER
   =============================== */

.category-banner {
  width: 100%;
  background: linear-gradient(
    135deg,
    #000000 0%,
    #1a1a1a 60%,
    #ffcc00 100%
  );
  color: #fff;
  padding: 40px 0;
  margin-bottom: 24px;
}

.banner-content {
  max-width: 720px;
}

.banner-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffcc00;
}

.banner-subtitle {
  font-size: 15px;
  color: #ddd;
  margin: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .category-banner {
    padding: 28px 0;
  }

  .banner-title {
    font-size: 24px;
  }

  .banner-subtitle {
    font-size: 14px;
  }
}



/* ===== SEARCH PAGE : VIEW PRODUCT BUTTON ===== */
.btn-view-search {
  background: var(--bc-yellow);
  border: none;
  color: #000;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 0;
  transition: all .2s ease;
}

.btn-view-search:hover {
  background: var(--bc-yellow-dark);
  color: #000;
  transform: translateY(-1px);
}

/* ===== CONTACT PAGE ===== */
.contact-page {
  max-width: 900px;
}

.contact-title {
  font-weight: 900;
  margin-bottom: 16px;
}

/* กล่องข้อมูล */
.contact-box {
  border: 3px solid #000;
  border-radius: 28px;
  padding: 24px 28px;
  background: #fff;
  line-height: 1.8;
  font-size: 15px;
}

/* กล่องโซเชียล */
.social-box {
  display: inline-flex;
  gap: 14px;
  padding: 14px 22px;
  border: 3px solid #000;
  border-radius: 999px;
  background: #fff;
}

.social-box a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffd400;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: transform .15s ease;
}

.social-box a:hover {
  transform: translateY(-2px);
}

/* กรอบคุมตัวหนังสือ */
.text-box {
  display: inline-block;          /* สำคัญ: คุมเฉพาะเนื้อหา */
  border: 3px solid #ffffff;
  border-radius: 28px;
  padding: 22px 26px;
  background: #fff;
  line-height: 1.8;
  font-size: 15px;
  max-width: 100%;
}

/* จัดระยะบรรทัด */
.text-box p {
  margin: 0 0 10px;
}

.text-box p:last-child {
  margin-bottom: 0;
}

/* ===== FONT (THAI LOOPLESS / NO-HEAD) ===== */
html, body, button, input, select, textarea{ font-family: var(--font-sans) !important; }
