:root {
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --text-primary: #121212;
  --text-secondary: #666666;
  --accent-color: #121212;
  --accent-light: #333333;
  --border-color: #e5e5e5;
  --success: #28a745;
  --font-main: 'Outfit', sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
  --border-radius: 8px;
}

:root.theme-organic {
  --accent-color: #2D6A4F;
  --accent-light: #40916C;
  --bg-color: #F8FAF8;
  --border-radius: 12px;
  --text-primary: #1A2E1A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  font-size: 16px;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --- Header --- */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.search-container {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1.2rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #f5f5f5;
  transition: all 0.25s;
  color: var(--text-primary);
}

.search-input:focus {
  outline: none;
  background: white;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.search-input::placeholder {
  color: #aaa;
  font-size: 0.88rem;
}

nav {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--accent-color);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 0.5rem;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent-color);
  color: white;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  background: var(--accent-color);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--accent-color);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  border-radius: var(--border-radius);
}

.btn:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--accent-color);
}

/* --- Hero --- */
.hero {
  height: 70vh;
  min-height: 500px;
  /* Sem foto de capa: degradê elegante baseado na cor do tema (o admin pode
     subir uma capa que substitui isso via background-image inline). */
  background-color: var(--accent-color);
  background-image: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 60%, var(--accent-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: var(--header-height);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 10;
  color: white;
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  /* Responsive Font */
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 2rem;
  font-weight: 400;
  opacity: 0.95;
}

/* --- Sections --- */
.section {
  padding: 4rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
}

/* --- Collections --- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.collection-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.collection-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.collection-card:hover img {
  transform: scale(1.05);
}

/* Categoria sem foto: degradê da cor do tema com o ícone do tema em branco
   (o texto branco do card continua legível) */
.collection-card .collection-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
}

.collection-card .collection-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5.5 8.5h13l-1 11h-11z'/><path d='M9 8.5V7a3 3 0 0 1 6 0v1.5'/></svg>") center / 76px 76px no-repeat;
}

body.theme-fashion .collection-card .collection-placeholder::after {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 7v-.8A1.8 1.8 0 1 0 10.2 4.4'/><path d='M12 7l8.6 5.9a1.2 1.2 0 0 1-.7 2.2H4.1a1.2 1.2 0 0 1-.7-2.2L12 7z'/></svg>");
}

body.theme-grocery .collection-card .collection-placeholder::after {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 11.5A3.5 3.5 0 0 1 7.5 8h9a3.5 3.5 0 0 1 1.6 6.6V18a1 1 0 0 1-1 1H6.9a1 1 0 0 1-1-1v-3.4A3.5 3.5 0 0 1 4 11.5z'/><path d='M9.5 11l-1 2.2M13.5 11l-1 2.2M17.5 11l-1 2.2'/></svg>");
}

.collection-info {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* --- Faixa de benefícios (textos editáveis no admin) --- */
.benefits-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.5rem 0.5rem;
}

.benefit-item {
  flex: 1 1 240px;
  max-width: 340px;
  border-left: 3px solid var(--accent-color);
  padding: 0.3rem 0 0.3rem 1rem;
}

.benefit-item h4 {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.benefit-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Depoimentos de clientes (ativados no admin) --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.6rem 1.6rem 1.4rem;
  margin: 0;
  position: relative;
}

.testimonial-card blockquote {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.testimonial-card blockquote::before {
  content: '\201C';
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent-color);
  opacity: 0.35;
  margin-bottom: 0.3rem;
  font-family: Georgia, serif;
}

.testimonial-card figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  /* Inteligente: Mínimo 260px no desktop, mas flexível */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  /* Sombra suave */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--border-color);
}

.product-image {
  background: #f4f4f4;
  aspect-ratio: 3/4;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.product-price {
  font-weight: 700;
  color: var(--text-primary);
}

.product-color {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Inline Options (The "Unbroken" Part) --- */
.product-options {
  padding: 0 1rem 1rem;
  border-top: 1px solid #f0f0f0;
}

.option-group {
  margin-top: 0.75rem;
}

.option-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #999;
  margin-bottom: 0.25rem;
  display: block;
}

/* Tamanhos */
.inline-size-selector {
  display: flex;
  gap: 0.25rem;
}

.inline-size-btn {
  flex: 1;
  padding: 0.4rem 0;
  background: white;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: all 0.2s;
}

.inline-size-btn:hover {
  border-color: #999;
}

.inline-size-btn.selected {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* Quantidade */
.inline-qty-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 32px;
}

.inline-qty-selector button {
  width: 32px;
  height: 100%;
  background: #f9f9f9;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inline-qty-selector button:active {
  background: #e0e0e0;
}

.inline-qty-selector span {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.add-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:active {
  background: #333;
  transform: scale(0.98);
}

/* --- Cart Sidebar --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s;
}

.cart-overlay.active {
  display: flex;
  opacity: 1;
}

.cart-sidebar {
  background: white;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.cart-overlay.active .cart-sidebar {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
  width: 70px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.item-details {
  flex: 1;
}

.item-details h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cart-total {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  font-family: inherit;
}

/* --- Map --- */
.map-section {
  width: 100%;
  height: 400px;
  background: #eee;
}

.map-section iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%);
}

/* --- Footer --- */
footer {
  background: #111;
  color: #eee;
  padding: 4rem 1.5rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  border-top: 1px solid #333;
  padding-top: 2rem;
  color: #666;
  font-size: 0.8rem;
}

.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1500;
  transition: transform 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

/* Imagem de produto ausente: placeholder neutro com ícone do tema.
   O ícone (sacola / cabide / pão) é um SVG inline em data-URI — nada externo.
   Vale para cards da loja e para a página de produto (.pdp-main-img.img-placeholder). */
.img-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.75), transparent 60%),
    linear-gradient(135deg, #f8fafc, #e8edf5);
}

.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M5.5 8.5h13l-1 11h-11z'/><path d='M9 8.5V7a3 3 0 0 1 6 0v1.5'/></svg>") center / 56px 56px no-repeat;
}

body.theme-fashion .img-placeholder::after {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M12 7v-.8A1.8 1.8 0 1 0 10.2 4.4'/><path d='M12 7l8.6 5.9a1.2 1.2 0 0 1-.7 2.2H4.1a1.2 1.2 0 0 1-.7-2.2L12 7z'/></svg>");
}

body.theme-grocery .img-placeholder::after {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 11.5A3.5 3.5 0 0 1 7.5 8h9a3.5 3.5 0 0 1 1.6 6.6V18a1 1 0 0 1-1 1H6.9a1 1 0 0 1-1-1v-3.4A3.5 3.5 0 0 1 4 11.5z'/><path d='M9.5 11l-1 2.2M13.5 11l-1 2.2M17.5 11l-1 2.2'/></svg>");
}

/* --- Mobile Fixes --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  /* Animação do Hamburger para X */
  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.5rem;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex !important;
    /* Sobrescreve o display:none antigo */
  }

  .nav-links.active {
    left: 0;
  }

  /* Hamburger could be added here, currently hidden */

  .hero h1 {
    font-size: 2.5rem;
  }

  /* Grid de 2 colunas no mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Ajustes no Card para caber em 2 colunas */
  .product-info {
    padding: 0.75rem;
  }

  .product-info h3 {
    font-size: 0.9rem;
  }

  .product-price {
    font-size: 0.9rem;
  }

  .product-options {
    padding: 0 0.75rem 0.75rem;
  }

  .inline-size-btn {
    padding: 0.3rem 0;
    font-size: 0.75rem;
  }

  /* Seção de Coleções */
  .collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }

  .collection-card {
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }

  .collection-card:hover img {
    transform: scale(1.1);
  }

  .collection-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
  }

  .collection-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
  }

  .collection-overlay span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  /* Botões de quantidade maiores para toque */
  .inline-qty-selector {
    height: 36px;
  }

  .inline-qty-selector button {
    width: 36px;
  }

  .add-btn {
    padding: 0.7rem;
    font-size: 0.8rem;
  }

  /* Cart em tela cheia no mobile */
  .cart-sidebar {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
    height: 85vh;
  }

  .cart-overlay {
    align-items: flex-end;
  }
}

/* --- Modals (Auth) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.close-modal:hover {
  color: var(--text-primary);
}

/* --- Product Detail Modal --- */
.product-detail-content {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border-radius: 12px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  padding: 2.5rem;
}

.product-detail-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#modal-main-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #f4f4f4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease-in-out;
}

.product-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.thumbnail-wrapper {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f4f4f4;
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.thumbnail-wrapper:hover img,
.thumbnail-wrapper.active img {
  opacity: 1;
}

.thumbnail-wrapper.active {
  border-color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-price {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 1rem 0;
  color: var(--accent-color);
}

.modal-description {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.modal-description h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.modal-description p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.related-products-section {
  padding: 2.5rem;
  background: #f9f9f9;
  border-top: 1px solid var(--border-color);
}

.related-products-section h3 {
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

/* --- Modal Tabs & Rich Content --- */
.modal-tabs {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.8rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.tab-btn.active {
  color: var(--accent-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reviews Design */
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-user {
  font-weight: 700;
  font-size: 0.95rem;
}

.stars {
  color: #fbbf24;
  font-size: 0.85rem;
}

.review-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Specs Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.spec-table td {
  padding: 0.8rem 0;
  font-size: 0.95rem;
}

.spec-label {
  font-weight: 600;
  color: var(--text-main);
  width: 40%;
}

.spec-value {
  color: var(--text-secondary);
}

/* ==========================================================================
   Temas por tipo de loja
   - body.theme-fashion  → Roupa
   - body.theme-grocery  → Mercearia/Padaria
   - body.theme-general  → Diversos (padrão neutro)
   ========================================================================== */

body.theme-fashion {
  --accent-color: #121212;
  --accent-light: #333;
  --bg-color: #ffffff;
}

body.theme-grocery {
  --accent-color: #2D6A4F;
  --accent-light: #40916C;
  --bg-color: #F8FAF8;
  --text-primary: #1A2E1A;
  --border-radius: 12px;
}

body.theme-general {
  --accent-color: #2563eb;
  --accent-light: #3b82f6;
  --bg-color: #ffffff;
}

/* Estoque — cores semânticas comuns a todos os temas */
.product-stock { font-size: 0.78rem; margin-top: 6px; font-weight: 600; }
.product-stock.stock-ok  { color: var(--success); }
.product-stock.stock-low { color: #d97706; }
.product-stock.stock-out { color: #dc2626; }

/* Apresentação (mercearia): "1 UN 500g" */
.product-apresentacao {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(45, 106, 79, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 6px 0 4px;
  font-weight: 600;
}
body.theme-general .product-apresentacao { background: rgba(37, 99, 235, 0.08); }

.product-price-kg {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

/* Mercearia: cards mais densos, foco em preço */
body.theme-grocery .product-card {
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
body.theme-grocery .product-card .product-image img {
  object-fit: contain;
  background: #fff;
}
body.theme-grocery .product-card .product-price {
  font-size: 1.35rem;
  color: var(--accent-color);
  font-weight: 700;
}

/* Roupa: foto maior, swatch de cor */
body.theme-fashion .product-card .product-image img {
  object-fit: cover;
}
body.theme-fashion .product-color {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

/* Diversos: visual neutro, sem opções fixas */
body.theme-general .product-card {
  border: 1px solid var(--border-color);
}

.store-filter-select {
  font-family: var(--font-main);
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
}
