/* Estilos base do seu site original */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #c82727;
    --secondary: #b02424;
    --accent: #222222;
    --light: #F8F9FA;
    --dark: #212529;
    --gray: #6C757D;
}

body {
    background-color: #f5f9fc;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo-text h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

/* Link da logo para o index */
.logo-text h1 a {
    color: white;
    text-decoration: none;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Botões do Header */
.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.header-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-button:hover {
    transform: translateY(-2px);
}

.whatsapp-btn { background-color: #fff; color: #cd2828; }

.phone-btn {
    background-color: var(--secondary);
}

.store-btn {
    background-color: var(--primary);
}

.whatsapp-btn:hover {
    background-color: #fff; color: #cd2828;
}

.phone-btn:hover {
    background-color: #fff; color: #cd2828;
}

.store-btn:hover {
    background-color: #fff; color: #cd2828;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.stars {
    color: #FFD700;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('https://images.unsplash.com/photo-1585435557343-3b092031d5ad?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--gray);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Products Section (Geral) */
.products, .store-page {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary);
    font-size: 2rem;
}

/* Carousel (index.php) */
.carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1000px;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.carousel-control {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: var(--secondary);
}

/* Card de Produto (Usado no Index e Loja) */
.product-card {
    min-width: 300px; /* Para o carrossel */
    max-width: 350px; /* Para o grid */
    background: white;
    border-radius: 10px;
    margin: 0 15px; /* Para o carrossel */
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex; /* Para alinhar o botão */
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-10px);
}

/* Área da imagem do produto — mantém tudo dentro do card */
.product-image{
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.product-image img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  display: block;
}

.product-image i {
    font-size: 4rem;
    color: var(--primary);
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-description {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 20px;
}

/* Botões do Card */
.buy-button, .add-to-cart-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
    font-size: 1rem;
    text-decoration: none;
}

.buy-button:hover, .add-to-cart-button:hover {
    background-color: var(--secondary);
}

/* Services Section */
.services {
    background-color: #e8f0fe;
    padding: 60px 0;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-card {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
}
.service-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}
.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

/* Location Section */
.location {
    padding: 60px 0;
}
.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.map-placeholder {
    background-color: #e9ecef;
    height: 300px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-weight: bold;
}
.location-info h3 {
    margin-bottom: 20px;
    color: var(--primary);
}
.location-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 40px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}
.footer-column p, .footer-column a {
    color: #e3f2fd;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}
.footer-column a:hover {
    text-decoration: underline;
}
ul.footer-links {list-style:none}
ul.footer-links a{color:#e1e130}
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}
.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
a:hover { text-decoration:none }
.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #e3f2fd;
}

/* --- NOVOS ESTILOS DA PÁGINA LOJA (loja.php) --- */

.store-layout {
    display: flex;
    flex-wrap: wrap; /* Para responsividade */
    gap: 30px;
}

.product-grid {
    flex: 3; /* Ocupa 3/4 do espaço */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Na loja, o card não precisa de min-width e a margem é controlada pelo grid */
.product-grid .product-card {
    min-width: auto;
    margin: 0;
}

/* Seção do Carrinho (Sidebar) */
.cart-section {
    flex: 1; /* Ocupa 1/4 do espaço */
    min-width: 300px; /* Largura mínima */
    background: white;
    border-radius: 10px;
    padding: 25px;
    height: fit-content; /* Altura se ajusta ao conteúdo */
    position: sticky; /* Fica fixo ao rolar */
    top: 20px;
}

.cart-section h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

#cart-items,
#cart-items-modal {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-info { flex-grow: 1; }
.cart-item-info span {
    display: block;
    font-weight: bold;
    color: var(--dark);
}
.cart-item-info small { color: var(--gray); }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

.cart-item-qty button {
    background: #eee;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.remove-from-cart-button {
    background: #fde8e8;
    color: #e63946;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-empty-message {
    color: var(--gray);
    text-align: center;
    padding: 20px 0;
}

.cart-total {
    border-top: 2px solid #eee;
    padding-top: 15px;
    margin-bottom: 20px;
    text-align: right;
    font-size: 1.1rem;
}

.finalize-button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1.05rem;
}

.finalize-button:hover { transform: translateY(-2px); }

/* ====== MOBILE CART BAR (fixo no rodapé) ====== */
.mobile-cart-bar {
    display: none; /* só mostramos no mobile */
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: 0;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    z-index: 1000;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-cart-bar .bar-left {
    display: flex; align-items: center; gap: 10px; font-weight: 600;
}
.mobile-cart-bar .cart-count-badge {
    background: #fff;
    color: #333;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .9rem;
    font-weight: 700;
}
.mobile-cart-bar .bar-right {
    display:flex; align-items:center; gap:10px; font-weight:700;
}

/* ====== MODAL DO CARRINHO (MOBILE) ====== */
.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 1100;
}
.cart-modal-overlay[aria-hidden="false"] { display: block; }

.cart-modal {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}

.cart-modal-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 16px; border-bottom:1px solid #eee;
}
.cart-modal-header .title { font-weight:700; color: var(--primary); display:flex; align-items:center; gap:8px; }
.cart-modal-header .actions { display:flex; gap:8px; }
.modal-close, .modal-minimize {
    width:36px; height:36px; border-radius:10px; border:1px solid #eaeaea; background:#fff; cursor:pointer;
}

.cart-modal-body { padding: 12px 16px; overflow:auto; }
.cart-modal-footer {
    border-top:1px solid #eee; padding:12px 16px; background:#fafafa; position: sticky; bottom: 0;
}

body.no-scroll { overflow: hidden; }

/* Responsividade */
@media (max-width: 900px) {
    .store-layout { flex-direction: column-reverse; }
    .cart-section { position: relative; top: 0; }
}

@media (max-width: 768px) {

  /* LOGO empilhada (img em cima, texto embaixo) */
  .logo {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
  }
  .logo img { width: 140px; height: auto; }
  .logo-text h1 { font-size: 1.6rem; }
  .logo-text p  { font-size: .95rem; }

  .contact-info { align-items: stretch; width: 100%; }

  .header-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .header-button { width: 100%; justify-content: center; }

  .header-content { flex-direction: column; text-align: center; gap: 20px; }

  .hero h2 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .location-content { grid-template-columns: 1fr; }

  /* Oculta a sidebar do carrinho no mobile e usa o modal */
  #cart-sidebar { display: none; }

  /* Mostra a barra fixa no mobile */
  .mobile-cart-bar { display: flex; }
}
@media (min-width: 769px) {
  .mobile-cart-bar { display: none !important; }
  /* Se preferir garantir que o modal nunca apareça no desktop: */
  /* #cart-modal { display: none !important; } */
}
/* Substitua a regra atual de .product-grid por esta */
.product-grid {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px)); /* <= troque 1fr por 340px */
  gap: 20px;
  justify-content: center; /* centraliza as tracks quando sobrar espaço */
}

/* (Opcional) garanta consistência do card */
.product-grid .product-card {
  width: 100%;
  max-width: 340px;
  margin: 0; /* o grid faz o espaçamento */
}
/* ====== BREADCRUMBS / NAVEGAÇÃO ====== */
.breadcrumbs{
  background:#fff;
  border:1px solid #eee;
  border-radius:10px;
  padding:10px 12px;
  font-size:.95rem;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.breadcrumbs a{
  color: var(--primary);
  text-decoration:none;
  font-weight:600;
}

.breadcrumbs a:hover{
  text-decoration:underline;
}

.breadcrumbs .sep{
  color:#9aa3b2; /* cinza leve para separador */
}

.breadcrumbs span{
  color: var(--gray);
}

/* Versão “plana”, se quiser usar sem caixa */
.breadcrumbs.plain{
  background:transparent;
  border:none;
  padding:0;
}
/* ====== NOT FOUND / EMPTY STATES ====== */
.not-found{
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  padding:28px;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
  text-align:left;
}

.not-found h1{
  margin:0 0 8px 0;
  font-size:1.6rem;
  color: var(--dark);
}

.not-found p{
  margin:0 0 20px 0;
  color:#555;
}

/* Ações do not-found (botões) */
.not-found .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:10px;
  height:42px;
  padding:0 14px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  transition:transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover{ transform:translateY(-1px); }

/* Variações */
.btn-primary{
  background: var(--primary);
  color:#fff;
}

.btn-primary:hover{
  background: var(--secondary);
}

.btn-outline{
  background:#fff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover{
  background: var(--primary);
  color:#fff;
}

.btn-ghost{
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover{
  background:#f7f7f7;
}

/* Ícones dentro dos botões (Font Awesome) */
.btn i{ font-size:1rem; }

/* Responsivo */
@media (max-width: 768px){
  .not-found{ padding:20px; }
}

