body {
  color: var(--dark);
}
:root {
  --main: #1D4F91;
  --minor: #005EB8;
  --alert: #FF1659;
  --dark: #25282A;
  --gray: #939597;
  --light: #EFEDF1;
  --white: #FFF;
  --pass: #0e9e65;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--white);
  color: var(--dark);
}

a {
  color: var(--minor);
  text-decoration: none;
}

input,
select {
  font-size: 14px;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--white);
  padding: 10px 40px 10px 12px;
  border-radius: 6px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 30px;
  cursor: pointer;
}

table {
  border: 1px solid var(--gray); 
  border-collapse: collapse;
}
tr, td {
  border: 1px solid var(--gray);
}

div[type="button"],
button[type="button"] {
  padding: 10px 20px;
  background: var(--minor);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

button:hover,
div[type="button"]:hover {
  filter: brightness(110%);
  cursor: pointer;
}

.ml-10 {
  margin-left: 10px;
}

.alert {
  color: var(--alert);
}

.icon {
  width: 22px;
  max-width: 22px;
  display: inline-flex;
  vertical-align: bottom;
}

.check-group {
  display: flex;
  gap: 20px;
}

.check {
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.check input[type="radio"],
.check input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  cursor: pointer;
}

.check .checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 24px;
  background-color: #eee;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Radio 樣式 */
.check input[type="radio"] ~ .checkmark {
    border-radius: 50%;
}

.check input[type="checkbox"]:checked ~ .checkmark {
  background-color: var(--minor);
  border-color: var(--minor);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.check input[type="radio"]:checked ~ .checkmark {
  background-color: var(--minor);
  border-color: var(--minor);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

h1 {
  font-size: 36px;
  line-height: 3;
  color: var(--main);
  text-align: center;
}
.quick-menu.collapsed .quick-btn:not(:first-child) {
  display: none;
}
.quick-menu {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-btn {
  width: 60px;
  height: 60px;
  background-color: rgba(160, 160, 160, 0.9);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.3s;
}

.quick-btn img {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.quick-btn:hover {
  background-color: #999;
}

.top-alert {
  background: var(--alert);
  font-size: 14px;
  position: relative;
  height: 50px;
  overflow: hidden;
}

.top-alert .alert-track {
  position: relative;
  height: 50px;
}

.top-alert .alert-item {
  position: absolute;
  color: var(--white);
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  opacity: 0;
  animation: fadeAlerts 20s infinite ease-in-out;
}

.top-alert .alert-item:nth-child(1) { animation-delay: 0s; }
.top-alert .alert-item:nth-child(2) { animation-delay: 4s; }
.top-alert .alert-item:nth-child(3) { animation-delay: 8s; }
.top-alert .alert-item:nth-child(4) { animation-delay: 12s; }
.top-alert .alert-item:nth-child(5) { animation-delay: 16s; }

@keyframes fadeAlerts {
  0% { opacity: 0; }
  10% { opacity: 1; }
  20% { opacity: 1; }
  30% { opacity: 0; }
  100% { opacity: 0; }
}

/* 側邊選單 & 漢堡選單樣式 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--dark);
  display: block;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  padding: 20px;
  overflow-y: auto;
  transition: left 0.3s ease;
}

.side-menu.active {
  left: 0;
}

.side-link.primary {
  display: block;
  background-color: var(--alert);
  border: 1px solid var(--alert);
  color: var(--white);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
}

.side-link.minor {
  display: block;
  color: var(--main);
  border: 1px solid var(--main);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.side-group {
  margin-bottom: 20px;
}

.side-header {
  background: #f3f3f3;
  padding: 10px 12px;
  font-weight: bold;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.side-header .toggle-icon {
  font-weight: bold;
}

.side-sub {
  list-style: none;
  padding: 10px 12px;
  display: block;
}

.side-sub li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

/* 遮罩 */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.overlay.active {
  display: block;
}


.navbar {
  background: var(--white);
  color: var(--dark);
  border-bottom: 1px solid var(--light);
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar .container {
  display: flex;
  max-width: 1200px;
  justify-content: space-around;
  align-items: center;
  padding: 12px 20px;
  flex-wrap: wrap;
  margin: auto;
}


.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  text-align: center;
}

nav li {
  cursor: pointer;
  font-size: 16px;
  position: relative;
  min-width: 110px;
  max-width: 110px;
  line-height: 3;
}

nav li img {
  margin-left: 4px;
  width: 12px;
  height: 12px;
}
nav li:hover {
  background-color: var(--light);
  border-radius: 8px;
}

nav li:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 10;
  border-radius: 8px;
  padding: 6px;
}

.dropdown a {
  color: var(--dark);
}

.dropdown li {
  padding: 8px 0;
  white-space: nowrap;
  line-height: 2;
}

nav li.liner.dark {
  color: var(--dark);
  position: relative;
  display: inline-block;
  transition: all 0.2s ease;
}
nav li.liner.alert {
  color: var(--alert);
  font-weight: bold;
  position: relative;
  display: inline-block;
  transition: all 0.2s ease;
}

nav li.liner.dark::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  height: 2px;
  width: 0;
  background-color: var(--dark);
  transition: width 0.2s ease;
}
nav li.liner.alert::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  height: 2px;
  width: 0;
  background-color: var(--alert);
  transition: width 0.2s ease;
}

nav li.liner:hover::after {
  width: 100%;
}

.member {
  display: flex;
  white-space: nowrap;
  min-width: 135px;
  justify-content: right;
}

.member .sign-wrap {
  display: flex;
}

.member .sign-wrap .login,
.member .sign-wrap .register {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  margin: 2px;
  color: var(--white);
}

.member .sign-wrap .login {
  background: var(--main);
}
.member .sign-wrap .register {
  background: var(--alert);
}
.member .account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member .account a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.member a.user {
  color: var(--minor);
}
.member .user img {
  width: 24px;
  max-height: 24px;
}

.member .cart img {
  width: 36px;
  max-height: 36px;
  margin-left: 18px;
}

.cart {
  position: relative;
  display: inline-block;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--main);
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

.member a.logout {
  font-size: 14px;
  text-decoration: underline;
  opacity: 0.5;
  margin-left: 10px;
}
.member a.logout:hover {
  opacity: 1;
  transition: .3s;
}

.member a.deposit {
  font-size: 14px;
  text-decoration: underline;
}

.member a.deposit:hover {
  filter: brightness(110%);
}




.site-footer {
  background-color: var(--main);
  color: var(--white);
  padding: 40px 20px;
  font-size: 14px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  gap: 20px;
}

.footer-logo {
  width: 200px;
  margin-bottom: 16px;
}

.footer-column {
  flex: 0 1 auto;
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: bold;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.social-icons img {
  width: 36px;
  height: 36px;
}

.contact-info a {
  color: var(--white);
  text-decoration: underline;
}

.contact-info p {
  margin: 8px 0;
}

/* 分頁 */
.pagination {
  text-align: center;
  margin-top: 40px;
}

.page-link {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 6px;
  background: var(--light);
  color: var(--dark);
  text-decoration: none;
  border-radius: 6px;
}

.page-link:hover,
.page-link.active {
  background: var(--minor);
  color: var(--white);
}

@media (max-width: 1024px) {

  .navbar .container {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
  }

  .hamburger {
    display: flex;
  }

  nav {
    display: none;
    width: 100%;
  }

  nav.active {
    display: block;
    background: white;
    border-top: 1px solid #ddd;
  }

  nav ul {
    flex-direction: column;
    padding: 12px;
    gap: 0;
    background: var(--white);
  }

  nav li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    background: white;
    min-width: 60px;
    max-width: 60px;

  }

  .navbar .container {
    justify-content: space-between;
  }

  .dropdown {
    position: static;
    background: #f9f9f9;
    box-shadow: none;
    padding-left: 10px;
  }

  .dropdown li {
    padding: 8px 0;
  }

  .member a.logout {
    display: none;
  }

  .footer-container {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    flex-direction: column;
    gap: 24px;
  }

  .social-icons {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {

}
@media (max-width: 480px) {
  .logo img {
    height: 40px;
  }
  .member .cart img {
    margin-left: 5px;
  }
}