/* ========================================
   LOOGYE — Premium Industrial Design System
   ======================================== */

:root {
  --ink: #1a1a1a;
  --ink-light: #4a4a4a;
  --surface: #ffffff;
  --bg: #fafaf9;
  --bg-alt: #f4f4f2;
  --border: #e8e8e4;
  --gold: #c8a45c;
  --gold-dark: #a6843a;
  --blue: #2c5f8a;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.10);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: 2.8rem; line-height: 1.15; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
p { color: var(--ink-light); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }

/* ---- Top Bar ---- */
.top-bar {
  background: var(--ink);
  color: #999;
  font-size: 0.8rem;
  padding: 8px 0;
  letter-spacing: 0.02em;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar .lang-switcher { display: flex; gap: 2px; }
.top-bar .lang-switcher a {
  color: #888;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.78rem;
  transition: all 0.2s;
}
.top-bar .lang-switcher a.active,
.top-bar .lang-switcher a:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ---- Navbar ---- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.navbar .container { display: flex; align-items: center; height: 64px; }
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink) !important;
  margin-right: auto;
}
.navbar-brand span { color: var(--gold); }
.nav-link {
  padding: 0 1.2rem !important;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-light) !important;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-dark) !important; }

.inquiry-nav-link { position: relative; }
.inquiry-count-badge {
  position: absolute; top: -2px; right: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 0.65rem;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ---- Hero Banner ---- */
.hero {
  background: linear-gradient(160deg, #1c1c1c 0%, #2a2a2a 40%, #1a2a38 100%);
  color: #fff;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -5%; top: -20%;
  width: 55%; height: 140%;
  background: radial-gradient(ellipse, rgba(200,164,92,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 { font-weight: 300; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,.55); font-size: 1.1rem; max-width: 520px; font-weight: 300; }
.hero .btn { margin-top: 2rem; }
.hero-tagline {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(200,164,92,.3);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all 0.25s;
}
.btn-primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #333; border-color: #333; color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}
.btn-outline:hover { background: var(--bg-alt); border-color: #ccc; }
.btn-gold {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }

/* ---- Sections ---- */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.section-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--ink-light);
  font-size: 1rem;
  max-width: 500px;
  line-height: 1.7;
}
.section-header { margin-bottom: 3rem; }

/* ---- Category Cards ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.cat-card {
  display: block;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  text-align: center;
}
.cat-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.cat-card .cat-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.6;
}
.cat-card h4 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex; flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #ddd;
}
.product-card-img {
  height: 200px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: #ccc;
}
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-body .cat-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
  margin-bottom: 6px;
}
.product-card-body h5 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-body .specs-preview {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 16px;
  flex: 1;
}
.product-card-body .actions { display: flex; gap: 8px; }

/* ---- Category Filter Pills ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-pill {
  padding: 6px 18px;
  font-size: 0.82rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: #ccc; background: var(--bg-alt); }
.filter-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- Product Detail ---- */
.prod-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.prod-image-lg {
  aspect-ratio: 1;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  color: #ddd;
}
.prod-info .breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 1.5rem;
}
.prod-info .breadcrumb a { color: #999; }
.prod-info .breadcrumb a:hover { color: var(--gold-dark); }
.prod-info .breadcrumb span { margin: 0 8px; }
.prod-info h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.prod-info .specs-block {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}
.prod-info .specs-block .spec-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.prod-info .specs-block .spec-row:last-child { border-bottom: none; }
.prod-info .specs-block .spec-label { color: #999; }
.prod-info .specs-block .spec-value { font-weight: 500; }

/* ---- Related Products ---- */
.related-section { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border); }

/* ---- Inquiry Page ---- */
.inquiry-table { width: 100%; border-collapse: collapse; }
.inquiry-table th {
  text-align: left; padding: 14px 16px;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #999; font-weight: 600; border-bottom: 2px solid var(--border);
}
.inquiry-table td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.inquiry-table .item-thumb {
  width: 56px; height: 56px; background: var(--bg-alt); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #ccc;
}
.inquiry-table .qty-ctrl {
  display: flex; align-items: center; gap: 4px;
}
.inquiry-table .qty-ctrl button {
  width: 28px; height: 28px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 4px; cursor: pointer;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
}
.inquiry-table .qty-ctrl input {
  width: 44px; text-align: center; border: 1px solid var(--border);
  border-radius: 4px; height: 28px; font-size: 0.85rem;
}

.inquiry-form-wrapper {
  max-width: 640px; margin: 60px auto 0;
  padding: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.inquiry-form-wrapper h4 { margin-bottom: 24px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
.form-label { font-size: 0.82rem; font-weight: 500; margin-bottom: 4px; color: var(--ink); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; font-family: var(--font);
  transition: border-color 0.2s; background: var(--bg);
}
.form-control:focus { outline: none; border-color: var(--ink); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  color: #999;
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h5 { color: #fff; font-weight: 500; font-size: 0.95rem; margin-bottom: 16px; }
.footer p, .footer li { font-size: 0.85rem; line-height: 1.8; }
.footer a { color: #999; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; padding: 0; }
.footer hr { border-color: #333; margin: 30px 0 20px; }

/* ---- Toast ---- */
.toast-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 9998;
  backdrop-filter: blur(2px);
}
.toast-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--surface); padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 9999; text-align: center; min-width: 300px;
}
.toast-popup .toast-icon { font-size: 2.5rem; margin-bottom: 12px; }
.toast-popup .toast-msg { margin-bottom: 20px; font-size: 0.95rem; }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 80px 0; }
.empty-state .empty-icon { font-size: 4rem; color: #ddd; margin-bottom: 16px; }
.empty-state p { color: #999; margin-bottom: 24px; }

/* ========================================
   ANIMATIONS
   ======================================== */

/* Page load fade */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Hero staggered animation */
.hero .hero-tagline { animation: fadeInUp 0.6s ease-out both; }
.hero h1            { animation: fadeInUp 0.6s 0.1s ease-out both; }
.hero p             { animation: fadeInUp 0.6s 0.2s ease-out both; }
.hero .btn          { animation: fadeInUp 0.6s 0.3s ease-out both; }

/* Product & category card stagger */
.product-card, .cat-card {
  animation: fadeInUp 0.5s ease-out both;
}
.product-card:nth-child(1), .cat-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2), .cat-card:nth-child(2) { animation-delay: 0.10s; }
.product-card:nth-child(3), .cat-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4), .cat-card:nth-child(4) { animation-delay: 0.20s; }
.product-card:nth-child(5), .cat-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6), .cat-card:nth-child(6) { animation-delay: 0.30s; }
.product-card:nth-child(7), .cat-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8), .cat-card:nth-child(8) { animation-delay: 0.40s; }

/* Section headings */
.section-header { animation: fadeInUp 0.5s ease-out both; }

/* Card hover effects */
.cat-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.10);
  border-color: var(--gold);
}
.cat-card .cat-icon { transition: transform 0.3s ease; }
.cat-card:hover .cat-icon { transform: scale(1.1); }

.product-card {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
}
.product-card-img { transition: transform 0.4s ease; overflow: hidden; }
.product-card:hover .product-card-img { /* subtle zoom placeholder */ }

/* Button hover */
.btn {
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Nav link underline */
.nav-link {
  position: relative;
  transition: color 0.25s;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 1.2rem; right: 1.2rem;
  height: 2px; background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* Specs block appear */
.specs-block { animation: scaleIn 0.4s ease-out both; }

/* Filter pill */
.filter-pill {
  transition: all 0.25s ease;
}
.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Quantity control button */
.qty-ctrl button {
  transition: all 0.15s ease;
}
.qty-ctrl button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Remove button */
.remove-btn {
  transition: all 0.2s ease;
}
.remove-btn:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* Inquiry form */
.inquiry-form-wrapper { animation: fadeInUp 0.5s 0.15s ease-out both; }

/* Toast */
.toast-popup { animation: scaleIn 0.25s ease-out; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Empty state */
.empty-state { animation: fadeIn 0.5s ease-out; }

/* Stats section */
.hero + section [style*="grid-template-columns"] > div {
  animation: fadeInUp 0.5s ease-out both;
}
.hero + section [style*="grid-template-columns"] > div:nth-child(1) { animation-delay: 0.1s; }
.hero + section [style*="grid-template-columns"] > div:nth-child(2) { animation-delay: 0.2s; }
.hero + section [style*="grid-template-columns"] > div:nth-child(3) { animation-delay: 0.3s; }
.hero + section [style*="grid-template-columns"] > div:nth-child(4) { animation-delay: 0.4s; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero { padding: 60px 0; }
  .section { padding: 50px 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .inquiry-table { font-size: 0.85rem; }
  .inquiry-table thead { display: none; }
  .inquiry-table tr { display: block; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
  .inquiry-table td { display: block; text-align: right; padding: 10px 16px; }
  .inquiry-table td::before { content: attr(data-label); float: left; font-weight: 600; color: #999; }
}
