/* ==========================================================================
   UnyBee Marketplace - main.css
   Componentes e páginas
   ========================================================================== */

/* ----------- HEADER ----------- */
.site-header { background: linear-gradient(180deg, var(--brand-navy-dark), var(--brand-navy)); color: var(--white); position: relative; z-index: var(--z-header); box-shadow: var(--shadow); }
.topbar { font-size: var(--fs-xs); border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--brand-gold-light); text-decoration: none; }
.topbar .links { display: flex; gap: var(--sp-5); }

.header-main { padding: var(--sp-4) 0; }
.header-main .container { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--sp-5); align-items: center; }
.header-logo img { height: 36px; }
.header-search { position: relative; display: flex; background: var(--white); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.header-search select { border: 0; background: var(--bg-soft); padding: 0 12px; border-right: 1px solid var(--border); color: var(--text-muted); max-width: 160px; }
.header-search input { flex: 1; border: 0; padding: 12px 14px; font-size: var(--fs-base); color: var(--text); }
.header-search input:focus { outline: none; }
.header-search button { background: var(--brand-gold); color: #1a1a1a; padding: 0 20px; font-weight: 600; }
.header-search button:hover { background: var(--brand-gold-dark); }
.header-cep { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.9); font-size: var(--fs-sm); }
.header-cep small { display: block; opacity: .7; font-size: 11px; }
.header-cart { position: relative; display: flex; align-items: center; gap: 8px; color: var(--white); padding: 8px 12px; border-radius: var(--r-md); }
.header-cart:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.header-cart-icon { font-size: 22px; line-height: 1; }
.header-cart .count { position: absolute; top: -2px; right: -2px; background: var(--brand-gold); color: #1a1a1a; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 100px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.nav-bar { background: var(--brand-navy-dark); }
.nav-bar .container { display: flex; align-items: center; gap: var(--sp-4); height: 42px; overflow-x: auto; }
.nav-bar a { color: rgba(255,255,255,.9); font-size: var(--fs-sm); font-weight: 500; padding: 6px 10px; border-radius: var(--r-sm); white-space: nowrap; }
.nav-bar a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav-bar a.has-menu::after { content: ' ▾'; font-size: 10px; opacity: .7; }

@media (max-width: 991px) {
  .header-main .container { grid-template-columns: auto 1fr auto; }
  .header-cep { display: none; }
}
@media (max-width: 576px) {
  .header-main .container { grid-template-columns: 1fr; gap: var(--sp-3); }
  .header-logo { display: flex; justify-content: space-between; align-items: center; }
  .header-search select { display: none; }
  .topbar .links a:not(:last-child) { display: none; }
}

/* ----------- FOOTER ----------- */
.site-footer { background: #1a1a1a; color: #cfcfcf; margin-top: var(--sp-8); padding: var(--sp-7) 0 var(--sp-4); font-size: var(--fs-sm); }
.site-footer h5 { color: var(--white); margin-bottom: var(--sp-3); font-size: var(--fs-base); }
.site-footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.site-footer ul li { margin-bottom: 6px; }
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: var(--brand-gold-light); }
.site-footer .pay-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--sp-2); }
.pay-chip { background: #2a2a2a; padding: 6px 10px; border-radius: var(--r-sm); font-size: 11px; color: #fff; }
.footer-bottom { border-top: 1px solid #333; margin-top: var(--sp-6); padding-top: var(--sp-4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); color: #888; }

@media (max-width: 991px) { .site-footer .cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ----------- LAYOUT COM SIDEBAR DE ANÚNCIOS ----------- */
.page-layout { display: grid; grid-template-columns: 1fr 280px; gap: var(--sp-5); margin: var(--sp-5) 0; }
.page-layout-left { display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-5); margin: var(--sp-5) 0; }
.page-layout-3 { display: grid; grid-template-columns: 240px 1fr 280px; gap: var(--sp-5); margin: var(--sp-5) 0; }

@media (max-width: 1199px) {
  .page-layout-3 { grid-template-columns: 220px 1fr; }
  .page-layout-3 .ads-col { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .page-layout, .page-layout-left, .page-layout-3 { grid-template-columns: 1fr; }
  .page-layout-3 .ads-col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .page-layout-3 .ads-col { grid-template-columns: 1fr; }
}

/* Coluna de anúncios */
.ads-col { display: flex; flex-direction: column; gap: var(--sp-4); }
.ad-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.ad-card .ad-label { background: var(--bg-soft); padding: 6px 10px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
.ad-card img { width: 100%; height: 180px; object-fit: cover; }
.ad-card .ad-body { padding: var(--sp-3); }
.ad-card .ad-body h4 { font-size: var(--fs-base); margin-bottom: 4px; }
.ad-card .ad-body .price { color: var(--success); font-weight: 700; font-size: var(--fs-md); }

/* ----------- BANNER CARROSSEL ----------- */
.hero { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--bg-soft); }
.hero-track { display: flex; height: 100%; transition: transform .5s ease; }
.hero-slide { flex: 0 0 100%; height: 100%; min-height: 0; position: relative; display: flex; align-items: center; padding: var(--sp-7); color: var(--white); background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-slide::before { content: ''; position: absolute; inset: 0; background: none; }
.hero-slide-content { position: relative; max-width: 460px; }

.hero-slide--no-content {
  padding: 0;
}
.hero-slide-content .eyebrow { display: inline-block; background: var(--brand-gold); color: #1a1a1a; padding: 4px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; margin-bottom: var(--sp-3); text-transform: uppercase; }
.hero-slide-content h2 { color: var(--white); font-size: 32px; margin-bottom: var(--sp-3); }
.hero-slide-content p { opacity: .9; margin-bottom: var(--sp-4); }
.hero-arrow { display: none; }
.hero-dots { display: none; }

@media (max-width: 767px) {
  .hero-slide { padding: var(--sp-5); background-position: center center; }
  .hero-slide-content h2 { font-size: 22px; }
}

/* ----------- CATEGORIAS QUICK ----------- */
.cat-quick { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--sp-3); margin: var(--sp-5) 0; }
.cat-quick a { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); text-align: center; color: var(--text); transition: border-color .15s, transform .15s; }
.cat-quick a:hover { border-color: var(--brand-navy); text-decoration: none; transform: translateY(-2px); }
.cat-quick .cat-icon { width: 44px; height: 44px; margin: 0 auto 6px; background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-light)); border-radius: 100px; display: flex; align-items: center; justify-content: center; color: var(--brand-gold); font-weight: 700; }
.cat-quick small { display: block; font-size: var(--fs-xs); color: var(--text-muted); }

@media (max-width: 1199px) { .cat-quick { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 767px) { .cat-quick { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 320px) { .cat-quick { grid-template-columns: repeat(3, 1fr); } }

/* ----------- SECTION HEADERS ----------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 2px solid var(--brand-navy); }
.section-head h2 { font-size: var(--fs-xl); }
.section-head a { font-size: var(--fs-sm); color: var(--brand-navy); font-weight: 600; }

.promo-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
  color: var(--brand-navy);
}

/* ----------- PRODUCT GRID ----------- */
.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
@media (max-width: 1199px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 320px) { .product-grid { grid-template-columns: 1fr; } }

.store-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.product-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.product-card a { color: var(--text); text-decoration: none; }
.product-card .img { position: relative; aspect-ratio: 1/1; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .off-badge { position: absolute; top: 8px; left: 8px; background: var(--success); color: #fff; padding: 3px 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 700; }
.product-card .fav { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 100px; background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.product-card .body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .title { font-size: var(--fs-sm); color: var(--text); line-height: 1.35; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .price-old { font-size: var(--fs-xs); color: var(--text-light); text-decoration: line-through; }
.product-card .price { font-size: var(--fs-lg); font-weight: 700; color: var(--text); }
.product-card .install { font-size: var(--fs-xs); color: var(--success); font-weight: 600; }
.product-card .ship { font-size: var(--fs-xs); color: var(--success); font-weight: 600; margin-top: auto; }
.product-card .seller { font-size: var(--fs-xs); color: var(--text-muted); }

/* ----------- LOJA PUBLICA DO SELLER (SLUG) ----------- */
.seller-store-hero {
  position: relative;
  overflow: hidden;
  --seller-accent: var(--brand-navy-dark);
  --seller-highlight: var(--brand-gold);
  --seller-highlight-text: var(--white);
  --seller-banner-url: none;
  background: linear-gradient(135deg, var(--seller-accent) 0%, #111827 55%, var(--seller-highlight) 160%);
  color: var(--seller-highlight-text);
}

.seller-store-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--seller-banner-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .18;
  pointer-events: none;
}

.seller-store-hero > * {
  position: relative;
  z-index: 1;
}

.seller-store-hero__grid {
  align-items: center;
}

.seller-store-hero__eyebrow {
  color: rgba(255,255,255,.78);
}

.seller-store-hero__title {
  margin: 0;
}

.seller-store-hero__reputation {
  color: rgba(255,255,255,.82);
}

.seller-store-soft-badge {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.seller-store-backlink {
  border-color: rgba(255,255,255,.35) !important;
  color: #fff;
}

.seller-store-brand {
  max-width: 320px;
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  padding: var(--sp-4);
  border-radius: var(--r-md);
}

.seller-store-brand__logo {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  padding: 12px;
}

.seller-store-brand__body {
  text-align: center;
}

.seller-store-brand__description {
  color: rgba(255,255,255,.84);
  text-align: left;
}

.seller-store-filters {
  background: var(--white);
}

.seller-store-filters__form .grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--sp-4);
  align-items: end;
}

.seller-store-filters__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.seller-store-filters select,
.seller-store-filters input[type="text"] {
  width: 100%;
}

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

  .seller-store-filters__actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 576px) {
  .seller-store-filters__form .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ----------- CARRINHO LATERAL (DRAWER) ----------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: var(--z-overlay); opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 100%; background: var(--white); z-index: var(--z-drawer); box-shadow: -10px 0 30px rgba(0,0,0,.2); transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: translateX(0); }
.cart-head { padding: var(--sp-4); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--brand-navy); color: var(--white); }
.cart-head h3 { color: var(--white); font-size: var(--fs-lg); }
.cart-close { color: var(--white); font-size: 24px; padding: 4px 10px; border-radius: var(--r-sm); }
.cart-close:hover { background: rgba(255,255,255,.1); }
.cart-body { flex: 1; overflow-y: auto; padding: var(--sp-3); }
.cart-item { display: grid; grid-template-columns: 70px 1fr auto; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }
.cart-item .info h5 { font-size: var(--fs-sm); margin-bottom: 2px; }
.cart-item .info small { color: var(--text-muted); font-size: var(--fs-xs); display: block; margin-bottom: 4px; }
.qty { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); }
.qty button { width: 26px; height: 26px; }
.qty button:hover { background: var(--bg-soft); }
.qty span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; font-size: var(--fs-sm); font-weight: 600; }
.cart-item .right { text-align: right; }
.cart-item .right .price { font-weight: 700; color: var(--text); }
.cart-item .remove { color: var(--danger); font-size: var(--fs-xs); margin-top: 6px; }
.cart-foot { border-top: 1px solid var(--border); padding: var(--sp-4); background: var(--bg-soft); }
.cart-foot .row-line { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: var(--fs-sm); }
.cart-foot .row-line.total { font-size: var(--fs-lg); font-weight: 700; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px dashed var(--border-strong); }

/* ----------- FILTROS LATERAIS ----------- */
.filters { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.filters h4 { font-size: var(--fs-base); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.filter-group { padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h5 { font-size: var(--fs-sm); margin-bottom: var(--sp-2); display: flex; justify-content: space-between; cursor: pointer; }
.filter-group h5::after { content: '−'; color: var(--text-muted); }
.filter-group.collapsed h5::after { content: '+'; }
.filter-group.collapsed .filter-body { display: none; }
.filter-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.filter-list label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; }
.filter-list label:hover { color: var(--text); }
.filter-list input { accent-color: var(--brand-navy); }

.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 100px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--brand-navy); }

.price-range { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.price-range input { width: 100%; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); font-size: var(--fs-sm); }

.cat-tree li { font-size: var(--fs-sm); padding: 4px 0; }
.cat-tree li a { color: var(--text-muted); }
.cat-tree li a:hover { color: var(--brand-navy); }
.cat-tree li ul { padding-left: var(--sp-4); margin-top: 4px; }

/* ----------- LISTING TOOLBAR ----------- */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.list-toolbar .results { color: var(--text-muted); font-size: var(--fs-sm); }
.list-toolbar select { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); }

.crumbs { display: flex; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.crumbs a { color: var(--text-muted); }
.crumbs span:not(:last-child)::after { content: ' / '; color: var(--text-light); }

/* ----------- PAGINACAO ----------- */
.pagination-nav { display: flex; justify-content: center; margin-top: var(--sp-6); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pagination-item a,
.pagination-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: var(--fs-sm);
  text-decoration: none;
  background: var(--white);
}
.pagination-item a:hover { background: var(--bg-soft); text-decoration: none; }
.pagination-item-active span {
  background: var(--brand-navy);
  color: var(--white);
  border-color: var(--brand-navy);
}
.pagination-item-disabled span,
.pagination-item-ellipsis span {
  color: var(--text-muted);
  background: var(--bg-soft);
}

/* ----------- PAGINA DE PRODUTO ----------- */
.product-detail { display: grid; grid-template-columns: 80px 1fr 380px; gap: var(--sp-5); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5); }
.gallery-thumbs { display: flex; flex-direction: column; gap: 8px; }
.gallery-thumbs img { width: 70px; height: 70px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--brand-navy); }
.gallery-main { display: flex; align-items: center; justify-content: center; background: var(--bg-soft); border-radius: var(--r-md); }
.gallery-main img { max-height: 460px; object-fit: contain; }
.product-info h1 { font-size: var(--fs-xl); margin-bottom: 6px; }
.product-info .meta { display: flex; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-3); }
.product-info .eyebrow { display: inline-flex; margin-bottom: var(--sp-3); }
.product-info .price-old { font-size: var(--fs-sm); color: var(--text-light); text-decoration: line-through; }
.product-info .price-now { font-size: 36px; font-weight: 300; color: var(--text); display: flex; align-items: center; gap: var(--sp-3); }
.product-info .price-now .off { font-size: var(--fs-md); color: var(--success); font-weight: 600; }
.product-info .install { color: var(--success); font-weight: 600; margin-bottom: var(--sp-3); }
.product-info .colors { margin: var(--sp-3) 0; }
.product-info .qty-row { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; }
.product-info .stock { color: var(--text-muted); font-size: var(--fs-sm); }
.product-info .actions { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.product-info .ship-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); margin-top: var(--sp-4); }
.product-info .ship-box small { color: var(--text-muted); font-size: var(--fs-xs); }
.seller-box { padding: var(--sp-3); background: var(--bg-soft); border-radius: var(--r-md); margin-top: var(--sp-3); }
.seller-box .name { font-weight: 600; margin-bottom: 4px; }

.rating-summary { display: grid; grid-template-columns: 180px 1fr; gap: var(--sp-5); align-items: center; margin-bottom: var(--sp-5); }
.rating-score { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); text-align: center; }
.rating-score-value { font-size: 42px; line-height: 1; font-weight: 800; color: var(--brand-navy); margin-bottom: 6px; }
.rating-score .stars { color: var(--brand-gold); letter-spacing: 2px; font-size: 18px; margin-bottom: 4px; }
.rating-bars { display: flex; flex-direction: column; gap: 10px; }
.rating-bar-row { display: grid; grid-template-columns: 30px 1fr 36px; gap: 10px; align-items: center; font-size: var(--fs-xs); color: var(--text-muted); }
.rating-bar-track { height: 8px; background: var(--bg-soft); border-radius: 100px; overflow: hidden; border: 1px solid var(--border); }
.rating-bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-dark)); border-radius: inherit; }
.review-list { display: grid; gap: var(--sp-3); }

.tabs { margin-top: var(--sp-6); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); }
.tabs-head { display: flex; border-bottom: 1px solid var(--border); }
.tabs-head button { padding: var(--sp-3) var(--sp-4); font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tabs-head button.active { color: var(--brand-navy); border-bottom-color: var(--brand-navy); }
.tabs-body { padding: var(--sp-5); }
.tabs-body .tab-pane { display: none; }
.tabs-body .tab-pane.active { display: block; }

@media (max-width: 991px) {
  .product-detail { grid-template-columns: 70px 1fr; }
  .product-detail .product-info { grid-column: 1 / -1; }
  .rating-summary { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  .product-detail { grid-template-columns: 1fr; padding: var(--sp-3); }
  .gallery-thumbs { flex-direction: row; overflow-x: auto; }
  .product-info .price-now { font-size: 30px; }
  .rating-score-value { font-size: 36px; }
}

/* ----------- AUTH (LOGIN/CADASTRO) ----------- */
.auth-wrap { max-width: 460px; margin: var(--sp-7) auto; }
.auth-wrap--wide { max-width: 520px; }
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-7); box-shadow: var(--shadow); }
.auth-card .auth-logo { text-align: center; margin-bottom: var(--sp-5); }
.auth-card .auth-logo img { height: 38px; margin: 0 auto; }
.auth-card h1 { font-size: var(--fs-xl); text-align: center; margin-bottom: var(--sp-2); }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: var(--sp-5); font-size: var(--fs-sm); }
.auth-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.auth-meta a { font-weight: 600; }
.auth-divider { text-align: center; margin: var(--sp-4) 0; color: var(--text-light); position: relative; font-size: var(--fs-xs); }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 30px); height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-foot { text-align: center; margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--text-muted); }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); background: var(--bg-soft); border-radius: var(--r-md); padding: 4px; margin-bottom: var(--sp-5); }
.role-toggle button { padding: 10px; border-radius: var(--r-sm); font-weight: 600; color: var(--text-muted); }
.role-toggle button.active { background: var(--white); color: var(--brand-navy); box-shadow: var(--shadow-sm); }

@media (max-width: 576px) {
  .auth-wrap { margin: var(--sp-5) auto; padding: 0 var(--sp-3); }
  .auth-card { padding: var(--sp-5); }
  .auth-meta { flex-direction: column; align-items: flex-start; }
}

/* ----------- DASHBOARD ----------- */
.dash-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 110px); }
.dash-sidebar { background: var(--brand-navy-dark); color: rgba(255,255,255,.85); padding: var(--sp-5) 0; }
.dash-sidebar .seller-card { padding: 0 var(--sp-4) var(--sp-4); border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: var(--sp-3); display: flex; gap: var(--sp-3); align-items: center; }
.dash-sidebar .avatar { width: 40px; height: 40px; border-radius: 100px; background: var(--brand-gold); color: #1a1a1a; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.dash-sidebar .seller-card .name { color: var(--white); font-weight: 600; font-size: var(--fs-sm); }
.dash-sidebar .seller-card small { color: rgba(255,255,255,.6); font-size: var(--fs-xs); }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px var(--sp-4); color: rgba(255,255,255,.8); font-size: var(--fs-sm); border-left: 3px solid transparent; }
.dash-nav a:hover { background: rgba(255,255,255,.05); color: var(--white); text-decoration: none; }
.dash-nav a.active { background: rgba(244,179,1,.1); color: var(--brand-gold); border-left-color: var(--brand-gold); font-weight: 600; }
.dash-main { padding: var(--sp-5); background: var(--bg); }
.dash-main h1 { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.kpi .label { color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .5px; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--brand-navy); }
.kpi .delta { font-size: var(--fs-xs); margin-top: 4px; }
.kpi .delta.up { color: var(--success); }
.kpi .delta.down { color: var(--danger); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-4); }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.panel h3 { font-size: var(--fs-md); margin-bottom: var(--sp-3); }

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.bar-chart .bar { flex: 1; background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold)); border-radius: var(--r-sm) var(--r-sm) 0 0; min-height: 6px; position: relative; transition: opacity .15s; }
.bar-chart .bar:hover { opacity: .85; }
.bar-chart .bar::after { content: attr(data-label); position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--text-muted); }

.dtable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dtable th, .dtable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dtable th { background: var(--bg-soft); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: .5px; }
.dtable tr:hover td { background: var(--bg-soft); }
.dtable .actions { display: flex; gap: 6px; }
.dtable .actions a { color: var(--brand-navy); font-size: var(--fs-xs); }

@media (max-width: 991px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
/* Chat */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow: auto;
  padding: 4px;
}

.chat-bubble {
  max-width: min(720px, 92%);
  border-radius: 18px;
  padding: 14px 16px;
  background: #f4f6f8;
  border: 1px solid rgba(0,0,0,.06);
}

.chat-bubble.is-mine {
  margin-left: auto;
  background: #004f73;
  color: #fff;
}

.chat-bubble.is-mine .chat-bubble-meta,
.chat-bubble.is-mine .chat-bubble-body {
  color: #fff;
}

.chat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
  color: #667085;
}

.chat-bubble-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-compose .input,
.chat-compose textarea {
  width: 100%;
  min-height: 120px;
}

/* Chat: anexos e indicadores (sem style inline via Blade/JS) */
.chat-attachment-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-attachment-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 4px;
}

.chat-attachment-input {
  font-size: 13px;
  color: #475569;
}

.chat-bubble-attachment {
  margin-top: 8px;
}

.chat-attachment-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
}

.chat-attachment-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
}

.chat-automated-note,
.chat-moderation-note {
  font-size: 12px;
  margin-bottom: 6px;
}

.chat-typing-indicator {
  font-size: 12px;
  color: #64748b;
  margin: 8px 16px 0;
  font-style: italic;
  display: none;
}

.chat-typing-indicator.is-visible {
  display: block;
}

/* ----------- NAV / HERO OVERRIDES ----------- */
.nav-bar .container {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: var(--sp-3);
  min-height: 50px;
  height: auto;
  overflow: visible;
}

.nav-shell {
  position: relative;
  width: 100%;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  justify-content: center;
  grid-column: 1;
}

.nav-primary > .nav-dropdown-all,
.nav-primary > details.nav-dropdown {
  width: 100%;
}

.nav-primary > details.nav-dropdown > summary.nav-link {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.nav-panel {
  display: block;
  min-width: 0;
  grid-column: 2 / span 6;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links-desktop {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  justify-content: stretch;
  align-items: center;
  gap: var(--sp-2);
  padding-left: 0;
  padding-right: 0;
}

.nav-links-desktop .nav-dropdown {
  width: 100%;
}

.nav-links-desktop .nav-link {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.nav-links-mobile {
  display: none;
}

.nav-link,
.nav-bar summary.nav-link {
  color: rgba(255,255,255,.92);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r-md);
  white-space: nowrap;
}

.nav-link:hover,
.nav-bar summary.nav-link:hover {
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

.nav-link.is-active {
  background: rgba(255,255,255,.12);
}

.nav-bar summary.nav-link {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.nav-bar summary.nav-link::-webkit-details-marker {
  display: none;
}

.nav-bar summary.nav-link.has-menu::after {
  content: '▾';
  font-size: 10px;
  opacity: .7;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
}

.nav-dropdown[open] > .nav-dropdown-menu,
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu {
  pointer-events: auto;
}

/* Dropdown "Todas as categorias": grade (nível 0) */
.nav-dropdown-menu-wide {
  /* Desktop: mega menu deve acompanhar o conteúdo (não ficar preso à coluna do grid). */
  width: max-content;
  min-width: 100%;
  max-width: min(760px, 92vw);
  padding: var(--sp-3);
}

.nav-dropdown-menu-wide .nav-tree {
  width: max-content;
}

.nav-dropdown-menu-wide .nav-tree-link {
  white-space: nowrap;
}

.nav-dropdown-menu-wide .nav-tree-link {
  /* Centraliza os itens dentro dos menus compactos (desktop + mobile) */
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.nav-dropdown-menu-wide .nav-tree {
  gap: var(--sp-1);
}

.nav-dropdown-menu-wide .nav-tree-link {
  margin-bottom: var(--sp-1);
}

@media (max-width: 991px) {
  .nav-dropdown-menu-wide {
    /* No mobile/tablet o layout já vira bloco (100%); mantemos responsivo */
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .nav-dropdown-menu-wide .nav-tree-link {
    white-space: normal;
  }

  .nav-mobile-categories {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-4);
    width: 100%;
    max-width: none;
    margin-top: var(--sp-2);
  }
}

.nav-tree {
  display: grid;
  gap: var(--sp-3);
}

.nav-tree-level-0 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nav-tree-level-1,
.nav-tree-level-2 {
  grid-template-columns: 1fr;
  margin-top: var(--sp-2);
  padding-left: var(--sp-3);
  border-left: 1px solid var(--border);
}

.nav-tree-item {
  min-width: 0;
}

.nav-tree-link {
  display: inline-block;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.nav-dropdown-menu .nav-tree-link {
  /* Override necessário: `.nav-bar a` aplica cor clara a links dentro da nav-bar */
  color: var(--text);
}

.nav-tree-link:hover {
  color: var(--brand-navy);
}

.nav-dropdown-menu .nav-tree-link:hover {
  color: var(--brand-navy);
}

.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.16);
  flex-direction: column;
  gap: 4px;
}

.nav-burger:hover {
  background: rgba(255,255,255,.08);
}

.nav-burger span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-wide {
  margin: var(--sp-5) 0 0;
  width: 100%;
  aspect-ratio: 1200 / 340;
}

.home-layout {
  align-items: start;
}

@media (max-width: 991px) {
  .nav-bar .container {
    align-items: flex-start;
  }

  .nav-primary {
    width: 100%;
    justify-content: space-between;
  }

  .nav-burger {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    width: 100%;
    padding-bottom: var(--sp-3);
    justify-content: flex-start;
  }

  .nav-panel.open {
    display: block;
  }

  .nav-links-desktop {
    display: none;
  }

  .nav-links-mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-links-mobile .nav-dropdown,
  .nav-links-mobile .nav-link {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: var(--sp-2);
    box-shadow: none;
  }

  .nav-tree-level-0 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .hero-wide {
    margin-top: var(--sp-4);
    min-height: 240px;
  }

  .hero-slide-content {
    max-width: 78%;
  }

  .hero-arrow {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 576px) {
  .hero-wide {
    min-height: 200px;
  }

  .hero-slide {
    padding: var(--sp-4);
  }

  .hero-slide-content {
    max-width: 100%;
  }

  .hero-slide-content h2 {
    font-size: 20px;
  }

  .hero-slide-content p {
    margin-bottom: var(--sp-3);
  }

  .hero-arrow.prev {
    left: var(--sp-3);
  }

  .hero-arrow.next {
    right: var(--sp-3);
  }
}

/* ----------- HOME LAYOUT ----------- */
.hero-wide,
.hero-wide .hero-track,
.hero-wide .hero-slide {
  width: 100%;
}

.home-main {
  margin-top: var(--sp-5);
}

.ads-col-home {
  width: min(360px, 100%);
  margin-left: auto;
  margin-top: var(--sp-4);
}

@media (max-width: 991px) {
  .ads-col-home {
    width: 100%;
    margin-left: 0;
  }
}

/* ==========================================================================
   Chat widget (flutuante) - versao para telas publicas
   Observacao: o widget tambem e estilizado em `dashboard.css` (painel).
   ========================================================================== */

.chat-widget {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.chat-widget-toggle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--brand-gold);
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chat-widget-toggle:focus-visible {
  outline: 3px solid rgba(0,79,115,.35);
  outline-offset: 2px;
}

.chat-widget-toggle-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.chat-widget-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.chat-widget-conv-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid #fff;
  flex: 0 0 auto;
}

.chat-widget-panel {
  width: min(420px, 92vw);
  height: min(560px, 72vh);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,79,115,.08), rgba(0,79,115,.02));
}

.chat-widget-head h3 {
  margin: 0;
  font-size: var(--fs-base);
}

.chat-widget-subtitle {
  margin-top: var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.chat-widget-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-widget-close:focus-visible {
  outline: 3px solid rgba(0,79,115,.35);
  outline-offset: 2px;
}

.chat-widget-body {
  height: calc(100% - 70px);
  display: flex;
  flex-direction: column;
}

.chat-widget-columns {
  display: grid;
  grid-template-columns: 150px 1fr;
  height: 100%;
}

.chat-widget-conversations {
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: var(--sp-3);
}

.chat-widget-conv-item {
  width: 100%;
  text-align: left;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  margin-bottom: var(--sp-2);
}

.chat-widget-conv-item:hover {
  background: rgba(0,79,115,.06);
}

.chat-widget-conv-item[aria-current="true"] {
  border-color: rgba(0,79,115,.35);
  background: rgba(0,79,115,.08);
}

.chat-widget-conv-main {
  flex: 1;
  min-width: 0;
}

.chat-widget-conv-name {
  display: block;
  font-weight: 900;
  font-size: var(--fs-sm);
  color: var(--brand-navy);
  margin-bottom: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-widget-conv-snippet {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-widget-conv-snippet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-widget-message-area {
  overflow: auto;
  padding: var(--sp-3);
}

.chat-bubble {
  margin-bottom: var(--sp-3);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  border: 1px solid var(--border);
}

.chat-bubble.is-mine {
  background: rgba(244,179,1,.10);
  border-color: rgba(244,179,1,.35);
}

.chat-bubble.is-other {
  background: rgba(0,79,115,.06);
  border-color: rgba(0,79,115,.18);
}

.chat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  margin-bottom: 6px;
}

.chat-bubble-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-widget-compose-wrap {
  border-top: 1px solid var(--border);
  padding: var(--sp-3);
}

.chat-widget-compose {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.chat-widget-compose textarea {
  min-height: 64px;
}

.chat-widget-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.chat-widget-empty {
  color: var(--text-muted);
  padding: var(--sp-3);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  margin-top: var(--sp-2);
}

@media (max-width: 320px) {
  .chat-widget { right: 10px; bottom: 10px; }
  .chat-widget-panel { width: 94vw; height: 70vh; }
  .chat-widget-columns { grid-template-columns: 1fr; }
  .chat-widget-conversations { border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (min-width: 321px) and (max-width: 576px) {
  .chat-widget-panel { width: 94vw; }
  .chat-widget-columns { grid-template-columns: 1fr; }
  .chat-widget-conversations { border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (min-width: 577px) and (max-width: 767px) {
  .chat-widget-columns { grid-template-columns: 180px 1fr; }
}
