:root{
  --bg:#faf9f7;
  --card:#fff;
  --muted:#6b6b6b;
  --accent:#111;
  --zebra-1:#111;
  --zebra-2:#f3f3f3;
}
*{box-sizing:border-box}
html,body{height:100%}
.container{max-width:980px;margin:0 auto;padding:0 18px}
body{
  margin:0;min-height:100vh;font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--accent);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
.container{max-width:980px;margin:0 auto;padding:0 18px}
header{display:flex;flex-direction:column;align-items:center;gap:10px;margin-bottom:12px;text-align:center}
.logo{width:84px;height:84px;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;
  background:repeating-linear-gradient(135deg,var(--zebra-1) 0 8px,var(--zebra-2) 8px 16px);
  box-shadow:0 6px 18px rgba(17,17,17,0.08);
}
.logo h2{margin:0;color:var(--zebra-2);font-size:20px;letter-spacing:1px}
.title{display:flex;flex-direction:column}
.title h1{margin:0;font-size:28px;letter-spacing:1px}
.title p{margin:4px 0 0;color:var(--muted);font-size:14px}
.tabs-wrap{position:sticky;top:0;z-index:30;background:transparent;padding:8px 0}

main{display:block;margin-top:14px}
@media (min-width:801px){
  main{margin-left:auto;margin-right:auto}
}
@media (max-width:800px){main{padding:0 12px}}
.section{background:var(--card);border-radius:12px;padding:18px;box-shadow:0 6px 18px rgba(16,16,16,0.04)}
.section h3{margin:0 0 8px;font-size:18px}
.section .subtitle{color:var(--muted);font-size:13px;margin-bottom:12px}
.item{display:flex;align-items:flex-start;justify-content:space-between;padding:10px 6px;border-top:1px dashed #eee}
.item:first-of-type{border-top:none}
.meta{display:flex;flex-direction:column}
.name{font-weight:600}
.desc{color:var(--muted);font-size:13px;margin-top:6px}
.price{font-weight:700;color:var(--accent);min-width:56px;text-align:right}
.heading-row{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.lang-pt{font-size:14px;color:var(--muted)}
footer{margin-top:18px;color:var(--muted);font-size:13px}

/* small interactive touches */
.section:hover{transform:translateY(-4px);transition:transform .18s ease}
.item:hover{background:linear-gradient(90deg, rgba(0,0,0,0.01), rgba(0,0,0,0.02))}

/* Print friendly */
@media print{
  body{padding:8px;color:#000;background:#fff}
  main{grid-template-columns:1fr}
  .logo{display:none}
  .section{box-shadow:none;border:1px solid #ddd}
}

/* Tabs — centered two-tab layout */
.tabs{
  display:flex;
  gap:12px;
  padding:6px 4px;
  width:100%;
  max-width:640px;     /* keep tabs centered in a reasonable width */
  margin:0 auto;       /* center the tab group */
  justify-content:center;
}
.tab{
  background:#fff;
  border:1px solid rgba(0,0,0,0.06);
  padding:10px 16px;
  border-radius:10px;
  box-shadow:0 4px 10px rgba(0,0,0,0.03);
  flex: 1 1 33%;       /* support three tabs comfortably */
  max-width: calc(33% - 8px);
  text-align:center;
}

/* Grid of 1:1 product cards */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
  margin-top:8px;
}
.card{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  background:var(--card);
  border-radius:10px;
  padding:10px;
  min-height:0;
  box-shadow:0 6px 14px rgba(10,10,10,0.04);
}

/* product links should not look like standard blue links */
.product-link{color:inherit;text-decoration:none;display:block}
.product-link:focus{outline:2px solid rgba(17,17,17,0.12);outline-offset:3px;border-radius:8px}

/* Media area keeps 1:1 aspect ratio */
.media{
  width:100%;
  aspect-ratio:1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, #fafafa, #fff);
  border-radius:8px;
  color:var(--zebra);
  margin-bottom:8px;
}
.media svg{width:48%; height:48%; opacity:.9}

/* If a PNG is provided, fill the media area with the image */
.media img{width:100%;height:100%;object-fit:cover;border-radius:8px;display:block}

/* Body inside card */
.card-body{display:flex;flex-direction:column;gap:6px}
.title{font-weight:600;font-size:15px}
.subtitle.small{font-size:12px;color:var(--muted)}
.detail-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:auto; /* push details to bottom if card grows */
  color:var(--muted);
  font-size:13px;
  direction:ltr; /* ensure price stays on the right */
}
.section .subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 12px;
  text-align: center;
}
.detail{color:var(--muted);flex:1}
.price{font-weight:800;color:var(--accent-2)}

/* Make tab selected style */

.tab[aria-selected="true"]{
  background:linear-gradient(180deg,#fff,#fffbf2);
  border-color:rgba(0,0,0,0.08);
  box-shadow:0 6px 14px rgba(0,0,0,0.06);
}

/* Responsive tweaks */
@media (max-width:520px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .tabs{width:100%;overflow:auto;padding-left:8px}
  .tab{flex: 0 0 auto; max-width:none;}
}

/* Product modal styles */
.product-modal{
  position:fixed;inset:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;z-index:80;
}
.pm-hero{
  position:absolute;inset:0;background-size:cover;background-position:center;filter:brightness(.6) blur(2px);transform:scale(1.02);
}
.pm-card{
  position:relative;background:#fff;border-top-left-radius:18px;border-top-right-radius:18px;padding:22px 18px;max-height:78vh;overflow:auto;box-shadow:0 -14px 40px rgba(0,0,0,0.25);
}
.pm-close{position:absolute;right:14px;top:10px;background:transparent;border:0;font-size:20px;cursor:pointer}
.pm-title{margin:6px 0 4px;font-size:20px}
.pm-sub{color:var(--muted);font-size:13px;margin-bottom:10px}
.pm-desc{color:var(--muted);line-height:1.6;margin-bottom:14px}
.pm-price{font-weight:800;color:var(--accent);font-size:18px}
.product-modal[hidden]{display:none}

/* Product page hero and card (4:3 by default) */
.product-page{max-width:980px;margin:18px auto;padding:0 18px}
.hero{position:relative;width:100%;overflow:hidden;border-bottom-left-radius:12px;border-bottom-right-radius:12px}
.hero-img{width:100%;height:100%;object-fit:cover;display:block}
.hero-fade{position:absolute;inset:0;background:linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.15));pointer-events:none}
.hero-4-3{aspect-ratio:4/3}
.hero-16-9{aspect-ratio:16/9}

.product-card{background:#fff;border-radius:12px;padding:18px;margin-top:12px;box-shadow:0 10px 30px rgba(10,10,10,0.06)}
.product-title{margin:0 0 6px;font-size:22px}
.product-subtitle{color:var(--muted);margin-bottom:10px}
.product-desc{color:var(--muted);line-height:1.6}
.product-meta{display:flex;align-items:center;justify-content:space-between;margin-top:16px}
.btn.back{background:#111;color:#fff;padding:8px 12px;border-radius:8px;text-decoration:none}
.price.large{font-size:20px;font-weight:800}