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

:root {
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --primary-light: #fef2f2;
  --primary-border: #fecaca;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -4px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header */
.site-header {
  padding: 14px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-hotline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: var(--transition);
}

.header-hotline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
}

/* Maintenance Hero */
.maintenance-hero {
  padding: 40px 0 24px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.badge-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(0.95); opacity: 1; }
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-main);
  max-width: 760px;
  margin: 0 auto 12px;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 24px;
}

/* Compact Countdown Box */
.countdown-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  max-width: 480px;
  margin: 0 auto 28px;
}

.countdown-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown-segment {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
}

.countdown-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 2px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

/* Operational Status Banner */
.operational-banner {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  text-align: left;
}

.operational-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.operational-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.operational-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 2px;
}

.operational-text p {
  color: #166534;
  font-size: 0.88rem;
}

/* Contact Section */
.contact-section {
  padding: 20px 0 50px;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-tag {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.info-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.card-value {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
  flex-grow: 1;
  line-height: 1.5;
}

.card-link {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-link:hover {
  text-decoration: underline;
}

/* Inquiry Form */
.inquiry-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-control {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* =========================================
   CATALOG PAGE STYLES
   ========================================= */

.catalog-header-bar {
  padding: 28px 0 16px;
}

.catalog-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 12px;
  transition: var(--transition);
}

.catalog-nav-back:hover {
  color: var(--primary);
}

.catalog-hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.catalog-hero-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 650px;
}

/* Filter Toolbar */
.filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 20px 0 24px;
  box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 40px;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.filter-tab.active {
  background: var(--primary);
  color: #ffffff;
}

/* Custom Dropdown Styling */
.custom-dropdown-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  user-select: none;
}

.dropdown-trigger:hover, .dropdown-trigger.open {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 50;
  display: none;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.dropdown-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Results Count Bar */
.results-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-image-box {
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px;
}

.product-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stock-in {
  background: #dcfce7;
  color: #15803d;
}

.stock-order {
  background: #f1f5f9;
  color: #64748b;
}

.brand-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-part-no {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.spec-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.product-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.price-quote {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: all 0.25s ease;
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

.modal-image-header {
  height: 260px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-image-header img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.modal-content-body {
  padding: 24px;
}

.modal-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.modal-specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.modal-specs-table td {
  padding: 8px 10px;
  font-size: 0.88rem;
}

.modal-specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 35%;
}

.modal-specs-table td:last-child {
  color: var(--text-main);
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin: 12px 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-item svg {
  color: var(--success);
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  grid-column: 1 / -1;
}

/* React Aria Components Specific Styles */
.rac-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: racFadeIn 0.2s ease-out;
}

.rac-modal {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: racSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.rac-product-modal {
  max-width: 760px;
}

.rac-dialog {
  padding: 24px;
  outline: none;
  position: relative;
}

.rac-product-modal .rac-dialog {
  padding: 0;
}

.rac-progress-bar {
  display: flex;
  flex-direction: column;
}

.rac-progress-track {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.rac-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #ef4444 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.rac-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rac-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rac-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.rac-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.rac-input:focus,
.rac-input[data-focused] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.rac-error {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}

.rac-popover {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 180px;
  z-index: 500;
  animation: racFadeIn 0.15s ease-out;
}

.rac-popover .dropdown-item {
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.rac-popover .dropdown-item:hover,
.rac-popover .dropdown-item[data-hovered],
.rac-popover .dropdown-item[data-focused] {
  background: var(--primary-light);
  color: var(--primary);
}

.rac-popover .dropdown-item[data-selected] {
  background: var(--primary);
  color: #ffffff;
}

.btn[data-pressed],
.btn:active {
  transform: scale(0.98);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover,
.btn-outline[data-hovered] {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

@keyframes racFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes racSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
  .operational-banner {
    flex-direction: column;
    text-align: center;
  }
  .operational-left {
    flex-direction: column;
  }
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
}

