﻿

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600&display=swap');

:root {
  
  --primary:            #00512b;
  --primary-container:  #0f6b3d;
  --on-primary:         #ffffff;
  --primary-light:      #a0f5ba;
  --primary-dim:        #85d8a0;

  --secondary:          #785900;
  --secondary-container:#fcc019;
  --on-secondary:       #ffffff;
  --secondary-light:    #ffdf9d;

  --tertiary:           #004686;
  --tertiary-container: #1d5ea7;
  --on-tertiary:        #ffffff;
  --tertiary-light:     #c2d8ff;

  --error:              #ba1a1a;
  --error-container:    #ffdad6;
  --on-error:           #ffffff;

--surface:            #fcf9f8;
  --surface-dim:        #dcd9d9;
  --surface-low:        #f6f3f2;
  --surface-container:  #f0eded;
  --surface-high:       #eae7e7;
  --surface-highest:    #e5e2e1;
  --surface-white:      #ffffff;

--on-surface:         #1c1b1b;
  --on-surface-muted:   #3f4941;
  --outline:            #6f7a70;
  --outline-light:      #bfc9be;

--inverse-surface:    #313030;
  --inverse-on-surface: #f3f0ef;

--font-display:       'Work Sans', sans-serif;
  --font-body:          'Inter', sans-serif;
  --font-accent:        'Plus Jakarta Sans', sans-serif;

--sp-xs:  4px;
  --sp-sm:  12px;
  --sp-md:  24px;
  --sp-lg:  40px;
  --sp-xl:  64px;
  --gutter: 16px;
  --margin: 20px;

--r-sm:   2px;
  --r-md:   4px;
  --r-lg:   8px;
  --r-xl:   12px;
  --r-full: 9999px;

--shadow-card:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-float:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-modal:  0 20px 60px rgba(0,0,0,0.15);

--transition:    all 0.18s ease;
  --transition-slow: all 0.32s ease;

--sidebar-w:     260px;
  --topbar-h:      64px;
  --content-max:   1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

.display-lg  { font-family: var(--font-display); font-size: clamp(28px,5vw,40px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.headline-md { font-family: var(--font-display); font-size: clamp(18px,3vw,24px); font-weight: 600; line-height: 1.35; }
.headline-sm { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.4; }
.body-base   { font-family: var(--font-body);    font-size: 16px; font-weight: 400; line-height: 1.6; }
.body-sm     { font-family: var(--font-body);    font-size: 14px; font-weight: 400; line-height: 1.5; }
.label-accent{ font-family: var(--font-accent);  font-size: 12px; font-weight: 600; line-height: 1.35; letter-spacing: 0.02em; }
.price-tag   { font-family: var(--font-display); font-weight: 700; color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r-md); font-weight: 600;
  font-size: 14px; border: 2px solid transparent; cursor: pointer;
  transition: var(--transition); white-space: nowrap; line-height: 1;
  font-family: var(--font-body);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-container); border-color: var(--primary-container); transform: translateY(-1px); box-shadow: var(--shadow-float); }

.btn-secondary { background: transparent; color: var(--on-surface); border-color: var(--outline-light); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }

.btn-gold { background: var(--secondary-container); color: var(--secondary); border-color: var(--secondary-container); }
.btn-gold:hover:not(:disabled) { background: #f9bd14; transform: translateY(-1px); }

.btn-blue { background: var(--tertiary-container); color: var(--on-tertiary); border-color: var(--tertiary-container); }
.btn-blue:hover:not(:disabled) { background: var(--tertiary); }

.btn-danger { background: var(--error); color: var(--on-error); border-color: var(--error); }
.btn-danger:hover:not(:disabled) { background: #9b1414; }

.btn-ghost { background: transparent; color: var(--on-surface-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-high); color: var(--on-surface); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 10px; gap: 0; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 500; color: var(--on-surface); font-family: var(--font-body); }
.form-label.required::after { content: ' *'; color: var(--error); }

.form-control {
  width: 100%; padding: 10px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--outline-light); background: var(--surface-white);
  color: var(--on-surface); font-size: 15px; transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,81,43,0.1); }
.form-control::placeholder { color: var(--outline); }
.form-control.is-invalid { border-color: var(--error); }
.form-hint { font-size: 12px; color: var(--outline); }
.form-error { font-size: 12px; color: var(--error); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.card {
  background: var(--surface-white); border-radius: var(--r-lg);
  border: 1px solid var(--surface-high); padding: var(--sp-md);
  box-shadow: var(--shadow-card);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-md); padding-bottom: var(--sp-sm); border-bottom: 1px solid var(--surface-high); }
.card-title  { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.card-body   { }
.card-footer { margin-top: var(--sp-md); padding-top: var(--sp-sm); border-top: 1px solid var(--surface-high); }

.product-card {
  background: var(--surface-white); border-radius: var(--r-lg);
  border: 1px solid var(--surface-high); overflow: hidden;
  box-shadow: var(--shadow-card); transition: var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); border-color: var(--outline-light); }
.product-card__image { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface-container); }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition-slow); }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: var(--r-full); font-family: var(--font-accent); font-size: 11px; font-weight: 600; }
.badge-auction  { background: var(--secondary-container); color: var(--secondary); }
.badge-new      { background: var(--primary-light); color: var(--primary); }
.badge-verified { background: var(--tertiary-light); color: var(--tertiary); }
.badge-negotiable { background: var(--surface-highest); color: var(--on-surface-muted); }
.product-card__save { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: var(--r-full); background: rgba(255,255,255,0.9); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--outline); transition: var(--transition); }
.product-card__save:hover, .product-card__save.saved { color: var(--error); }
.product-card__body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card__price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--primary); }
.product-card__title { font-size: 14px; font-weight: 500; color: var(--on-surface); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta  { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--outline); margin-top: auto; padding-top: 6px; }
.product-card__meta svg { width: 12px; height: 12px; flex-shrink: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-family: var(--font-accent); font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.chip-green  { background: rgba(0,81,43,0.08);  border-color: rgba(0,81,43,0.2);  color: var(--primary); }
.chip-gold   { background: rgba(120,89,0,0.08); border-color: rgba(120,89,0,0.2); color: var(--secondary); }
.chip-blue   { background: rgba(0,70,134,0.08); border-color: rgba(0,70,134,0.2); color: var(--tertiary); }
.chip-red    { background: rgba(186,26,26,0.08);border-color: rgba(186,26,26,0.2);color: var(--error); }
.chip-grey   { background: var(--surface-container); border-color: var(--outline-light); color: var(--on-surface-muted); }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--surface-low); color: var(--on-surface-muted);
  font-family: var(--font-accent); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--surface-high);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--surface-container); vertical-align: middle; color: var(--on-surface); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--surface-low); }
.data-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--surface-high); box-shadow: var(--shadow-card); }

.alert { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-lg); font-size: 14px; border: 1px solid transparent; }
.alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.alert-success { background: rgba(0,81,43,0.06);  border-color: rgba(0,81,43,0.2);  color: var(--primary); }
.alert-warning { background: rgba(120,89,0,0.06); border-color: rgba(120,89,0,0.2); color: var(--secondary); }
.alert-danger  { background: rgba(186,26,26,0.06);border-color: rgba(186,26,26,0.2);color: var(--error); }
.alert-info    { background: rgba(0,70,134,0.06); border-color: rgba(0,70,134,0.2); color: var(--tertiary); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: var(--gutter); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-backdrop.active { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface-white); border-radius: var(--r-xl); width: 100%; max-width: 520px; box-shadow: var(--shadow-modal); transform: translateY(12px) scale(0.98); transition: transform 0.2s; }
.modal-backdrop.active .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-md); border-bottom: 1px solid var(--surface-high); }
.modal-title  { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.modal-close  { width: 32px; height: 32px; border: none; background: var(--surface-container); border-radius: var(--r-md); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--on-surface-muted); transition: var(--transition); }
.modal-close:hover { background: var(--surface-high); color: var(--on-surface); }
.modal-body   { padding: var(--sp-md); }
.modal-footer { padding: var(--sp-md); border-top: 1px solid var(--surface-high); display: flex; gap: 10px; justify-content: flex-end; }

.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn { width: 36px; height: 36px; border: 1.5px solid var(--outline-light); border-radius: var(--r-md); background: var(--surface-white); color: var(--on-surface); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.page-btn:hover   { border-color: var(--primary); color: var(--primary); }
.page-btn.active  { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.page-btn:disabled{ opacity: 0.4; cursor: not-allowed; }

.stars { display: inline-flex; gap: 2px; }
.stars span { color: var(--secondary-container); font-size: 14px; }
.stars span.empty { color: var(--outline-light); }

.verified-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-accent); font-size: 11px; font-weight: 600; color: var(--secondary); background: rgba(252,192,25,0.12); padding: 2px 8px; border-radius: var(--r-full); border: 1px solid rgba(252,192,25,0.3); }

.skeleton { background: linear-gradient(90deg, var(--surface-high) 25%, var(--surface-container) 50%, var(--surface-high) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-xs { gap: var(--sp-xs); } .gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); } .gap-lg { gap: var(--sp-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-md); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--on-surface-muted); }
.text-primary{ color: var(--primary); }
.text-gold   { color: var(--secondary); }
.text-error  { color: var(--error); }
.text-sm     { font-size: 14px; }
.text-xs     { font-size: 12px; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-sm  { margin-top: var(--sp-sm); } .mt-md  { margin-top: var(--sp-md); } .mt-lg  { margin-top: var(--sp-lg); }
.mb-sm  { margin-bottom: var(--sp-sm); } .mb-md  { margin-bottom: var(--sp-md); }
.p-sm   { padding: var(--sp-sm); } .p-md { padding: var(--sp-md); }
.rounded-full { border-radius: var(--r-full); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-auto { grid-template-columns: repeat(2, 1fr); }
}

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-low); }
::-webkit-scrollbar-thumb { background: var(--outline-light); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

::selection { background: var(--primary-light); color: var(--primary); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
