/* Vitrine compacta · 11/11/2026
   Última folha da loja: sobrescreve estilos legados somente no catálogo.
   Não altera preços, disponibilidade, variações ou fluxo de compra. */

body.shop-manto #shop-product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 13px;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
}
body.shop-manto #shop-product-grid > [hidden] { display: none !important; }

body.shop-manto #shop-product-grid > :is(.shop-product-card, .atelier-catalog) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 1px solid #d6c9b2;
  border-radius: 11px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 5px 16px rgba(11, 25, 42, .065);
}
@media (hover: hover) and (pointer: fine) {
  body.shop-manto #shop-product-grid > :is(.shop-product-card, .atelier-catalog):hover {
    transform: translateY(-2px);
    border-color: #bda16c;
    box-shadow: 0 12px 24px rgba(11, 25, 42, .13);
  }
}

/* Foto mais baixa sem cortar o produto: retratos e canecas se mantêm inteiros. */
body.shop-manto #shop-product-grid :is(.shop-product-image, .atelier-product-art) {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #ded5c5;
  border-radius: 0;
  background: #e9e3d9;
}
body.shop-manto #shop-product-grid :is(.shop-product-image, .atelier-product-art)::after {
  inset: 7px;
  border-color: rgba(255, 250, 240, .4);
}
body.shop-manto #shop-product-grid :is(.shop-product-image, .atelier-product-art) img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}
body.shop-manto #shop-product-grid .atelier-product-link {
  display: block;
  width: 100%;
  height: 100%;
}
body.shop-manto #shop-product-grid .shop-product-badge {
  top: 7px;
  left: 7px;
  right: auto;
  bottom: auto;
  max-width: calc(100% - 14px);
  padding: 4px 7px;
  border: 1px solid rgba(220, 191, 133, .7);
  border-radius: 4px;
  background: rgba(18, 45, 69, .94);
  color: #fff1d9;
  box-shadow: 0 2px 7px rgba(11, 25, 42, .11);
  font: 600 9px/1.25 'Inter', Arial, sans-serif;
}

/* Texto, preço e ações compõem um único bloco compacto. */
body.shop-manto #shop-product-grid :is(.shop-product-info, .atelier-product-copy) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  padding: 10px 11px 11px;
  background: #fffdf8;
  color: #1b3148;
}
body.shop-manto #shop-product-grid :is(.shop-product-info h3, .atelier-product h3) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-height: 38px;
  max-height: 38px;
  margin: 0 0 5px;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #1a3049;
  font: 600 16px/1.19 'Spectral', Georgia, serif;
  letter-spacing: -.012em;
}
body.shop-manto #shop-product-grid h3 a:hover { color: #95743e; }
body.shop-manto #shop-product-grid .shop-product-collection {
  margin-bottom: 3px;
  color: #90723c;
  font-size: 8px;
  line-height: 1.35;
}
body.shop-manto #shop-product-grid .shop-product-variation {
  gap: 3px;
  min-height: 0;
  margin: 0 0 4px;
  font-size: 10px;
}
body.shop-manto #shop-product-grid .shop-product-variation > span {
  padding: 2px 4px;
  font-size: 9px;
}
body.shop-manto #shop-product-grid .shop-price {
  display: block;
  flex: 0 0 auto;
  margin: auto 0 5px;
  min-height: 0;
  padding: 6px 0 0;
  border-top: 1px solid #e7dece;
}
body.shop-manto #shop-product-grid .shop-price small {
  margin: 0 0 1px;
  font-size: 9px;
  line-height: 1.3;
}
body.shop-manto #shop-product-grid .shop-price strong {
  color: #173754;
  font: 650 19px/1.17 'Spectral', Georgia, serif;
  letter-spacing: -.01em;
}
body.shop-manto #shop-product-grid .shop-price strong span {
  display: inline;
  white-space: nowrap;
  color: #697783;
  font: 400 10px/1.3 'Inter', Arial, sans-serif;
}

/* Mantém o tamanho no próprio card, mas sem criar linhas vazias. */
body.shop-manto #shop-product-grid .shop-cart-size {
  display: flex !important;
  order: 1;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 38px;
  margin: 1px 0 5px;
  color: #46566a;
  font: 600 10px/1.3 'Inter', Arial, sans-serif;
}
body.shop-manto #shop-product-grid .shop-cart-size select {
  flex: 0 1 76px;
  min-width: 60px;
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 5px 5px;
  border: 1px solid #c7b99f;
  border-radius: 6px;
  background: #fffdfa;
  color: #1a354e;
  font: 600 14px/1.3 'Inter', Arial, sans-serif;
  color-scheme: light;
}
body.shop-manto #shop-product-grid .shop-cart-add,
body.shop-manto #shop-product-grid a.atelier-buy-primary {
  display: flex !important;
  order: 2;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 42px;
  margin: auto 0 0;
  padding: 7px 7px;
  border: 1px solid #173754;
  border-radius: 7px;
  background: #173754;
  color: #fffbf2;
  box-shadow: none;
  font: 650 11px/1.3 'Inter', Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}
body.shop-manto #shop-product-grid .shop-cart-add:hover:not(:disabled),
body.shop-manto #shop-product-grid a.atelier-buy-primary:hover {
  background: #244f77;
  border-color: #244f77;
  color: #fffbf2;
}
body.shop-manto #shop-product-grid .shop-product-action,
body.shop-manto #shop-product-grid .atelier-product .shop-product-action {
  display: flex;
  order: 3;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: stretch;
  width: 100%;
  min-height: 31px;
  margin: 2px 0 0;
  padding: 3px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #36536b;
  box-shadow: none;
  font: 600 10px/1.3 'Inter', Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}
body.shop-manto #shop-product-grid .shop-product-action:hover {
  border: 0;
  background: transparent;
  color: #9b753b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* O livro ocupa o mesmo formato, conservando sua compra na editora parceira. */
body.shop-manto #shop-product-grid :is(.atelier-grid, .atelier-product) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
body.shop-manto #shop-product-grid .atelier-product-copy::before {
  margin-bottom: 3px;
  color: #90723c;
  font-size: 8px;
}
body.shop-manto #shop-product-grid .atelier-product-author {
  margin: 0 0 6px;
  color: #65717b;
  font-size: 10px;
  line-height: 1.3;
}
body.shop-manto #shop-product-grid .atelier-product-purchase {
  display: block !important;
  order: 2;
  margin: auto 0 0;
  padding: 0;
  border: 0;
}
body.shop-manto #shop-product-grid .atelier-retailers { gap: 0; }
body.shop-manto #shop-product-grid .atelier-product .shop-product-action {
  margin-top: 2px;
}

/* Barra de ações ocultas no estilo editorial; funcionalidades mantidas no checkout. */
body.shop-manto #shop-product-grid :is(.shop-cart-quick, .shop-cart-buy-now, .shop-product-state) {
  display: none !important;
}
body.shop-manto #shop-product-grid :is(a, button, select):focus-visible {
  outline: 3px solid #b58b49;
  outline-offset: 2px;
}

@media (min-width: 1900px) {
  body.shop-manto #shop-product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  body.shop-manto #shop-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 11px; }
}
@media (max-width: 940px) {
  body.shop-manto #shop-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body.shop-manto #shop-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 9px;
    max-width: none;
    margin: 0;
  }
  body.shop-manto #shop-product-grid > :is(.shop-product-card, .atelier-catalog) {
    border-radius: 9px;
  }
  body.shop-manto #shop-product-grid :is(.shop-product-image, .atelier-product-art) {
    aspect-ratio: 6 / 5;
  }
  body.shop-manto #shop-product-grid :is(.shop-product-info, .atelier-product-copy) {
    padding: 9px 8px 9px;
  }
  body.shop-manto #shop-product-grid :is(.shop-product-info h3, .atelier-product h3) {
    min-height: 35px;
    max-height: 35px;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.16;
  }
  body.shop-manto #shop-product-grid .shop-price { margin-bottom: 4px; }
  body.shop-manto #shop-product-grid .shop-price strong { font-size: 18px; }
  body.shop-manto #shop-product-grid .shop-price strong span {
    display: block;
    margin-top: 1px;
    font-size: 9px;
  }
  body.shop-manto #shop-product-grid .shop-product-badge {
    top: 6px;
    left: 6px;
    max-width: calc(100% - 12px);
    padding: 3px 5px;
    font-size: 8px;
  }
  body.shop-manto #shop-product-grid .shop-cart-size {
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 40px;
    margin: 0 0 4px;
    font-size: 10px;
  }
  body.shop-manto #shop-product-grid .shop-cart-size select {
    flex-basis: 65px;
    min-width: 52px;
    min-height: 40px;
    height: 40px;
    padding: 4px;
    font-size: 16px;
  }
  body.shop-manto #shop-product-grid .shop-cart-add,
  body.shop-manto #shop-product-grid a.atelier-buy-primary {
    min-height: 44px;
    margin-top: auto;
    padding: 7px 4px;
    font-size: 10px;
  }
  body.shop-manto #shop-product-grid .shop-product-action,
  body.shop-manto #shop-product-grid .atelier-product .shop-product-action {
    min-height: 34px;
    margin-top: 0;
    padding: 5px 0;
    font-size: 10px;
  }
}
@media (max-width: 359px) {
  /* Mesmo em 320 px, duas colunas mais enxutas em vez de cartões gigantes. */
  body.shop-manto #shop-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 7px;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  body.shop-manto #shop-product-grid :is(.shop-product-info, .atelier-product-copy) { padding: 8px 6px; }
  body.shop-manto #shop-product-grid :is(.shop-product-info h3, .atelier-product h3) {
    min-height: 34px;
    max-height: 34px;
    font-size: 14px;
  }
  body.shop-manto #shop-product-grid .shop-cart-size { font-size: 9px; }
  body.shop-manto #shop-product-grid .shop-cart-size select { min-width: 48px; flex-basis: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  body.shop-manto #shop-product-grid > :is(.shop-product-card, .atelier-catalog),
  body.shop-manto #shop-product-grid :is(.shop-product-image, .atelier-product-art) img {
    transition: none;
  }
}


/* Vitrine enxuta: os detalhes e a seleção de tamanho ficam na página do produto. */
body.shop-manto #shop-product-grid {
  gap: 12px 10px;
}
body.shop-manto #shop-product-grid :is(.shop-product-image,.atelier-product-art){
  aspect-ratio: 7 / 5;
}
body.shop-manto #shop-product-grid :is(.shop-product-info,.atelier-product-copy){
  padding: 9px 10px 10px;
}
body.shop-manto #shop-product-grid :is(.shop-product-info h3,.atelier-product h3){
  min-height: 34px;max-height:34px;
  margin-bottom:4px;
  font-size:15px;line-height:1.17;
}
body.shop-manto #shop-product-grid .shop-price{
  margin:auto 0 5px;padding-top:5px;
}
body.shop-manto #shop-product-grid .shop-price strong{font-size:18px;}
body.shop-manto #shop-product-grid :is(.shop-cart-add,a.shop-cart-choose){
  display:flex !important;align-items:center;justify-content:center;
  min-height:37px;
  margin-top:auto;padding:6px 8px;
  border-radius:6px;
  color:#fffaf2;text-decoration:none;
  font:650 11px/1.3 'Inter',Arial,sans-serif;
}
body.shop-manto #shop-product-grid a.shop-cart-choose:hover {
  background:#244f77;color:#fffaf2;
}
body.shop-manto #shop-product-grid :is(.shop-cart-size,.shop-product-action){
  display:none !important;
}
@media(min-width:1400px){
  body.shop-manto #shop-product-grid {grid-template-columns:repeat(6,minmax(0,1fr));}
}
@media(min-width:1100px) and (max-width:1399px){
  body.shop-manto #shop-product-grid {grid-template-columns:repeat(5,minmax(0,1fr));}
}
@media(min-width:800px) and (max-width:1099px){
  body.shop-manto #shop-product-grid {grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media(min-width:701px) and (max-width:799px){
  body.shop-manto #shop-product-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:700px){
  body.shop-manto #shop-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;}
  body.shop-manto #shop-product-grid :is(.shop-product-image,.atelier-product-art){aspect-ratio:6 / 5;}
  body.shop-manto #shop-product-grid :is(.shop-product-info,.atelier-product-copy){padding:8px 8px 9px;}
  body.shop-manto #shop-product-grid :is(.shop-product-info h3,.atelier-product h3){font-size:14px;min-height:34px;max-height:34px;}
  body.shop-manto #shop-product-grid .shop-price strong{font-size:17px;}
  body.shop-manto #shop-product-grid :is(.shop-cart-add,a.shop-cart-choose){min-height:40px;font-size:10px;padding:6px 5px;}
}
@media(max-width:359px){
  body.shop-manto #shop-product-grid :is(.shop-product-info h3,.atelier-product h3){font-size:13px;}
  body.shop-manto #shop-product-grid .shop-price strong{font-size:16px;}
  body.shop-manto #shop-product-grid :is(.shop-cart-add,a.shop-cart-choose){font-size:9.5px;}
}
