:root{
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 18px;
  --accent: #22c55e;
  --accent-2: #2563eb;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }

.catalog-no-scroll{ overflow: hidden; }

.catalog-body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.catalog-container{
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.catalog-header{
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.catalog-header-inner{
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}
@media (max-width: 920px){
  .catalog-header-inner{
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.catalog-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.catalog-brand-logo{
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}
.catalog-brand-mark{
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.catalog-brand-mark{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-search{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
}
.catalog-search-input{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 4px 8px;
}
.catalog-search-button{
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  background: var(--accent);
  color: #052e16;
  cursor: pointer;
}
.catalog-search-button:hover{ filter: brightness(0.98); }

.catalog-admin-link{
  justify-self: end;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.catalog-admin-link:hover{ color: var(--text); }
@media (max-width: 920px){
  .catalog-admin-link{ justify-self: start; }
}

/* Lightbox (produto) */
.catalog-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.catalog-lightbox-backdrop{
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.75);
}
.catalog-lightbox-inner{
  position: relative;
  width: min(1100px, calc(100% - 24px));
  margin: 28px auto;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}
.catalog-lightbox-image{
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 12px;
  background: #0b1220;
}
.catalog-lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  font-size: 22px;
  cursor: pointer;
}
.catalog-lightbox-nav{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  font-size: 28px;
  cursor: pointer;
}
.catalog-lightbox-nav:hover,
.catalog-lightbox-close:hover{ filter: brightness(1.06); }
.catalog-lightbox-meta{
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 4px;
  color: rgba(226, 232, 240, 0.85);
  font-size: 12px;
}
.catalog-lightbox-trigger{
  display: block;
  cursor: zoom-in;
}

.catalog-main{
  padding: 28px 0 40px;
  flex: 1;
}
.catalog-grid{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
}
@media (max-width: 920px){
  .catalog-grid{
    grid-template-columns: 1fr;
  }
}

.catalog-sidebar{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  height: fit-content;
}
.catalog-sidebar-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}
.catalog-categories{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.catalog-category-item{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}
.catalog-category-item:hover{
  background: var(--surface-2);
  color: var(--text);
}
.catalog-category-item.is-active{
  background: rgba(34, 197, 94, 0.12);
  color: #14532d;
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.catalog-content{
  min-width: 0;
}
.catalog-page-title h1{
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}
.catalog-page-subtitle{
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.catalog-category-description{
  margin-top: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.catalog-cards{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1100px){
  .catalog-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .catalog-cards{ grid-template-columns: 1fr; }
}

.catalog-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.catalog-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.12);
}
.catalog-card-image{
  background: #e5e7eb;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.catalog-card-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-card-image-empty{
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.catalog-card-body{
  padding: 14px 14px 16px;
}
.catalog-card-title{
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}
.catalog-card-category{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.catalog-card-price{
  margin-top: 8px;
  color: var(--accent);
  font-weight: 900;
}
.catalog-card-desc{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.catalog-empty{
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted);
}

.catalog-breadcrumb{
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.catalog-breadcrumb a:hover{ color: var(--text); }
.catalog-breadcrumb .is-current{ color: var(--text); font-weight: 800; }

.catalog-product{
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 920px){
  .catalog-product{
    grid-template-columns: 1fr;
  }
}
.catalog-product-main{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.catalog-product-main img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-product-thumbs{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 920px){
  .catalog-product-thumbs{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.catalog-thumb{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.catalog-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-product-title{
  margin: 0;
  font-size: 26px;
  font-weight: 950;
}
.catalog-product-meta{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}
.catalog-product-price{
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #14532d;
  font-weight: 950;
}
.catalog-product-description{
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  box-shadow: var(--shadow);
  line-height: 1.45;
}
.catalog-product-description.is-empty{
  color: var(--muted);
}
.catalog-product-description p{ margin: 0 0 10px; }
.catalog-product-description p:last-child{ margin-bottom: 0; }
.catalog-product-description a{ color: var(--accent-2); text-decoration: underline; }
.catalog-product-description ul{ margin: 10px 0 10px 18px; }
.catalog-product-description li{ margin: 4px 0; }

.catalog-product-note{
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #eef2ff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1e3a8a;
  font-weight: 650;
}

.catalog-footer{
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.catalog-footer-inner{
  padding: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-cookie{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.catalog-cookie-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}
@media (max-width: 720px){
  .catalog-cookie-inner{
    flex-direction: column;
    align-items: stretch;
  }
}
.catalog-cookie-text{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.catalog-cookie-button{
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 13px;
  background: var(--accent-2);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}
.catalog-cookie-button:hover{
  filter: brightness(0.98);
}
