@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700&family=Source+Sans+3:wght@400;600&family=JetBrains+Mono:wght@400;500&display=swap");
@import "./themes.css";

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}

h1,
h2,
h3 {
  font-family: "Outfit", system-ui, sans-serif;
  margin: 0;
}

.num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.micro {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  margin: 0;
}

.img-placeholder {
  background-image: repeating-linear-gradient(45deg, var(--soft) 0 10px, var(--card) 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* ---------- layout raiz (App.shell) ---------- */
#app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.announcement {
  flex: none;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 20px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 12.5px;
  overflow-x: auto;
  white-space: nowrap;
}
.announcement .sep {
  opacity: 0.5;
}

header.site-header {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: 12px 20px;
}
.logo {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  flex: none;
}
.logo span {
  color: var(--brand);
}
.search-form {
  flex: 1;
  min-width: 200px;
  order: 3;
}
.search-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 16px;
  outline: none;
}
.search-form input:focus {
  border-color: var(--brand);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  height: 36px;
  width: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--soft);
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.pill-link:hover {
  background: var(--soft);
}
.avatar {
  height: 28px;
  width: 28px;
  border-radius: 999px;
  background: var(--soft);
  border: 2px solid var(--card);
  outline: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

nav.category-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: 8px 20px;
}
.cat-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  min-width: 0;
  flex: 1;
}
.cat-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  border: 1px solid transparent;
}
.cat-pill:hover {
  background: var(--soft);
}
.cat-pill.active {
  color: var(--accent);
  border-color: var(--brand);
}
.cat-dot {
  height: 22px;
  width: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  flex: none;
  overflow: hidden;
}
.cat-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.body-row {
  flex: 1;
  min-height: 0;
  display: flex;
}
main#main {
  flex: 1;
  overflow-y: auto;
}

footer.site-footer {
  margin-top: 40px;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 24px;
}
.footer-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.footer-grid h4 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 18px;
  color: #fff;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 14px;
}
.footer-grid ul li {
  margin-bottom: 4px;
}

/* ---------- theme switcher popover ---------- */
.theme-switcher {
  position: relative;
}
.theme-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}
.theme-trigger:hover {
  background: var(--soft);
}
.swatch-dot {
  height: 16px;
  width: 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--brand);
}
.theme-popover {
  display: none;
  position: absolute;
  right: 0;
  z-index: 50;
  margin-top: 8px;
  width: 260px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px;
  box-shadow: 0 24px 60px rgba(23, 18, 13, 0.35);
}
.theme-popover.open {
  display: block;
}
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  text-align: left;
}
.theme-option:hover {
  background: var(--soft);
}
.theme-option.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.theme-swatch-trio {
  display: inline-flex;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex: none;
}
.theme-swatch-trio span {
  flex: 1;
}
.mode-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-brand {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn-brand:hover {
  opacity: 0.9;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  opacity: 0.9;
}
.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  background: var(--soft);
}
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: transparent;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-soft {
  background: var(--soft);
  color: var(--ink);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pill {
  border-radius: 999px;
}

/* ---------- qty stepper ---------- */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 4px;
}
.qty-stepper button {
  height: 28px;
  width: 28px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
}
.qty-stepper button:hover {
  background: var(--soft);
}
.qty-stepper span {
  width: 22px;
  text-align: center;
  font-size: 14px;
}

/* ---------- product / service cards ---------- */
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(33, 26, 17, 0.06), 0 8px 24px rgba(33, 26, 17, 0.06);
  overflow: hidden;
}

.product-card {
  display: flex;
  flex-direction: column;
}
.product-card .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--soft);
  display: block;
  overflow: hidden;
}
.product-card .thumb img,
.service-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card .thumb .tag {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.tag-accent {
  background: var(--accent);
}
.tag-dark {
  background: rgba(23, 18, 13, 0.8);
}
.product-card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price {
  font-size: 18px;
  font-weight: 600;
}
.price-strike {
  font-size: 12px;
  color: var(--ink2);
  text-decoration: line-through;
}
.status-ok {
  color: var(--ok);
}
.status-warn {
  color: var(--warn-fg);
}
.status-danger {
  color: var(--danger-fg);
}

.service-card {
  display: flex;
  flex-direction: column;
}
.service-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--soft);
  overflow: hidden;
}
.service-card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.service-card .desc {
  font-size: 12px;
  color: var(--ink2);
}
.service-card .from-price {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- cart drawer ---------- */
#cart-drawer {
  width: 296px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--card);
  display: none;
  flex-direction: column;
}
#cart-drawer.open {
  display: flex;
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}
.cart-header button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink2);
}
.cart-lines {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-line {
  display: flex;
  gap: 10px;
}
.cart-line .thumb {
  height: 46px;
  width: 46px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft);
  flex: none;
}
.cart-line .info {
  min-width: 0;
  flex: 1;
}
.cart-line .name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-line .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.cart-line .remove {
  border: none;
  background: none;
  color: var(--danger-fg);
  cursor: pointer;
  font-size: 15px;
  align-self: flex-start;
}
.cart-footer {
  border-top: 1px solid var(--line);
  padding: 16px;
}
.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-total-row .total {
  font-size: 18px;
  font-weight: 600;
}
#cart-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  display: none;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(23, 18, 13, 0.35);
}
#cart-fab.show {
  display: inline-flex;
}

/* ---------- hero / home ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--deep);
  color: #fff;
  padding: 48px 32px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.1;
  margin-top: 8px;
}
.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-image {
  position: absolute;
  inset: 0 0 0 42%;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--deep) 0%, var(--deep) 32%, rgba(0, 0, 0, 0) 78%);
  pointer-events: none;
}

.promises {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .promises {
    grid-template-columns: repeat(2, 1fr);
  }
}
.promise {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 12px 16px;
  font-size: 14px;
}

section.section {
  margin-top: 40px;
}
section.section h2 {
  font-size: 20px;
  font-weight: 600;
}

.subscribe-banner {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 24px;
}

/* ---------- misc form/detail ---------- */
.field-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 8px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}
.chip:hover {
  background: var(--soft);
}
.chip.active {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--accent);
}
input[type="date"],
input[type="text"],
input[type="email"],
input[type="password"],
select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--brand);
}

.quote-box {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 16px;
  font-size: 14px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-header .avatar-lg {
  height: 48px;
  width: 48px;
  border-radius: 999px;
  background: var(--soft);
  outline: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.account-cards {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 640px) {
  .account-cards {
    grid-template-columns: 1fr;
  }
}
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 16px;
}
.account-card:hover {
  background: var(--soft);
}
.account-card .emoji {
  font-size: 20px;
}

.order-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 16px;
  margin-bottom: 12px;
}
.order-row .top-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink2);
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok {
  background: rgba(47, 122, 73, 0.15);
  color: var(--ok);
}
.badge-warn {
  background: rgba(138, 90, 16, 0.15);
  color: var(--warn-fg);
}
.badge-info {
  background: var(--soft);
  color: var(--ink);
}

.accordion-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
}
.accordion-body {
  padding: 0 18px 18px;
  display: none;
}
.accordion-section.open .accordion-body {
  display: block;
}
.accordion-section.done .accordion-head::after {
  content: "✓";
  color: var(--ok);
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 18px;
  position: sticky;
  top: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}
.summary-total {
  font-size: 20px;
  font-weight: 600;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
}
