@import url("https://fonts.googleapis.com/css?family=Athiti&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto+Condensed&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Athiti", sans-serif;
}
html,
body {
  overflow-x: hidden;
}

/*----------root values ----------*/
:root {
  --green: #a0cf4f;
  --white: #fff;
  --black: #000;
  --darkbrown: #363636;
  --darkorange: darkorange;
  --gray: #808080;
  --red: #ff3131;
  --blue: #1535ea;
  --darkblue: #254558;
  /* --lg-font: 'Athiti', sans-serif;
--logo-font: 'Athiti', sans-serif; */

  /* --container-color: #1a1e21;
--second-color: rgba (77, 228, 255);
--text-color: #172317;
--bg-color: #fff; */
}

/*-------------------------------
        Header Navbar
--------------------------------*/
header {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column; /* จัดให้เป็น 2 แถว (top-bar และ bottom-bar) */
  position: relative;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  padding: 0;
  margin: 0;
}

header .nav {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column; /* แยกแถวบนและล่าง */
  justify-content: center;
  transition: 0.2s;
}

/* ===== แถวบน: โลโก้ + ชื่อภาควิชา ===== */
header .top-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 100px;
  justify-content: flex-start; /* โลโก้และชื่อภาควิชาอยู่ซ้าย */
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* โลโก้ */
header .top-bar .logo img {
  width: 100px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ชื่อภาควิชา */
header .top-bar .site-title h1 {
  font-size: 18px;
  color: #222;
}
header .bottom-bar .site-title-en {
  display: none;
}

/* ปุ่ม toggle */
header .top-bar .toggle_btn {
  display: none; /* ซ่อนปุ่ม toggle สำหรับ desktop */
}

/* ===== แถวล่าง: เมนู ===== */
header .bottom-bar {
  display: flex;
  align-items: center;
  justify-content: start;
  padding: 0 60px;
  height: 60px;
  font-weight: 500;
}

/* เมนูใน bottom-bar */
header .bottom-bar .links {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-direction: row;
  margin: 0;
  padding: 0 40px;
}
header .bottom-bar .links li {
  list-style: none;
  display: flex;
  align-items: center;
}
header .bottom-bar .links a {
  color: #222;
  font-size: 1rem;
  padding: 5px 10px;
  transition: 0.2s;
  text-decoration: none;
}
header .bottom-bar .links a:hover {
  background: #f37737;
  border-radius: 5px;
  color: #fff;
}

/* ปุ่ม EN */
header .bottom-bar .action_btn {
  background: #f37737;
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 10px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

/* ===============================
   Navbar Icons
================================ */
.nav-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-left: auto;
}
.nav-icons a {
  font-size: 24px;
  color: #d62976;
  transition: 0.3s;
}
.nav-icons a:hover {
  color: #363636;
}
/* Cart */
.cart-icon i {
  color: #333;
}

/* ===== Responsive ===== */
@media screen and (max-width: 1199px) {
  @media screen and (max-width: 768px) {
    header {
      padding: 0;
    }
    /* ซ่อนชื่อภาควิชาไทยบนมือถือ */
    header .top-bar .site-title {
      display: none;
    }
    header .bottom-bar {
      padding: 0 px;
    }
    /* แสดงชื่อภาควิชาใน bottom-bar บนมือถือ */
    header .bottom-bar .site-title-en {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      flex-grow: 1; /* ขยายข้อความให้เต็มพื้นที่ */
      width: 100%; /* ให้พื้นที่เต็ม */
      font-weight: 500;
      color: #333;
      margin-top: 5px;
      line-height: 1.4;
      word-wrap: break-word;
      white-space: normal;
    }
    header .bottom-bar .site-title-en h1 {
      font-size: 14px;
    }
    header .top-bar {
      display: flex;
      align-items: center;
      justify-content: space-between; /* ซ้าย-ขวา */
      padding: 10px 20px;
      border-bottom: none;
    }
    header .top-bar .logo img {
      width: 65px;
    }

    /* แสดง toggle_btn ขวา */
    header .top-bar .toggle_btn {
      display: block;
      border: 1px solid #ddd;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.1);
      font-size: 20px;
      padding: 6px 8px;
      color: #222;
      cursor: pointer;
      transition:
        color 0.2s ease,
        transform 0.2s ease;
    }

    header .top-bar .toggle_btn:hover {
      color: #f37737;
      transform: scale(1.05);
    }

    /* เมนูซ่อนในมือถือ */
    header .bottom-bar .links {
      display: flex;
      flex-direction: column;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(15px);
      position: absolute;
      top: 70px; /* อยู่ใต้ top-bar */
      left: 5%;
      width: 90%;
      border-radius: 10px;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      z-index: 1100;
    }

    /* เมื่อเมนูเปิด */
    header .bottom-bar .links.open {
      display: flex;
      max-height: 800px;
      overflow-y: auto;
    }

    /* ปรับลิงก์ในเมนูมือถือ */
    header .bottom-bar .links li {
      text-align: center;
      padding: 0.5rem 0;
    }

    header .bottom-bar .links li a {
      width: 100%;
      display: block;
      text-align: center;
      color: #222;
      font-size: 1rem;
      padding: 8px 0;
    }

    header .bottom-bar .links li a:hover {
      background: #f37737;
      color: #fff;
    }

    /* ปุ่ม EN บนมือถือ */
    header .bottom-bar .links li a.action_btn {
      font-size: 18px;
      padding: 6px 12px;
      border-radius: 6px;
      display: inline-block;
    }
  }
}

/*----------------------------------------------
                Banner Hero
-----------------------------------------------*/
.myCarousel {
  width: 100%;
  height: 80vh;
  margin-top: -60px;
  overflow: hidden;
  position: relative;
}
.myList {
  width: 100%;
  height: 100%;
}
.myItem {
  width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Overlay ทำให้ข้อความอ่านง่าย */
.myItem::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* Banner Content */
.myItem .content {
  position: absolute;
  top: 50%;
  left: 100px;
  transform: translateY(-50%);
  width: 450px;
  color: #fff;
  z-index: 2;
  text-align: left;
}
.content .title {
  font-size: 55px;
  color: #94f993;
  font-weight: bold;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.content .name {
  font-size: 35px;
  font-weight: bold;
  line-height: 1.1;
  text-shadow: 3px 4px 7px rgba(0, 0, 0, 0.5);
}
.content .des {
  margin-top: 20px;
  margin-bottom: 25px;
  font-size: 18px;
  line-height: 1.6;
}

/* Button */
.content .myBtn button {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  background: #d62976;
  color: #fff;
  transition: 0.3s;
}
.content .myBtn button:hover {
  background: #fff;
  color: #d62976;
}

/* Banner Hero Responsive Tablet */
@media (max-width: 1199px) {
  .myCarousel {
    height: 100vh;
  }
  .myItem .content {
    left: 50px;
    width: 70%;
  }
  .content .title {
    font-size: 45px;
  }
  .content .name {
    font-size: 40px;
  }
  .content .des {
    font-size: 16px;
  }
}

/* Banner Hero Responsive Mobile */
@media (max-width: 768px) {
  .myCarousel {
    height: 65vh;
    margin-top: 0;
  }
  .myItem {
    background-position: center;
  }
  .myItem .content {
    left: 25px;
    width: 80%;
    top: 50%;
  }
  .content .title {
    font-size: 32px;
  }
  .content .name {
    font-size: 28px;
  }
  .content .des {
    font-size: 14px;
    line-height: 1.5;
  }
  .content .myBtn button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/*-----------------------------------------
            Product Detail Page
-----------------------------------------*/

/* background-color: #f8f9fa;
            font-family: 'Sarabun', sans-serif; */

.product-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.product-img-container {
  background-color: #fafafa;
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 1px solid #f0f0f0;
}

.product-img-container img {
  max-height: 380px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-img-container img:hover {
  transform: scale(1.03);
}

.price-tag {
  color: #b82329;
  font-size: 1.75rem;
  font-weight: 700;
}

.badge-category {
  background-color: #e8f4fd;
  color: #0d6efd;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.85rem;
}

.btn-add-cart {
  background-color: #28a745;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  transition: all 0.2s ease;
}

.btn-add-cart:hover {
  background-color: #218838;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-back {
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
}

.info-box {
  background-color: #f8f9fa;
  border-left: 4px solid #0d6efd;
  border-radius: 4px;
  padding: 12px 16px;
}

/*-----------------------------------------
            All-product Page
-----------------------------------------*/
/*-----------------------------------------
            All-product Page
-----------------------------------------*/
/* 1. ปุ่มแคปซูล .myBtn */
.card-body .myBtn {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 10px !important;
}

.card-body .myBtn button {
  background-color: #e83e8c !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  padding: 6px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 10px rgba(232, 62, 140, 0.3) !important;
  width: auto !important;
  max-width: 200px !important;
  min-width: 170px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
}

.card-body .myBtn button:hover {
  background-color: #d63384 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(232, 62, 140, 0.4) !important;
}

/* 2. Badge แยกสี เสื้อโปโล / เสื้อยืด */
.badge-category {
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  display: inline-block;
}

/* เสื้อโปโล: โทนส้มพาสเทล */
.badge-polo {
  background-color: #fff3e6 !important;
  color: #e67e22 !important;
  border: 1px solid #ffd8b3 !important;
}

/* เสื้อยืด: โทนฟ้าพาสเทล */
.badge-tshirt {
  background-color: #e8f4fd !important;
  color: #0d6efd !important;
  border: 1px solid #b6d4fe !important;
}

@media (max-width: 768px) {
  .myBtn button,
  .card-body .myBtn button {
    padding: 5px 12px !important; /* ✂️ ลดความสูงและระยะข้างปุ่ม */
    font-size: 0.75rem !important; /* ✂️ ปรับขนาดตัวอักษรให้เล็กลงพอดีตา */
    max-width: 85% !important; /* จำกัดความกว้างไม่ให้ล้นการ์ด */
    min-width: 140px !important; /* กำหนดความกว้างขั้นต่ำ */
  }

  /* ปรับขนาดไอคอนรถเข็นให้เล็กลงตาม */
  .myBtn button i,
  .card-body .myBtn button i {
    font-size: 0.75rem !important;
    margin-right: 4px !important;
  }
}

/*-----------------------------------------
            Facebook Page
-----------------------------------------*/
.fb-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.fb-page {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  overflow: hidden;
}

/*---------------------------------------------------
                    Map
----------------------------------------------------*/
.map {
  background-color: #eee;
}

.contact-text a {
  text-decoration: none;
  color: #000;
}

.contact-text a:hover {
  font-weight: bolder;
  color: #f37737;
}
.map-responsive {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/*---------------------------------------------------
                    Footer
----------------------------------------------------*/
.footer {
  background: #d62976;
  width: 100%;
  height: 5%;
  padding: 1rem;
}
.footer .copyright {
  color: #fff;
  text-align: center;
}
