/* ======================================================
  ANIMAIS & CIA - LOJA COMPLETA / MERCADO STYLE
====================================================== */

:root {
  --green-dark: #006b22;
  --green-main: #0a9238;
  --green-mid: #13a947;
  --green-light: #d9f4df;
  --green-soft: #f0faf2;
  --green-ultra: #f7fcf8;
  --text: #24402b;
  --muted: #6b7d70;
  --white: #ffffff;
  --danger: #ff3b3b;
  --yellow: #ffbf2f;
  --ink: #102717;
  --page: #f5f8f6;
  --border: rgba(0, 107, 34, 0.1);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  --soft-shadow: 0 8px 22px rgba(0, 0, 0, 0.045);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--page);
  color: var(--text);
  overflow-x: hidden;
}

body.cart-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button { cursor: pointer; }
i { line-height: 1; }

.section-container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 18px;
}

.section-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 950;
}

.section-pill.light { background: #fff; box-shadow: var(--soft-shadow); }

/* HEADER */

.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
}

.top-strip {
  display: none;
  background: var(--green-dark);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 32px;
  justify-content: center;
  gap: 28px;
}

.top-strip span { display: inline-flex; align-items: center; gap: 7px; }

.header-main {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  min-height: 74px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center;
  gap: 14px;
}

.brand img { width: auto; max-width: 116px; max-height: 58px; object-fit: contain; }

.header-search {
  display: none;
  height: 54px;
  align-items: center;
  gap: 11px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(10,146,56,.14);
  box-shadow: 0 12px 28px rgba(10,146,56,.08), 0 4px 12px rgba(0,0,0,.035);
}

.header-search:focus-within {
  border-color: rgba(10,146,56,.5);
  box-shadow: 0 18px 38px rgba(10,146,56,.13), 0 0 0 5px rgba(10,146,56,.08);
}

.header-search i { color: var(--green-main); }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-weight: 800; color: var(--text); }
.header-search button { height: 42px; border: 0; border-radius: 999px; background: var(--green-main); color: white; font-weight: 950; padding: 0 18px; }

.header-actions { display: none; align-items: center; gap: 10px; }
.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 14px; font-weight: 950; }
.mobile-back-link { display: none; }
.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--green-main);
  color: #fff;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(10,146,56,.22);
}

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 950;
}

.mobile-cart {
  justify-self: end;
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--green-main);
  color: #fff;
  display: grid;
  place-items: center;
}
.mobile-cart .cart-count { position: absolute; top: -7px; right: -7px; border: 2px solid #fff; }

.mobile-search-wrap { padding: 0 18px 14px; }
.mobile-search {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid rgba(10,146,56,.14);
  border-radius: 999px;
  padding: 0 15px;
  box-shadow: 0 8px 18px rgba(10,146,56,.07);
}
.mobile-search i { color: var(--green-main); }
.mobile-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-weight: 800; color: var(--text); }

/* HERO */

.store-hero {
  background: radial-gradient(circle at 90% 0%, rgba(10,146,56,.08), transparent 28%), linear-gradient(180deg, #fff 0%, #f7fcf8 100%);
  border-bottom: 1px solid var(--border);
}

.store-hero-grid { padding-top: 34px; padding-bottom: 34px; display: grid; gap: 20px; }
.hero-copy { display: grid; gap: 13px; justify-items: center; text-align: center; }
.hero-copy h1 { color: var(--ink); font-size: 34px; line-height: 1.02; letter-spacing: -1px; font-weight: 950; max-width: 680px; }
.hero-copy p { color: var(--muted); font-size: 15px; line-height: 1.45; font-weight: 750; max-width: 620px; }
.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--soft-shadow);
  text-align: center;
}
.hero-card span { color: var(--green-main); font-size: 13px; font-weight: 950; }
.hero-card strong { display: block; color: var(--ink); font-size: 22px; font-weight: 950; margin-top: 8px; }
.hero-card p { color: var(--muted); font-size: 14px; line-height: 1.4; font-weight: 750; margin-top: 8px; }

/* SHOP */

.shop-section { padding: 34px 0 78px; }
.shop-layout { display: grid; gap: 20px; }
.filters-panel { display: none; }

.mobile-category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin: 0 -18px 20px;
  padding: 0 18px 4px;
  scrollbar-width: none;
}
.mobile-category-scroll::-webkit-scrollbar { display: none; }

.category-filter, .price-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0,0,0,.035);
}
.category-filter.active, .price-chip.active { background: var(--green-main); color: #fff; border-color: var(--green-main); box-shadow: 0 10px 22px rgba(10,146,56,.18); }

.products-area { min-width: 0; }
.products-toolbar {
  display: grid;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 18px;
}
.products-toolbar h2 { color: var(--ink); font-size: 26px; line-height: 1.05; font-weight: 950; margin-top: 10px; }
.products-toolbar p { color: var(--muted); font-size: 14px; font-weight: 800; margin-top: 5px; }
.toolbar-controls { display: grid; gap: 10px; }
.toolbar-controls select, .clear-button {
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--green-soft);
  color: var(--text);
  padding: 0 15px;
  font-weight: 900;
  outline: 0;
}
.clear-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--green-dark); }

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

.product-card {
  background: #fff;
  border: 1px solid rgba(0,107,34,.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(0,0,0,.045);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  contain: layout paint style;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-image { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 30%, rgba(217,244,223,.9), transparent 52%), var(--green-soft); overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-badge { position: absolute; left: 9px; top: 9px; background: rgba(255,255,255,.94); color: var(--green-dark); font-size: 10px; font-weight: 950; padding: 5px 8px; border-radius: 999px; box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.product-content { padding: 12px; display: flex; flex-direction: column; flex: 1; min-height: 178px; }
.product-category { color: var(--green-main); font-size: 10px; font-weight: 950; text-transform: uppercase; letter-spacing: .35px; margin-bottom: 6px; }
.product-card h3 { color: var(--ink); font-size: 13.5px; line-height: 1.2; font-weight: 950; min-height: 48px; }
.product-desc { margin-top: 7px; color: var(--muted); font-size: 11.5px; line-height: 1.32; font-weight: 700; min-height: 45px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rating { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--yellow); font-size: 10px; }
.rating span { color: var(--muted); font-weight: 900; }
.price-row { margin-top: auto; padding-top: 9px; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.price { color: var(--green-dark); font-size: 18px; font-weight: 950; }
.old-price { color: #9aa89e; font-size: 11px; font-weight: 800; text-decoration: line-through; }
.add-cart-btn { width: 100%; margin-top: 10px; border: 0; border-radius: 999px; background: var(--green-main); color: #fff; min-height: 39px; padding: 0 8px; font-size: 12px; font-weight: 950; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.empty-state { text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 26px; padding: 42px 20px; box-shadow: var(--soft-shadow); }
.empty-state i { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 22px; background: var(--green-soft); color: var(--green-main); font-size: 26px; margin: 0 auto 16px; }
.empty-state h3 { color: var(--ink); font-size: 22px; font-weight: 950; }
.empty-state p { color: var(--muted); font-weight: 750; margin-top: 7px; }

.load-more-wrap { display: grid; justify-items: center; margin-top: 26px; }
.load-more-btn { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--green-dark); font-weight: 950; box-shadow: var(--soft-shadow); }

/* CART */

.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.36); z-index: 190; opacity: 0; visibility: hidden; transition: .24s ease; }
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 200; height: 100vh; width: min(92vw, 430px); background: #fff; box-shadow: -18px 0 45px rgba(0,0,0,.14); transform: translateX(110%); transition: transform .28s ease; display: flex; flex-direction: column; }
.cart-drawer.active { transform: translateX(0); }
.cart-head { padding: 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.cart-head span { color: var(--green-main); font-size: 13px; font-weight: 950; }
.cart-head h2 { color: var(--ink); font-size: 26px; font-weight: 950; }
.cart-close { width: 42px; height: 42px; border: 0; background: var(--green-soft); color: var(--green-dark); border-radius: 14px; display: grid; place-items: center; }
.cart-items { flex: 1; overflow-y: auto; padding: 0 22px; }
.cart-item { display: grid; grid-template-columns: 70px 1fr; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 70px; height: 70px; border-radius: 18px; background: var(--green-soft); overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h3 { color: var(--ink); font-size: 15px; line-height: 1.2; font-weight: 950; margin-bottom: 5px; }
.cart-item-info p { color: var(--green-dark); font-weight: 950; font-size: 14px; }
.cart-item-actions { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty-control { display: inline-flex; align-items: center; background: var(--green-soft); border-radius: 999px; padding: 4px; }
.qty-control button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; color: var(--green-dark); font-weight: 950; }
.qty-control strong { width: 28px; text-align: center; font-size: 14px; }
.remove-item { border: 0; background: transparent; color: var(--danger); font-weight: 950; font-size: 13px; }
.cart-empty { display: none; flex: 1; place-items: center; text-align: center; padding: 40px; }
.cart-empty.active { display: grid; }
.cart-empty i { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 24px; background: var(--green-soft); color: var(--green-main); font-size: 30px; margin-bottom: 16px; }
.cart-empty h3 { color: var(--ink); font-size: 22px; font-weight: 950; }
.cart-empty p { color: var(--muted); font-size: 15px; margin-top: 8px; line-height: 1.4; font-weight: 700; }
.cart-bottom { border-top: 1px solid var(--border); padding: 20px 22px 22px; }
.cart-total-line { display: flex; justify-content: space-between; align-items: center; }
.cart-total-line span { color: var(--muted); font-weight: 800; }
.cart-total-line strong { color: var(--green-dark); font-size: 23px; font-weight: 950; }
.cart-note { color: var(--muted); font-size: 13px; line-height: 1.35; font-weight: 700; margin: 10px 0 16px; }
.checkout-btn { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: var(--green-main); color: #fff; font-weight: 950; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.checkout-btn:disabled { opacity: .5; cursor: not-allowed; }
.clear-cart-btn { width: 100%; border: 0; background: transparent; color: var(--muted); font-weight: 950; margin-top: 11px; padding: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 120px); z-index: 250; background: var(--ink); color: #fff; border-radius: 999px; padding: 13px 18px; font-size: 14px; font-weight: 950; box-shadow: 0 18px 38px rgba(0,0,0,.2); transition: .26s ease; opacity: 0; pointer-events: none; max-width: calc(100vw - 30px); white-space: nowrap; }
.toast.active { transform: translate(-50%, 0); opacity: 1; }

.footer { background: #053d17; color: rgba(255,255,255,.8); padding: 28px 0; }
.footer-inner { display: grid; gap: 6px; text-align: center; }
.footer p { font-size: 13px; font-weight: 700; line-height: 1.4; }


/* MOBILE MARKETPLACE HEADER */

@media (max-width: 768px) {
  .shop-header {
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.055);
  }

  .top-strip,
  .brand,
  .mobile-cart,
  .mobile-search-wrap {
    display: none !important;
  }

  .header-main {
    min-height: 62px;
    padding: 9px 12px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-back-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--green-dark);
    background: var(--green-soft);
    border: 1px solid rgba(0, 107, 34, 0.08);
    font-size: 17px;
  }

  .header-search {
    height: 44px;
    display: flex;
    gap: 9px;
    padding: 0 14px;
    border-radius: 999px;
    border: 2px solid rgba(10, 146, 56, 0.16);
    box-shadow: 0 8px 18px rgba(10, 146, 56, 0.07);
  }

  .header-search button {
    display: none;
  }

  .header-search input {
    font-size: 14px;
    font-weight: 800;
  }

  .header-search input::placeholder {
    color: rgba(107, 125, 112, 0.78);
  }

  .store-hero {
    display: none;
  }

  .shop-section {
    padding-top: 18px;
  }
}

/* DESKTOP */

@media (min-width: 769px) {
  .section-container { padding: 0 32px; }
  .top-strip { display: flex; }
  .header-main { min-height: 86px; padding: 0 32px; grid-template-columns: 150px minmax(320px, 1fr) auto; gap: 24px; }
  .brand img { max-width: 145px; max-height: 70px; }
  .header-search { display: flex; }
  .header-actions { display: flex; }
  .mobile-cart, .mobile-search-wrap, .mobile-back-link { display: none; }

  .store-hero-grid { padding-top: 54px; padding-bottom: 54px; grid-template-columns: 1fr 360px; align-items: center; }
  .hero-copy { justify-items: start; text-align: left; }
  .hero-copy h1 { font-size: 50px; letter-spacing: -1.8px; }
  .hero-copy p { font-size: 18px; }
  .hero-card { text-align: left; border-radius: 30px; padding: 28px; }

  .shop-section { padding: 46px 0 96px; }
  .shop-layout { grid-template-columns: 260px 1fr; align-items: start; gap: 24px; }
  .filters-panel { display: block; position: sticky; top: 126px; background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 20px; box-shadow: var(--soft-shadow); }
  .filter-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
  .filter-head strong { color: var(--ink); font-size: 20px; font-weight: 950; }
  .filter-head button { border: 0; background: transparent; color: var(--green-dark); font-weight: 900; }
  .filter-group + .filter-group { margin-top: 24px; }
  .filter-group h2 { color: var(--ink); font-size: 15px; font-weight: 950; margin-bottom: 10px; }
  .filter-group .category-filter, .filter-group .price-chip { width: 100%; justify-content: flex-start; margin-bottom: 8px; box-shadow: none; }
  .mobile-category-scroll { display: none; }

  .products-toolbar { grid-template-columns: 1fr auto; align-items: end; border-radius: 30px; padding: 24px; }
  .products-toolbar h2 { font-size: 34px; }
  .toolbar-controls { grid-template-columns: 190px 110px; align-items: center; }
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .product-card { border-radius: 28px; box-shadow: var(--soft-shadow); }
  .product-card:hover { transform: translateY(-5px); border-color: rgba(10,146,56,.22); box-shadow: 0 16px 36px rgba(0,0,0,.075); }
  .product-content { padding: 18px; min-height: 214px; }
  .product-card h3 { font-size: 17px; min-height: 44px; }
  .product-desc { font-size: 13px; line-height: 1.4; min-height: 56px; }
  .price { font-size: 23px; }
  .add-cart-btn { min-height: 44px; font-size: 14px; }
  .load-more-btn { min-width: 220px; }
  .footer-inner { grid-template-columns: 1fr auto; text-align: left; align-items: center; }
}

@media (min-width: 1080px) {
  .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .section-container { padding: 0 14px; }
  .products-grid { gap: 10px; }
  .product-content { min-height: 174px; padding: 11px; }
  .product-card h3 { font-size: 13px; }
  .product-desc { font-size: 11px; }
  .price { font-size: 17px; }
}

@supports (content-visibility: auto) {
  .product-card { content-visibility: auto; contain-intrinsic-size: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================================================
  LISTAGEM SEM BOTÃO ADICIONAR
  O card inteiro leva para a página do produto.
====================================================== */

.product-card {
  cursor: pointer;
}

.product-card .add-cart-btn {
  display: none !important;
}

.card-open-hint {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 950;
}

.card-open-hint::after {
  content: "›";
  margin-left: 5px;
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 768px) {
  .product-content {
    min-height: 148px;
  }

  .card-open-hint {
    font-size: 11.5px;
    margin-top: 8px;
  }
}

@media (min-width: 769px) {
  .product-content {
    min-height: 184px;
  }

  .card-open-hint {
    font-size: 13px;
  }
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.load-more-btn,
#loadMoreBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  min-height: 58px;
  padding: 0 32px;

  line-height: 1;
  vertical-align: middle;
}

.load-more-btn i,
#loadMoreBtn i {
  line-height: 1;
}
