

/* ==========================================
   CONFIGURAÇÕES GERAIS
========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #176b55;
  --primary-dark: #10513f;
  --accent: #dff2e9;
  --ink: #17231f;
  --muted: #718078;
  --surface: #ffffff;
  --background: #f7f9f7;
  --border: #e7ece8;
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
}

body.cart-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ==========================================
   CABEÇALHO
========================================== */

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-content,
.brand,
.header-actions,
.header-whatsapp,
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  justify-content: flex-start;
  gap: 11px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-size: 18px;
}

.header-actions {
  gap: 22px;
}

.header-whatsapp {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

/* ==========================================
   BOTÃO DO CARRINHO DO CABEÇALHO
========================================== */

.cart-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.cart-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================
   APRESENTAÇÃO
========================================== */

.hero {
  background: var(--background);
  overflow: hidden;
}

.hero-content {
  min-height: 370px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 45px;
  padding-bottom: 45px;
}

.hero-copy {
  max-width: 570px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  margin-bottom: 13px;
}

h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -2px;
  max-width: 560px;
}

.hero-copy p {
  max-width: 450px;
  color: var(--muted);
  margin: 18px 0 25px;
  font-size: 16px;
}

.hero-button,
.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 13px 20px;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s ease, transform .2s ease;
}

.hero-button:hover,
.contact-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ==========================================
   ELEMENTOS DECORATIVOS
========================================== */

.hero-decoration {
  width: 340px;
  height: 270px;
  position: relative;
  flex: 0 0 340px;
}

.decoration-circle {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: #dcefe5;
  top: 18px;
  left: 55px;
}

.decoration-card {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 16px 45px #173d2c18;
  border-radius: 18px;
  color: var(--primary);
}

.card-one {
  width: 90px;
  height: 90px;
  top: 15px;
  left: 20px;
  font-size: 42px;
  transform: rotate(-12deg);
}

.card-two {
  width: 105px;
  height: 105px;
  right: 5px;
  bottom: 32px;
  font-size: 48px;
  transform: rotate(10deg);
}

.decoration-caption {
  position: absolute;
  z-index: 2;
  left: 48px;
  bottom: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================
   CATÁLOGO
========================================== */

.catalog-section {
  padding-top: 68px;
  padding-bottom: 78px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

h2 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -1px;
  line-height: 1.2;
}

.muted,
.section-heading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 7px;
}

.product-count {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 5px;
}

/* ==========================================
   PESQUISA
========================================== */

.catalog-tools {
  display: flex;
  gap: 12px;
  margin: 28px 0 17px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
}

.search-box span {
  font-size: 25px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box:focus-within {
  border-color: var(--primary);
}

.catalog-tools select {
  min-width: 180px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline-color: var(--primary);
}

/* ==========================================
   CATEGORIAS
========================================== */

.categories {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 27px;
}

.category-button {
  border: 1px solid var(--border);
  background: #fff;
  color: #66736c;
  padding: 9px 15px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: .2s ease;
}

.category-button:hover,
.category-button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================
   PRODUTOS
========================================== */

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }

.product-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.product-card:hover {
  border-color: #d2e3d9;
  box-shadow: 0 12px 30px #153b2a0d;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f1f5f2;
  color: #a0b1a7;
  font-size: 42px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  padding: 16px;
}

.product-category {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-info h3 {
  font-size: 15px;
  margin: 6px 0;
  line-height: 1.35;
}

.product-info p {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.product-bottom strong {
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

/* ==========================================
   BOTÕES COMPRAR E CARRINHO DOS PRODUTOS
========================================== */

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.product-actions button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 10px 5px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

/* BOTÃO COMPRAR */

.buy-now-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.buy-now-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* BOTÃO CARRINHO */

.add-cart-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
}

.add-cart-button:hover {
  border-color: var(--primary);
  background: var(--accent);
}

/* ==========================================
   NENHUM PRODUTO
========================================== */

.empty-state {
  text-align: center;
  padding: 65px 15px;
  color: var(--muted);
}

.empty-state > span {
  font-size: 35px;
}

.empty-state h3 {
  color: var(--ink);
  margin: 10px 0 5px;
}

.empty-state p {
  font-size: 13px;
}

/* ==========================================
   CONTATO
========================================== */

.contact-strip {
  background: #eff6f1;
  padding: 45px 0;
}

.contact-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.contact-content h2 {
  max-width: 570px;
  font-size: 27px;
}

.contact-content p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.contact-button {
  white-space: nowrap;
}

/* ==========================================
   RODAPÉ
========================================== */

.footer {
  padding: 24px 0;
  background: #fff;
}

.footer-content {
  color: var(--muted);
  font-size: 11px;
  gap: 20px;
}

.footer-content span:first-child {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 1px;
}

/* ==========================================
   CARRINHO LATERAL
========================================== */

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 25, 20, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* PAINEL */

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  width: min(440px, 100%);
  height: 100dvh;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .08);
  visibility: hidden;
}

.cart-drawer.active {
  transform: translateX(0);
  visibility: visible;
}

/* CABEÇALHO DO CARRINHO */

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 24px;
}

.cart-header .eyebrow {
  margin-bottom: 5px;
}

.close-cart {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--background);
  color: var(--ink);
  font-size: 27px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}

.close-cart:hover {
  background: var(--accent);
  color: var(--primary);
}

/* ITENS DO CARRINHO */

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 25px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f2;
  color: #a0b1a7;
  font-size: 27px;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--primary);
  font-weight: 800;
}

.cart-item-info > strong {
  font-size: 12px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}

.quantity-control button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  min-width: 20px;
}

.quantity-control span {
  font-size: 12px;
  font-weight: 700;
  min-width: 12px;
  text-align: center;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #b65b5b;
  font-size: 12px;
  cursor: pointer;
}

.remove-item:hover {
  text-decoration: underline;
}

/* CARRINHO VAZIO */

.cart-empty {
  text-align: center;
  padding: 65px 10px;
  color: var(--muted);
}

.cart-empty > span {
  font-size: 45px;
}

.cart-empty h3 {
  color: var(--ink);
  font-size: 17px;
  margin: 12px 0 5px;
}

.cart-empty p {
  font-size: 13px;
}

/* RODAPÉ DO CARRINHO */

.cart-footer {
  padding: 22px 25px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.cart-total strong {
  font-size: 22px;
  color: var(--primary);
}

.checkout-button {
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease;
}

.checkout-button:hover:not(:disabled) {
  background: var(--primary-dark);
}

.checkout-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.continue-shopping {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.continue-shopping:hover {
  color: var(--primary);
}

/* ==========================================
   TABLETS
========================================== */

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-decoration {
    transform: scale(.85);
    transform-origin: center right;
    margin-right: -20px;
  }
}

/* ==========================================
   CELULARES
========================================== */

@media (max-width: 650px) {
  .container {
    width: min(100% - 30px, 520px);
  }

  .topbar {
    height: 66px;
  }

  .brand {
    font-size: 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-whatsapp {
    display: none;
  }

  .cart-button {
    padding: 9px 11px;
    font-size: 12px;
    gap: 6px;
  }

  .hero-content {
    min-height: auto;
    padding-top: 58px;
    padding-bottom: 52px;
  }

  .hero-decoration {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .catalog-section {
    padding-top: 50px;
    padding-bottom: 55px;
  }

  .section-heading {
    align-items: start;
  }

  .product-count {
    font-size: 11px;
    white-space: nowrap;
    padding-top: 30px;
  }

  .catalog-tools {
    flex-direction: column;
  }

  .catalog-tools select {
    height: 46px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .product-info p {
    font-size: 11px;
  }

  .product-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-bottom strong {
    font-size: 16px;
  }

  .product-actions {
    gap: 6px;
  }

  .product-actions button {
    min-height: 39px;
    padding: 9px 3px;
    font-size: 11px;
  }

  .contact-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-content h2 {
    font-size: 25px;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  /* CARRINHO NO CELULAR */

  .cart-drawer {
    width: 100%;
  }

  .cart-header {
    padding: 20px;
  }

  .cart-items {
    padding: 15px 20px;
  }

  .cart-footer {
    padding: 18px 20px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .cart-item-image {
    width: 72px;
    height: 72px;
  }
}

/* ==========================================
   TELAS PEQUENAS
========================================== */

@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .product-info {
    padding: 9px;
  }

  .product-info h3 {
    font-size: 12px;
  }

  .product-actions {
    gap: 5px;
  }

  .product-actions button {
    font-size: 10px;
    padding: 8px 2px;
  }
}

.product-info p:empty {
  display: none;
}

.product-info h3 {
  margin-bottom: 6px;
}

.product-bottom {
  margin-top: 8px;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 35px 0;
}

.pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ==========================================
   VISUALIZADOR DE IMAGEM
========================================== */

.product-photo {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.image-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
}

.image-lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  border: none;
  background: transparent;
  color: white;
  font-size: 38px;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 600px) {
  .image-lightbox {
    padding: 10px;
  }

  .image-lightbox img {
    max-height: 85vh;
  }
}
