/* ===== OSEALS - Shared Styles ===== */
:root {
  --bg: #ffffff;
  --bg2: #f3f5f9;
  --bg3: #e9ecf2;
  --ink: #1a1f2e;
  --muted: #6b7a8d;
  --rule: #dde1e8;
  --accent: #0056b3;
  --accent-light: #e8f0fe;
  --accent-dark: #003d82;
  --red: #d32f2f;
  --red-hover: #b71c1c;
  --green: #2e7d32;
  --orange: #e65100;
  --gold: #d4a017;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  color: var(--ink);
  background: var(--bg2);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Top Nav ===== */
.top-nav {
  background: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.top-nav-left { display: flex; align-items: center; gap: 1.2rem; }
.top-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}
.top-nav a:hover, .top-nav a.active { color: #fff; }
.top-nav-right { display: flex; align-items: center; gap: 0.8rem; }
.top-nav-right a { font-size: 0.78rem; }
.lang-switch {
  color: rgba(255,255,255,0.7) !important;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem !important;
}
.lang-switch:hover { border-color: rgba(255,255,255,0.6); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}

/* Mobile Navigation Dropdown */
.mobile-nav-dropdown {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  background: #1a1f2e;
  z-index: 99;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}
.mobile-nav-dropdown.active { display: flex; }
.mobile-nav-dropdown a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--transition);
}
.mobile-nav-dropdown a:hover,
.mobile-nav-dropdown a.active { color: #fff; background: var(--sidebar-hover); }

/* ===== Logo Bar ===== */
.logo-bar {
  background: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--accent);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.logo {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent), #2196F3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: -4px;
}

/* ===== Search Bar ===== */
.search-section {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  padding: 0.75rem 1.5rem;
  position: relative;
}
.search-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.search-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  overflow: visible;
  position: relative;
}
.search-category-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px 0 18px;
  height: 42px;
  background: none;
  border: none;
  border-right: 1px solid var(--rule);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 6px;
}
.search-input-wrap svg { color: var(--muted); flex-shrink: 0; margin-left: 8px; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 10px;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.search-input::placeholder { color: #aab; }
.search-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3px 3px 3px 0;
  flex-shrink: 0;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--red-hover); }
.search-hints {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.search-hint {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  text-decoration: none;
}
.search-hint:hover { background: rgba(255,255,255,0.3); }

/* Dropdowns */
.category-dropdown, .search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.category-dropdown.active, .search-dropdown.active { display: block; }
.category-dropdown { left: 0; min-width: 220px; max-height: 340px; overflow-y: auto; }
.search-dropdown { left: 0; right: 0; max-height: 460px; }
.category-dropdown-item, .search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink);
  transition: background var(--transition);
  border-bottom: 1px solid var(--bg2);
}
.category-dropdown-item:hover, .search-result-item:hover { background: var(--accent-light); }
.category-dropdown-item:last-child, .search-result-item:last-child { border-bottom: none; }
.category-dropdown-item.active-cat { color: var(--accent); font-weight: 600; }
.search-dropdown-header {
  padding: 10px 16px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.search-results-list { list-style: none; max-height: 360px; overflow-y: auto; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.search-result-thumb {
  width: 44px; height: 44px; background: var(--bg2); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.6rem; font-weight: 700; color: var(--accent);
  border: 1px solid var(--rule);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-weight: 600; font-size: 0.85rem; }
.search-result-name mark { background: none; color: var(--red); font-weight: 700; }
.search-result-meta { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.search-result-action {
  padding: 4px 12px; background: var(--accent); color: #fff; border: none;
  border-radius: 20px; font-size: 0.72rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.search-no-result { padding: 2rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
.search-dropdown-footer {
  padding: 8px 16px; text-align: center; border-top: 1px solid var(--rule);
  font-size: 0.72rem; color: var(--muted);
}
.search-dropdown-footer kbd {
  background: var(--bg2); padding: 1px 5px; border-radius: 3px;
  font-size: 0.68rem; border: 1px solid var(--rule); font-family: inherit;
}

/* ===== Category Section (Homepage) ===== */
.category-section {
  background: #fff;
  padding: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.category-section-header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.category-section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.category-section-header p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  max-width: 1280px;
  margin: 0 auto;
}
.category-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  background: #fff;
}
.category-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.category-card-img svg { color: rgba(255,255,255,0.9); }
.category-card-icon {
  width: 44px; height: 44px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.category-card-icon svg { color: var(--accent); width: 22px; height: 22px; }
.category-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
}
.category-card-count {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ===== Banner ===== */
.banner {
  background: linear-gradient(135deg, #0a2a5e 0%, #0d3b7a 40%, #1565c0 100%);
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.banner-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    radial-gradient(circle at 20% 50%, #fff 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, #fff 1px, transparent 1px);
  background-size: 80px 80px, 100px 100px;
}
.banner-content {
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.banner-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}
.banner p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.25rem;
}
.banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}
.banner-cta:hover { background: var(--red-hover); transform: translateY(-2px); }

/* ===== Main Content ===== */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--accent);
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px;
  margin: 0 auto 0.6rem;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { color: var(--accent); width: 22px; height: 22px; }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, var(--accent-light), #dbeafe);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { color: var(--accent); width: 24px; height: 24px; }
.feature-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ===== Products Section (Homepage) ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.section-header h3 {
  font-size: 1.1rem;
  color: var(--ink);
}
.section-header .view-all {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.section-header .view-all:hover { text-decoration: underline; }

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.product-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.875rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  border: 1px solid var(--bg3);
}
.product-card-img svg { color: var(--accent); opacity: 0.4; }
.product-card-code {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.product-card-cat {
  font-size: 0.72rem;
  color: var(--muted);
}
.product-card-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
}
.tag-hot { background: var(--orange); }
.tag-new { background: var(--green); }
.product-card-inquiry {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.product-card:hover .product-card-inquiry { opacity: 1; transform: scale(1); }
.product-card-inquiry:hover { background: var(--red-hover); transform: scale(1.1) !important; }

/* ===== Category Page ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--rule); }
.breadcrumb-current { color: var(--ink); font-weight: 600; }

.category-page-header {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.category-page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.category-page-header p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.category-page-header .cat-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.cat-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--muted);
}
.cat-meta-item svg { color: var(--accent); width: 16px; height: 16px; }

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.filter-btn {
  padding: 5px 14px;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ===== Product Detail Card (Category Page) ===== */
.product-detail-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-detail-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.product-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.product-detail-img {
  width: 64px;
  height: 64px;
  background: var(--bg2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}
.product-detail-img svg { color: #fff; }
.product-detail-info { flex: 1; min-width: 0; }
.product-detail-code {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.product-detail-name {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.product-detail-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.detail-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 600;
}
.detail-tag-hot { background: #fff3e0; color: var(--orange); }
.detail-tag-new { background: #e8f5e9; color: var(--green); }

.product-detail-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bg2);
}
.btn-sm {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.btn-sm-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm-primary:hover { background: var(--accent-dark); }
.btn-sm-secondary { background: #fff; color: var(--ink); border-color: var(--rule); }
.btn-sm-secondary:hover { background: var(--bg2); }

/* ===== Inquiry Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.modal-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: var(--muted);
}
.modal-close:hover { background: var(--bg3); color: var(--ink); }
.modal-body { padding: 1.25rem; }
.inquiry-product-tag {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.inquiry-product-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.inquiry-product-icon svg { color: #fff; width: 20px; height: 20px; }
.inquiry-product-info { flex: 1; }
.inquiry-product-name { font-weight: 700; font-size: 0.9rem; }
.inquiry-product-cat { font-size: 0.75rem; color: var(--muted); }
.form-group { margin-bottom: 0.875rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-hint { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.modal-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.btn {
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { background: var(--bg2); }

/* Inquiry items list */
.inquiry-items { margin-bottom: 0.875rem; }
.inquiry-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg2);
  border-radius: var(--radius);
  margin-bottom: 5px;
  font-size: 0.82rem;
}
.inquiry-item-code { font-weight: 700; color: var(--accent); flex: 1; }
.inquiry-item-qty {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: center;
  font-size: 0.82rem;
  outline: none;
}
.inquiry-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 3px;
}
.inquiry-item-remove:hover { color: var(--red); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--green);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 2000;
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  animation: toastIn 0.3s ease;
}
.toast.active { display: flex; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Floating Inquiry Button ===== */
.floating-inquiry {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
}
.floating-inquiry-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(211,47,47,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.floating-inquiry-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(211,47,47,0.5);
}
.floating-inquiry-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.floating-inquiry-badge.show { display: flex; }
.floating-inquiry-text {
  display: none;
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: -2px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.5rem 1.25rem;
  margin-top: 2rem;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-brand .logo { font-size: 1.6rem; }
.footer-brand p { font-size: 0.82rem; margin-top: 0.5rem; line-height: 1.6; }
.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 3px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== Section Divider ===== */
.section-divider {
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
}

/* ===== Product Detail Card Link (Category Page) ===== */
.product-detail-card {
  display: flex;
  flex-direction: column;
}
.product-detail-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-detail-link:hover .product-detail-code { color: var(--accent); }
.product-detail-link:hover .product-detail-view { color: var(--accent); }
.product-detail-specs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.spec-chip {
  display: inline-block;
  background: var(--bg2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--rule);
}
.product-detail-view {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  transition: color var(--transition);
  margin-top: auto;
}

/* ===== E-commerce Product Layout ===== */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gallery-main-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid var(--rule);
  object-fit: cover;
  cursor: pointer;
  transition: all 0.2s;
}
.gallery-thumb:hover, .gallery-thumb.active {
  border-color: var(--accent);
}
.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.product-info-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.product-info-cat {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg2);
  padding: 2px 8px;
  border-radius: 12px;
}
.product-info-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.product-info-subtitle {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}
.product-info-desc {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.6;
  margin-top: 0.5rem;
}
.product-info-desc p {
  margin-bottom: 0.5rem;
}
.product-info-quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.quick-spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg2);
  border-radius: 6px;
  font-size: 0.8rem;
}
.quick-spec-label { color: var(--muted); }
.quick-spec-value { font-weight: 600; color: var(--ink); }
.product-info-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}
.btn-lg {
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  .gallery-main { aspect-ratio: 4/3; }
  .product-info-title { font-size: 1.3rem; }
  .product-info-actions { flex-direction: column; }
  .product-info-actions .btn { width: 100%; justify-content: center; }
}

/* ===== Product Detail Page ===== */
.pd-header {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.pd-header-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.pd-header-img {
  width: 72px;
  height: 72px;
  background: var(--bg2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}
.pd-header-img svg { color: var(--accent); opacity: 0.5; }
.pd-header-info { flex: 1; min-width: 0; }
.pd-header-tags { display: flex; gap: 4px; margin-bottom: 4px; }
.pd-header-code {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.pd-header-name {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}
.pd-header-cat {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 6px;
}
.pd-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.pd-desc {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.pd-desc p {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.6;
}

/* Specs Section */
.pd-specs-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.pd-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.pd-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pd-spec-item {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 0.875rem;
  text-align: center;
  border: 1px solid var(--rule);
}
.pd-spec-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.pd-spec-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.pd-material-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.pd-material-table th {
  background: var(--accent-dark);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
}
.pd-material-table th:first-child { border-radius: 6px 0 0 0; }
.pd-material-table th:last-child { border-radius: 0 6px 0 0; }
.pd-material-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
}
.pd-material-table tr:last-child td { border-bottom: none; }
.pd-material-table tr:nth-child(even) td { background: var(--bg2); }
.spec-label-cell { font-weight: 600; color: var(--ink); }
.spec-value-cell { color: var(--muted); }

/* Size Table */
.pd-size-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.pd-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.pd-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 700px;
}
.pd-size-table th {
  background: var(--accent-dark);
  color: #fff;
  padding: 9px 10px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.pd-size-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.pd-size-table tr:last-child td { border-bottom: none; }
.pd-size-table tr:nth-child(even) td { background: var(--bg2); }
.pd-size-table tr:hover td { background: var(--accent-light); }
.size-cell-line { color: var(--muted); text-align: center; width: 40px; }
.size-cell-product { font-weight: 700; color: var(--accent); }
.size-cell-desc { color: var(--muted); }
.size-cell-bore, .size-cell-dg, .size-cell-h, .size-cell-hg { text-align: center; font-variant-numeric: tabular-nums; }
.size-cell-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.btn-xs {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-xs-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-xs-primary:hover { background: var(--accent-dark); }
.btn-xs-secondary {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.btn-xs-secondary:hover { background: var(--accent-light); }

/* Pagination */
.pd-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.pd-page-btn {
  padding: 5px 12px;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.pd-page-btn:hover:not(.disabled):not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.pd-page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pd-page-btn:disabled, .pd-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pd-page-ellipsis {
  color: var(--muted);
  padding: 0 4px;
}
.pd-pagination-info {
  margin-left: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.pd-pagination-info-single {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.5rem 0;
}

/* ===== Category Products Grid (Large Cards) ===== */
.category-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.product-card-large {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card-large:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.product-card-large-img-link {
  display: block;
  text-decoration: none;
}

.product-card-large-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.product-card-large-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-large-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-card-large-code {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}

.product-card-large-code:hover {
  color: var(--accent);
}

.product-card-large-name {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.product-card-large-tags {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.product-card-large-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ===== Category Products Grid (Compact Cards) ===== */
.category-products-grid-compact {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.product-card-compact {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card-compact:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.product-card-compact-img-link {
  display: block;
  text-decoration: none;
}

.product-card-compact-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  display: block;
}

.product-card-compact-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.product-card-compact-code {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}

.product-card-compact-code:hover {
  color: var(--accent);
}

.product-card-compact-name {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.product-card-compact-tags {
  display: flex;
  gap: 4px;
}

.product-card-compact-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .top-nav { padding: 0 1rem; height: 48px; }
  .top-nav-left { gap: 0.8rem; }
  .top-nav-left a { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .logo-bar { padding: 0.5rem 1rem; }
  .logo { font-size: 1.6rem; }
  .search-section { padding: 0.6rem 1rem; }
  .search-category-btn { padding: 0 8px 0 12px; font-size: 0.75rem; height: 38px; }
  .search-input { padding: 8px 6px; font-size: 0.85rem; }
  .search-btn { width: 38px; height: 38px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .category-card { padding: 0.75rem 0.4rem; }
  .category-card-icon { width: 36px; height: 36px; }
  .category-card-icon svg { width: 18px; height: 18px; }
  .banner { padding: 2rem 1rem; min-height: 220px; }
  .banner h2 { font-size: 1.4rem; }
  .banner p { font-size: 0.9rem; }
  .main-content { padding: 1rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 1rem 0.5rem; }
  .stat-number { font-size: 1.3rem; }
  .features { grid-template-columns: 1fr; gap: 0.75rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-card { padding: 0.6rem; }
  .product-detail-card { padding: 0.75rem; }
  .product-detail-top { gap: 0.5rem; }
  .product-detail-img { width: 48px; height: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .floating-inquiry { bottom: 16px; right: 16px; }
  .floating-inquiry-btn { width: 54px; height: 54px; }
  .floating-inquiry-btn svg { width: 24px; height: 24px; }
  /* Product Detail Page */
  .pd-header { flex-direction: column; align-items: flex-start; padding: 1rem; }
  .pd-header-left { width: 100%; }
  .pd-header-img { width: 56px; height: 56px; }
  .pd-header-code { font-size: 1.3rem; }
  .pd-header-actions { width: 100%; flex-direction: column; }
  .pd-header-actions .btn { width: 100%; justify-content: center; }
  .pd-specs-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-spec-item { padding: 0.625rem; }
  .pd-spec-value { font-size: 0.9rem; }
  .pd-size-section { padding: 0.75rem; }
  .pd-table-wrapper { margin-left: -0.75rem; margin-right: -0.75rem; border-radius: 0; border-left: none; border-right: none; }
  .pd-size-table { font-size: 0.78rem; }
  .pd-size-table th, .pd-size-table td { padding: 6px 8px; }
  .pd-pagination { gap: 2px; }
  .pd-page-btn { padding: 4px 8px; font-size: 0.75rem; }
  .pd-pagination-info { width: 100%; text-align: center; margin-left: 0; margin-top: 4px; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .product-detail-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .pd-specs-grid { grid-template-columns: 1fr; }
  .pd-header-img { width: 48px; height: 48px; }
  .pd-header-code { font-size: 1.1rem; }
  .category-products-grid { grid-template-columns: 1fr; gap: 1rem; }
  .product-card-large-img { aspect-ratio: 16/10; }
  .category-products-grid-compact { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-card-compact-body { padding: 0.6rem; }
  .product-card-compact-code { font-size: 0.85rem; }
  .floating-inquiry { bottom: 12px; right: 12px; }
  .floating-inquiry-btn { width: 52px; height: 52px; flex-direction: column; padding: 2px; }
  .floating-inquiry-text { display: block; }
  .floating-inquiry-btn svg { width: 18px; height: 18px; }
}
