/* ==========================================================================
   UnyBee Marketplace  global.css
   Identidade visual, reset, tipografia, utilitrios e breakpoints
   ========================================================================== */

:root {
  /* Cores da marca */
  --brand-navy:        #004F73;
  --brand-navy-dark:   #003755;
  --brand-navy-light:  #0a6a96;
  --brand-gold:        #F4B301;
  --brand-gold-light:  #FFD35C;
  --brand-gold-dark:   #d99a00;

  /* Neutros */
  --white:        #ffffff;
  --bg:           #ebebeb;
  --bg-soft:      #f5f5f5;
  --surface:      #ffffff;
  --border:       #e5e5e5;
  --border-strong:#cfcfcf;
  --text:         #1a1a1a;
  --text-muted:   #555555;
  --text-light:   #888888;

  /* Estado */
  --success:      #16a34a;
  --danger:       #dc2626;
  --warning:      #f59e0b;
  --info:         #0ea5e9;

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 14px;
  --fs-md:   16px;
  --fs-lg:   18px;
  --fs-xl:   22px;
  --fs-2xl:  28px;
  --fs-3xl:  34px;

  /* Espaamento */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;

  /* Radius */
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;
  --r-xl: 12px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 2px 6px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.15);

  /* z-index */
  --z-header: 100;
  --z-dropdown: 200;
  --z-overlay: 900;
  --z-drawer: 950;
  --z-modal: 1000;

  /* Layout */
  --container: 1240px;
  --header-h: 110px;
}

/* Reset */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--brand-navy); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

h1,h2,h3,h4,h5,h6 { font-weight: 800; line-height: 1.25; color: var(--brand-navy); }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
h4 { font-size: var(--fs-base); }

h5 { font-size: var(--fs-sm); }
h6 { font-size: var(--fs-xs); }

/* Container & grid */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }

.grid {
  display: grid;
}

.grid-1 {
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
}

.grid-span-all {
  grid-column: 1 / -1;
}

@media (max-width: 991px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.grid > .panel {
  margin: 0;
}

.row { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.col { flex: 1; min-width: 0; }

/* Botes */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-base);
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-gold);
  color: #1a1a1a;
}
.btn-primary:hover { background: var(--brand-gold-dark); }
.btn-secondary {
  background: var(--brand-navy);
  color: var(--white);
}
.btn-secondary:hover { background: var(--brand-navy-dark); }
.btn-outline {
  background: transparent;
  color: var(--brand-navy);
  border-color: var(--brand-navy);
}
.btn-outline:hover { background: var(--brand-navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-sm); }
.btn-lg { padding: 14px 24px; font-size: var(--fs-md); }

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-muted);
}
.badge-gold   { background: var(--brand-gold); color: #1a1a1a; }
.badge-green  { background: #dcfce7; color: var(--success); }
.badge-red    { background: #fee2e2; color: var(--danger); }
.badge-navy   { background: var(--brand-navy); color: var(--white); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--sp-5); }

/* Erros 4xx/5xx */
.error-page {
  padding: var(--sp-8) 0;
}

.error-page-card {
  background: var(--white);
}

.error-page-eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: var(--fs-xs);
  color: var(--brand-navy);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.error-page-actions {
  margin-top: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .error-page-actions {
    flex-direction: column;
  }
  .error-page-actions .btn {
    width: 100%;
  }
}

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: var(--fs-base);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(0,79,115,.12);
}
.textarea { min-height: 100px; resize: vertical; }

/* Utilitrios */
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }

.pre-wrap { white-space: pre-wrap; margin: 0; }

.simple-list {
  display: grid;
  gap: var(--sp-2);
  color: var(--text-muted);
}

.simple-list li {
  position: relative;
  padding-left: 16px;
}

.simple-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand-gold);
}

.mt-1{margin-top:var(--sp-1)} .mt-2{margin-top:var(--sp-2)} .mt-3{margin-top:var(--sp-3)} .mt-4{margin-top:var(--sp-4)} .mt-5{margin-top:var(--sp-5)} .mt-6{margin-top:var(--sp-6)} .mt-7{margin-top:var(--sp-7)} .mt-8{margin-top:var(--sp-8)}
.mb-1{margin-bottom:var(--sp-1)} .mb-2{margin-bottom:var(--sp-2)} .mb-3{margin-bottom:var(--sp-3)} .mb-4{margin-bottom:var(--sp-4)} .mb-5{margin-bottom:var(--sp-5)} .mb-6{margin-bottom:var(--sp-6)} .mb-7{margin-bottom:var(--sp-7)} .mb-8{margin-bottom:var(--sp-8)}
.flex{display:flex} .items-center{align-items:center} .justify-between{justify-content:space-between} .justify-center{justify-content:center} .gap-1{gap:var(--sp-1)} .gap-2{gap:var(--sp-2)} .gap-3{gap:var(--sp-3)} .gap-4{gap:var(--sp-4)}
.hidden { display: none !important; }

/* Star rating (simples) */
.stars { color: var(--brand-gold); letter-spacing: 1px; font-size: var(--fs-sm); }

/* ==========================================================================
   Breakpoints solicitados
   ========================================================================== */

/* 320px  mobile pequeno */
@media (max-width: 320px) {
  :root { --fs-base: 13px; --fs-2xl: 22px; --fs-3xl: 26px; }
  .container { padding: 0 var(--sp-3); }
  .btn { padding: 9px 14px; font-size: var(--fs-sm); }
}

/* 321576px  mobile */
@media (min-width: 321px) and (max-width: 576px) {
  .container { padding: 0 var(--sp-3); }
  h1 { font-size: 20px; } h2 { font-size: 18px; }
}

/* 577767px  mobile/tablet mdio */
@media (min-width: 577px) and (max-width: 767px) {
  .container { padding: 0 var(--sp-4); }
}

/* 768991px  tablet */
@media (min-width: 768px) and (max-width: 991px) {
  .container { max-width: 960px; }
}

/* 9921199px  desktop pequeno */
@media (min-width: 992px) and (max-width: 1199px) {
  .container { max-width: 1140px; }
}

/* 1200px  desktop grande */
@media (min-width: 1200px) {
  .container { max-width: var(--container); }
}

/* ==========================================================================
   Modal universal (admin e site)
   ========================================================================== */
.uny-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.uny-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.uny-modal {
  position: fixed;
  z-index: var(--z-modal);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.uny-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.uny-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .9);
}

.uny-modal-title {
  font-size: var(--fs-lg);
  margin: 0;
  color: var(--brand-navy);
}

.uny-modal-close {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.uny-modal-close:hover {
  background: var(--bg-soft);
}

.uny-modal-body {
  padding: var(--sp-4);
  color: var(--text);
}

.uny-modal-foot {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.hero-slide {
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.text-sm {
  font-size: 13px;
}

.flex-wrap-center {
  align-items: center;
  flex-wrap: wrap;
}

.cat-quick strong {
  font-size: 13px;
}

.search-hint-card {
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.search-form-relative {
  position: relative;
}

.search-autocomplete-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.search-autocomplete-dropdown.is-open {
  display: block;
}

.search-autocomplete-hint {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(59, 130, 246, 0.05);
}

.search-autocomplete-hint a {
  margin-left: 6px;
}

.search-autocomplete-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: inherit;
  text-decoration: none;
}

.search-autocomplete-item-title {
  font-weight: 600;
}

.search-autocomplete-item-meta {
  color: #64748b;
}

.search-attribute-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.search-attribute-grid {
  display: grid;
  gap: 12px;
}

.search-sort-row {
  gap: 8px;
  align-items: center;
}

.checkout-success-card {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.category-soft-card {
  background: var(--bg-soft);
}

.product-shipping-title {
  display: block;
  margin-bottom: 6px;
}

.product-description-list {
  padding-left: 20px;
  list-style: disc;
}

.rating-bar-fill {
  width: var(--rating-fill, 0%);
}

.off-badge--stacked {
  top: var(--badge-top, 12px);
  left: 12px;
  right: auto;
}

.off-badge--campaign {
  background: rgba(15, 23, 42, 0.9);
}

.off-badge--sponsored {
  background: rgba(220, 38, 38, 0.92);
}

.off-badge-detail {
  display: block;
  opacity: 0.75;
}

.seller-tier-row {
  align-items: center;
  flex-wrap: wrap;
}
