﻿@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --black: #111111;
  --gold: #d4af37;
  --gold-soft: #f6e6b0;
  --text: #222222;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
}

body,
body * {
  font-family: "Kanit", "Kanit", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
}

.site-header,
.site-header *,
.site-header input,
.site-header button,
.site-header input::placeholder,
.site-header button::placeholder {
  font-family: "Kanit", "Kanit", system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.site-header a {
  text-decoration: none;
  color: inherit;
}

.site-header .container {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

@media (max-width: 540px) {
  .site-header .container {
    width: 100%;
    padding: 0 16px;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 6px 0;
  width: 100%;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-symbol {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--gold);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text span:first-child {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 1.6px;
}

.logo-text span:last-child {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
}

.nav-menu {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 16px;
  font-weight: 400;
  font-size: 14px;
  margin: 0;
}

.nav-menu a {
  position: relative;
  padding: 4px 0;
  color: #555;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--black);
  font-weight: 500;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), #ffdf7a);
  transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  padding: 10px;
  display: none;
  min-width: 220px;
  z-index: 1000;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  margin-top: 5px;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 5px;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  color: #333;
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: #f6f6f6;
  color: var(--black);
}

.dropdown-menu a::after {
  display: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown .dropdown-menu:hover {
  display: block;
  opacity: 1;
  visibility: visible;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(247, 245, 239, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.nav-search input[type='search'] {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  min-width: 170px;
  outline: none;
}

.nav-search input[type='search']::placeholder {
  color: rgba(34, 34, 34, 0.55);
}

.nav-search button {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #1b1207;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(190, 139, 44, 0.92));
  box-shadow: 0 8px 16px rgba(212, 175, 55, 0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

.nav-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(212, 175, 55, 0.24);
}

.nav-search button:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.6);
  outline-offset: 2px;
}

.social-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(43, 71, 156, 0.24);
  background: linear-gradient(135deg, rgba(40, 70, 150, 0.72), rgba(120, 150, 220, 0.65));
  color: #f9faff;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(36, 58, 126, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  overflow: hidden;
}

.social-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  opacity: 0.4;
  transition: opacity var(--transition);
  pointer-events: none;
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 22px rgba(30, 52, 118, 0.22);
  background: linear-gradient(135deg, rgba(45, 78, 165, 0.78), rgba(130, 160, 225, 0.72));
}

.social-button:hover::after {
  opacity: 0.6;
}

.social-button:focus-visible {
  outline: 2px solid rgba(100, 138, 228, 0.35);
  outline-offset: 3px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.social-button svg {
  display: block;
}

.social-button .social-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.06));
  text-decoration: none;
  color: var(--black);
  font-weight: 600;
  font-size: 14px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(212, 175, 55, 0.18);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.1));
}

.cart-button:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.6);
  outline-offset: 2px;
}

.cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--black);
}

.cart-icon svg {
  display: block;
}

.cart-label {
  letter-spacing: 0.02em;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .nav-menu {
    gap: 14px;
    font-size: 13px;
  }

  .nav-search {
    min-width: 200px;
  }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
  position: relative;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--black);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle:hover span {
  background-color: var(--gold);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 540px) {
  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    padding: 8px 0;
    min-height: 48px;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 2;
    flex-shrink: 0;
  }

  .logo-wrap {
    order: 1;
    flex: 1;
    min-width: 0;
  }

  .logo-symbol {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .logo-text span:first-child {
    font-size: 11px;
    letter-spacing: 1.2px;
  }

  .logo-text span:last-child {
    font-size: 15px;
  }

  .nav-actions {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px;
    border-radius: 10px 10px 0 0;
    z-index: 99;
    flex-direction: column;
    width: calc(100% - 32px);
    gap: 10px;
    order: 3;
  }

  .nav-actions.mobile-open {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px;
    margin-top: 0;
    border-radius: 0 0 10px 10px;
    z-index: 98;
    flex-direction: column;
    width: calc(100% - 32px);
    gap: 12px;
    order: 4;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
  }

  .nav-menu.mobile-open {
    display: flex;
  }

  .nav-actions.mobile-open {
    display: flex;
  }

  .nav-menu a {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-menu a:hover {
    background-color: rgba(212, 175, 55, 0.1);
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > a {
    width: 100%;
    display: block;
    padding: 10px 14px;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    display: none;
    opacity: 0;
    visibility: hidden;
    box-shadow: none;
    background: rgba(247, 245, 239, 0.5);
    margin-top: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  }

  .nav-dropdown.mobile-open .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    margin-top: 8px;
    padding: 8px 12px;
    width: 100%;
  }

  .nav-dropdown.mobile-open .dropdown-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    min-height: 42.39px;
    box-sizing: border-box;
  }

  .cart-button {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
  }

  .social-button {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 11px;
  }

  .nav-search {
    width: 100%;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .nav-search input[type='search'] {
    min-width: 0;
    width: 100%;
    font-size: 13px;
  }

  .nav-search button {
    padding: 6px 14px;
    font-size: 12px;
  }
}




