/* ═══════════════════════════════════════════════
   Alltech Loja — Visual inspirado em miranda.com.br
   ═══════════════════════════════════════════════ */

/* ── Reset / Base ─────────────────────────────── */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #333;
  background-color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ── Navbar principal (preta) ────────────────── */
.loja-navbar {
  background: #111;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1040;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.loja-navbar .navbar-brand {
  color: #fff !important;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.loja-navbar .navbar-brand:hover { color: #ddd !important; }

/* Search */
.loja-search-form .input-group {
  border-radius: 6px;
  overflow: hidden;
}
.loja-search-form input {
  border: none;
  border-radius: 6px 0 0 6px !important;
  height: 42px;
  font-size: 0.9rem;
  background: #f5f5f5;
}
.loja-search-form input:focus {
  box-shadow: none;
  background: #fff;
  border: 1px solid #FB6703;
}
.loja-search-form .btn {
  background: #FB6703;
  border: none;
  color: #fff;
  height: 42px;
  padding: 0 18px;
  border-radius: 0 6px 6px 0 !important;
  font-size: 1rem;
}
.loja-search-form .btn:hover { background: #d95500; }

/* Navbar ações */
.loja-navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.loja-navbar-actions a {
  color: #ccc;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.loja-navbar-actions a:hover { color: #fff; }
.loja-navbar-actions a i { display: block; font-size: 1.2rem; margin-bottom: 2px; color: #fff; }
.btn-carrinho-nav {
  background: #FB6703;
  color: #fff !important;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-carrinho-nav:hover { background: #d95500; }
.btn-carrinho-nav .badge-qtd {
  background: #ff4444;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ── Barra de categorias ───────────────────── */
.loja-catbar {
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 0;
  min-height: 54px;
}
.loja-catbar a {
  color: #cce0ff;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 30px 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.loja-catbar a:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}
.loja-catbar-inner {
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow: visible;
}
.loja-catbar {
  overflow: visible;
}

/* Link "Ver todos" */
.catbar-ver-todos {
  color: #90c0ff !important;
  font-weight: 700 !important;
  border-left: 1px solid rgba(255,255,255,0.18);
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Dropdown de subcategorias */
.catbar-dropdown {
  position: relative;
}
.catbar-dropdown-toggle {
  cursor: pointer;
}
.catbar-chevron {
  font-size: 0.6rem;
  transition: transform 0.2s;
}
.catbar-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1c1c1c;
  min-width: 190px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  z-index: 1050;
  padding: 4px 0;
}
.catbar-dropdown-menu a {
  display: block;
  padding: 9px 18px;
  color: #cce0ff;
  font-size: 0.82rem;
  font-weight: 400;
  border-left: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.catbar-dropdown-menu a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.catbar-dropdown:hover .catbar-dropdown-menu {
  display: block;
}
.catbar-dropdown:hover .catbar-chevron {
  transform: rotate(180deg);
}

/* ── Barra de benefícios ─────────────────────── */
.beneficios-bar {
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
}
.beneficio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.beneficio-item i {
  font-size: 1.6rem;
  color: #FB6703;
  flex-shrink: 0;
}
.beneficio-item strong {
  display: block;
  font-size: 0.78rem;
  color: #222;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.beneficio-item span {
  display: block;
  font-size: 0.72rem;
  color: #666;
}

/* ── Títulos de seção ────────────────────────── */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
  text-align: center;
}
.section-title-left {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #FB6703;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title-left a {
  font-size: 0.8rem;
  font-weight: 400;
  color: #FB6703;
}

/* ── Card de Categoria (Departamentos) ────────── */
.cat-card {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

/* ── Card de Produto (estilo Miranda) ────────── */
.card-produto {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-produto:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-color: #bbb;
}

/* Imagem do produto */
.card-produto .produto-img-wrapper {
  display: block;
  padding: 16px;
  background: #fff;
  text-align: center;
}
.card-produto .produto-img-wrapper img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.card-produto .produto-img-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  background: #fafafa;
}

/* Corpo do card */
.card-produto .produto-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-transform: uppercase;
}

/* Estado de conservação */
.produto-estado {
  margin-bottom: 4px;
}

/* Nome */
.produto-nome {
  font-size: 0.82rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.produto-nome a { color: #222; }
.produto-nome a:hover { color: #FB6703; }

/* Ref e Marca */
.produto-ref {
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 1px;
}
.produto-marca {
  font-size: 0.7rem;
  color: #666;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Preços */
.produto-preco { margin-bottom: 8px; }
.preco-de {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 0;
}
.preco-de span { text-decoration: line-through; }
.preco-pix {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}
.preco-pix-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #009900;
  margin-bottom: 2px;
}
.preco-parcelas {
  font-size: 0.72rem;
  color: #555;
}

/* Botão Comprar */
.btn-comprar {
  display: block;
  width: 100%;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
}
.btn-comprar:hover { background: #218838; color: #fff; }
.btn-comprar:disabled {
  background: #aaa;
  cursor: not-allowed;
}
.btn-comprar i { margin-right: 4px; }

/* Badge estoque */
.badge-sem-estoque {
  background: #ffe0e0;
  color: #c00;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ── Aside do Carrinho ───────────────────────── */
#carrinho-aside {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  z-index: 1050;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
#carrinho-aside.aberto { right: 0; }
#carrinho-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1049;
  display: none;
}
#carrinho-overlay.visivel { display: block; }

/* ── Filtros sidebar ─────────────────────────── */
.filtros-sidebar .card {
  border: 1px solid #ddd;
  border-radius: 4px;
}
.filtros-sidebar .filtro-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.filtros-sidebar .form-check-label {
  font-size: 0.82rem;
  cursor: pointer;
  color: #444;
}
.filtros-sidebar .form-check { margin-bottom: 4px; }

/* ── Grid de produtos ────────────────────────── */
.produtos-grid { }

/* ── Barra de resultados ─────────────────────── */
.resultados-bar {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.resultados-bar .resultados-count {
  font-size: 0.82rem;
  color: #555;
}
.resultados-bar .form-control-sm {
  font-size: 0.82rem;
  min-width: 160px;
}

/* ── Footer Miranda-style ────────────────────── */
.loja-footer {
  background: #111;
  color: #aaa;
  padding: 36px 0 16px;
  margin-top: 48px;
}
.loja-footer h6 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.loja-footer ul { list-style: none; padding: 0; margin: 0; }
.loja-footer ul li { margin-bottom: 5px; }
.loja-footer ul li a {
  color: #aaa;
  font-size: 0.78rem;
  transition: color 0.15s;
}
.loja-footer ul li a:hover { color: #fff; }
.loja-footer .footer-bottom {
  border-top: 1px solid #333;
  padding-top: 14px;
  margin-top: 24px;
  font-size: 0.75rem;
  text-align: center;
  color: #666;
}

/* ── Overrides Bootstrap — cor primária laranja admin ── */
.text-primary { color: #FB6703 !important; }
a.text-primary:hover { color: #d95500 !important; }

.btn-primary, .btn-primary:focus {
  background-color: #FB6703 !important;
  border-color: #FB6703 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:active {
  background-color: #d95500 !important;
  border-color: #d95500 !important;
}

.btn-outline-primary {
  color: #FB6703 !important;
  border-color: #FB6703 !important;
}
.btn-outline-primary:hover {
  background-color: #FB6703 !important;
  color: #fff !important;
}

.form-control:focus {
  border-color: #FB6703;
  box-shadow: 0 0 0 0.2rem rgba(251,103,3,0.25);
}

.nav-link.active, .nav-tabs .nav-link.active {
  color: #FB6703 !important;
  border-bottom-color: #FB6703 !important;
}

/* ── Paginação Bootstrap override ───────────── */
.pagination .page-link {
  color: #FB6703;
  font-size: 0.82rem;
}
.pagination .page-item.active .page-link {
  background: #FB6703;
  border-color: #FB6703;
}

/* ── Botão Adicionar ao Carrinho (detalhe do produto) ── */
.btn-carrinho {
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 28px;
  transition: background 0.15s, transform 0.1s;
}
.btn-carrinho:hover:not(:disabled) {
  background: #218838;
  color: #fff;
  transform: translateY(-1px);
}
.btn-carrinho:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

/* ── Trix (ActionText) na loja ───────────────── */
.trix-content h1,
.trix-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.trix-content ul {
  padding-left: 1.5rem;
}
.trix-content p {
  line-height: 1.7;
}

/* ── Auth pages ─────────────────────────────── */
.auth-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 500px;
}
.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #111;
}
.auth-card .form-control {
  height: 42px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #ddd;
}
.auth-card .form-control:focus {
  border-color: #FB6703;
  box-shadow: 0 0 0 2px rgba(251,103,3,0.15);
}
.auth-card label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}
.auth-card .btn-auth {
  background: #FB6703;
  color: #fff;
  border: none;
  border-radius: 6px;
  height: 44px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-card .btn-auth:hover { background: #d95500; }
.auth-card .auth-link {
  font-size: 0.82rem;
  color: #FB6703;
}
.auth-card .auth-link:hover { text-decoration: underline; }
.auth-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 20px 0 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
}

/* Navbar — links cliente */
.navbar-cliente-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-cliente-links .btn-conta {
  color: #ccc;
  font-size: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
  white-space: nowrap;
}
.navbar-cliente-links .btn-conta i { font-size: 1.1rem; color: #fff; }
.navbar-cliente-links .btn-conta:hover { color: #fff; }

/* ── Responsivo mobile ───────────────────────── */
@media (max-width: 767px) {
  .loja-navbar { padding: 10px 0; }
  .loja-search-form .input-group { min-width: unset; width: 100%; }

  .loja-navbar-actions { gap: 10px; }
  .btn-carrinho-nav { padding: 8px 12px; }
  .navbar-cliente-links .btn-conta { font-size: 0.75rem; }

  /* Catbar mobile */
  .loja-catbar { min-height: unset; }
  .catbar-toggler {
    background: none;
    border: none;
    color: #fff;
    width: 100%;
    padding: 15px 0;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
  }
  .catbar-toggler:focus { outline: none; }

  .loja-catbar-inner {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 15px;
  }
  .loja-catbar-inner a {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
  }
  .catbar-ver-todos {
    border-left: none !important;
    margin-left: 0 !important;
    color: #FB6703 !important;
  }

  /* Dropdowns no mobile (estilo sanfona simples) */
  .catbar-dropdown-menu {
    position: static;
    background: #222;
    box-shadow: none;
    border-radius: 0;
    display: none; /* Só mostra quando o pai tiver uma classe ou hover */
    padding-left: 15px;
  }
  .catbar-dropdown:hover .catbar-dropdown-menu {
    display: block;
  }
  .catbar-dropdown .catbar-dropdown-toggle i {
    transform: rotate(-90deg);
  }
  .catbar-dropdown:hover .catbar-dropdown-toggle i {
    transform: rotate(0deg);
  }

  #carrinho-aside { width: 100%; right: -100%; }
  .beneficios-bar .col-6 + .col-6 { display: none; }
  .card-produto .produto-img-wrapper img { height: 120px; }
}

/* ── Banner Carousel ─────────────────────────── */
.banner-carousel {
  margin: -2rem -15px 0 -15px;
  padding: 0;
  background: #000;
}

.banner-carousel .carousel-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.banner-carousel .carousel-item {
  position: relative;
  width: 100%;
  padding-top: 33.33%;
  background: #000;
  overflow: hidden;
}

.banner-carousel .carousel-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

@media (min-width: 1201px) {
  .banner-carousel .carousel-item {
    padding-top: 0;
    height: 400px;
  }
}

.banner-carousel .carousel-caption {
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 40px 20px 25px;
  text-align: left;
}

.banner-carousel .carousel-caption h5 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.banner-carousel .carousel-caption p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}

.banner-carousel .carousel-caption .btn-banner {
  display: inline-block;
  background: #FB6703;
  color: #fff;
  padding: 8px 22px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.banner-carousel .carousel-caption .btn-banner:hover {
  background: #e05a00;
  color: #fff;
  text-decoration: none;
}

.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
  width: 50px;
}

.banner-carousel .carousel-indicators li {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
}

.banner-carousel .carousel-indicators .active {
  background: #FB6703;
  border-color: #FB6703;
}

@media (max-width: 768px) {
  .banner-carousel .carousel-item {
    height: 220px;
  }
  .banner-carousel .carousel-caption h5 {
    font-size: 1.2rem;
  }
  .banner-carousel .carousel-caption p {
    font-size: 0.82rem;
  }
}
