:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #eef4f3;
    --ink: #172026;
    --muted: #63707a;
    --line: #d9e0e4;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --accent-soft: #dff3ef;
    --warning: #b7791f;
    --danger: #b42318;
    --shadow: 0 12px 32px rgba(23, 32, 38, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.skip-link {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 100;
    transform: translateY(-140%);
    border-radius: 8px;
    background: var(--ink);
    color: #ffffff;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

body.has-open-panel {
    overflow: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.topbar,
main,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--surface);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.06rem;
    line-height: 1.15;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ghost-button,
.cart-button,
.primary-button,
.secondary-button,
.icon-button,
.tab,
.category-button,
.gallery-nav {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ghost-button,
.cart-button,
.primary-button,
.secondary-button,
.category-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    font-weight: 700;
}

.ghost-button:hover,
.cart-button:hover,
.secondary-button:hover,
.category-button:hover,
.icon-button:hover,
.gallery-nav:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.primary-button {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.primary-button:disabled {
    border-color: var(--line);
    background: #b8c2c8;
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
}

.secondary-button {
    background: var(--accent-soft);
    border-color: #b9dfd8;
    color: var(--accent-strong);
}

.cart-button strong {
    min-width: 26px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.86rem;
}

.store-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: start;
    padding: 42px 0 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 12px;
    font-size: 3.4rem;
    line-height: 0.98;
    letter-spacing: 0;
}

.intro-text {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.catalog-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    min-width: 360px;
}

.catalog-stats div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.catalog-stats strong,
.catalog-stats span {
    display: block;
}

.catalog-stats strong {
    font-size: 1.45rem;
}

.catalog-stats span {
    color: var(--muted);
    font-size: 0.82rem;
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 2px 0 24px;
}

.trust-strip article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 14px;
}

.trust-strip strong,
.trust-strip span {
    display: block;
}

.trust-strip strong {
    margin-bottom: 4px;
}

.trust-strip span {
    color: var(--muted);
    font-size: 0.86rem;
}

.spotlight-section,
.project-section,
.kit-section,
.confidence-section,
.faq-section {
    margin-bottom: 26px;
}

.spotlight-section,
.project-section,
.kit-section,
.confidence-section,
.faq-section,
.products-grid {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

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

.spotlight-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.spotlight-image {
    position: relative;
    width: 100%;
    min-height: 174px;
    display: grid;
    place-items: center;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: #fdfdfb;
    padding: 12px;
}

.spotlight-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spotlight-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 14px;
}

.spotlight-copy h3 {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.spotlight-copy p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.spotlight-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

.project-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 16px;
}

.project-card h3 {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.project-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.project-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-card .secondary-button {
    justify-self: start;
}

.kit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 12px;
}

.kit-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 12px;
    align-items: start;
}

.kit-card.has-cover {
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 12px;
}

.kit-cover {
    width: 96px;
    height: 70px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f7f5;
    grid-row: span 4;
}

.kit-card h3 {
    margin-bottom: 0;
    font-size: 0.98rem;
    line-height: 1.25;
}

.kit-card p {
    margin-bottom: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.35;
}

.kit-products {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kit-line {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    max-width: 100%;
    gap: 6px;
    align-items: center;
    min-width: 0;
    padding: 4px 7px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: inherit;
    font-size: 0.8rem;
    text-decoration: none;
}

.kit-line img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    background: #f7f7f5;
}

.kit-line strong,
.kit-line span {
    display: block;
    min-width: 0;
}

.kit-line strong {
    font-size: 0.8rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kit-line span {
    color: var(--accent-strong);
}

.kit-line span span {
    display: none;
}

.kit-more-line {
    align-self: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 6px 9px;
}

.kit-card .spotlight-actions {
    gap: 8px;
}

.kit-card .primary-button,
.kit-card .secondary-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.86rem;
}

.store-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px auto;
    gap: 12px;
    align-items: start;
    margin: 8px 0 14px;
}

.search-box,
.sort-box,
.quantity-field,
.mini-quantity {
    display: grid;
    gap: 6px;
}

.search-box {
    position: relative;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
    margin-top: 2px;
}

.suggestion-chip {
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.suggestion-chip:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.search-box span,
.sort-box span,
.quantity-field span,
.mini-quantity span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.search-box input,
.sort-box select,
.quantity-field input,
.mini-quantity input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    outline: none;
}

.search-box input,
.sort-box select {
    min-height: 48px;
    padding: 0 14px;
}

.quick-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 21px;
    min-height: 48px;
}

.quick-filters label {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.quick-filters input {
    accent-color: var(--accent);
}

.search-box input:focus,
.sort-box select:focus,
.quantity-field input:focus,
.mini-quantity input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: thin;
}

.category-button {
    white-space: nowrap;
    background: var(--surface);
}

.category-button.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 14px;
}

.catalog-heading h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

.catalog-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    gap: 14px;
    padding-bottom: 42px;
}

.confidence-section,
.faq-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 20px;
}

.confidence-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 18px;
    align-items: start;
}

.confidence-section h2,
.faq-section h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

.confidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.confidence-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    padding: 14px;
}

.confidence-grid strong {
    display: block;
    margin-bottom: 5px;
}

.confidence-grid p,
.faq-section p {
    margin-bottom: 0;
    color: var(--muted);
}

.faq-section details {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.faq-section details:first-of-type {
    margin-top: 12px;
}

.faq-section summary {
    cursor: pointer;
    font-weight: 800;
}

.product-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: #b9c9cf;
    box-shadow: 0 10px 24px rgba(23, 32, 38, 0.08);
}

.product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1.15 / 1;
    display: grid;
    place-items: center;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fdfdfb;
    padding: 12px;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-width: 30px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(23, 32, 38, 0.78);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
}

.product-body {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
}

.datasheet-tag {
    background: #fff3d7;
    color: var(--warning);
}

.product-card h3 {
    min-height: 44px;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.28;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.product-price {
    font-size: 1.28rem;
}

.stock-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-align: right;
}

.stock-label.is-low {
    color: var(--warning);
    font-weight: 800;
}

.product-card.has-missing-image .product-media::after,
.spotlight-card.has-missing-image .spotlight-image::after {
    position: absolute;
    left: 10px;
    bottom: 10px;
    content: "Sin foto";
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(180, 35, 24, 0.88);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
}

.card-actions {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 8px;
    align-items: end;
}

.mini-quantity input {
    min-height: 42px;
    padding: 0 8px;
    text-align: center;
}

.add-button {
    min-height: 42px;
}

.empty-state {
    margin: 30px auto 64px;
    max-width: 460px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.product-dialog {
    width: min(1080px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-dialog::backdrop {
    background: rgba(9, 15, 18, 0.58);
}

.dialog-close {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.detail-gallery {
    padding: 22px;
    background: #f4f6f4;
    border-right: 1px solid var(--line);
}

.detail-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 38px;
    height: 46px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 1.7rem;
}

.gallery-nav:first-of-type {
    left: 10px;
}

.gallery-nav:last-of-type {
    right: 10px;
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.thumbs button {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 4px;
}

.thumbs button.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-info {
    min-width: 0;
    padding: 28px;
    overflow: auto;
}

.product-category {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-info h2 {
    margin-bottom: 12px;
    padding-right: 34px;
    font-size: 2rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.detail-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.detail-meta strong {
    font-size: 1.65rem;
}

.detail-meta span {
    color: var(--muted);
}

.detail-actions {
    display: grid;
    grid-template-columns: 110px 1fr 118px;
    gap: 10px;
    align-items: end;
    margin: 18px 0;
}

.quantity-field input {
    min-height: 44px;
    padding: 0 10px;
}

.tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
}

.tab {
    min-height: 42px;
    padding: 0 12px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    color: var(--muted);
    font-weight: 800;
}

.tab.is-active {
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-color: #b9dfd8;
}

.tab:disabled {
    color: #aeb8be;
    cursor: not-allowed;
}

.detail-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-shortcuts[hidden] {
    display: none;
}

.tab-panel {
    min-height: 180px;
    padding-top: 16px;
    color: #29343b;
}

.tab-panel p,
.tab-panel pre {
    margin: 0;
    white-space: pre-wrap;
}

.tab-panel pre {
    max-height: 360px;
    overflow: auto;
    background: #101820;
    color: #e8f1f2;
    border-radius: var(--radius);
    padding: 16px;
    font-size: 0.9rem;
}

.tab-panel a {
    color: var(--accent-strong);
    font-weight: 800;
}

.description-sections {
    display: grid;
    gap: 12px;
}

.description-block {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfc;
    padding: 12px;
}

.description-block h4 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.description-block p {
    color: #29343b;
}

.related-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.related-section[hidden] {
    display: none;
}

.related-section h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

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

.related-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 8px;
    text-align: left;
}

.related-card img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f7f5;
}

.related-card strong,
.related-card span {
    display: block;
}

.related-card strong {
    font-size: 0.82rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.related-card span {
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(9, 15, 18, 0.42);
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 31;
    width: min(420px, 100%);
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(105%);
    transition: transform 0.2s ease;
}

.cart-drawer.is-open {
    transform: translateX(0);
}

.cart-header,
.cart-footer {
    padding: 18px;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.cart-header h2 {
    margin-bottom: 0;
}

.cart-items {
    overflow: auto;
    padding: 12px 18px;
}

.cart-line {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.cart-line img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f7f7f5;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.cart-line h3 {
    margin-bottom: 4px;
    font-size: 0.96rem;
    line-height: 1.25;
}

.cart-line p {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.cart-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.stepper button {
    width: 34px;
    height: 34px;
    border: 0;
    background: var(--surface);
    font-weight: 900;
}

.stepper span {
    min-width: 34px;
    text-align: center;
    font-weight: 800;
}

.remove-button {
    border: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 800;
}

.cart-empty {
    align-self: start;
    margin: 24px 18px;
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
}

.cart-empty h3 {
    color: var(--ink);
}

.cart-footer {
    border-top: 1px solid var(--line);
}

.customer-form {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.customer-form label {
    display: grid;
    gap: 5px;
}

.customer-form span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.customer-form input,
.customer-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    resize: vertical;
}

.customer-form input:focus,
.customer-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cart-total span {
    color: var(--muted);
}

.cart-total strong {
    font-size: 1.35rem;
}

.full-button {
    width: 100%;
}

.cart-footer .full-button + .full-button {
    margin-top: 8px;
}

.site-footer {
    padding: 28px 0 36px;
    color: var(--muted);
    text-align: center;
}

.site-footer p {
    margin-bottom: 0;
}

.site-footer a {
    color: var(--accent-strong);
    font-weight: 800;
}

.offline-page {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.offline-page img {
    border-radius: 14px;
}

.offline-page h1 {
    margin-bottom: 0;
    font-size: 2rem;
}

.offline-page p:not(.eyebrow) {
    max-width: 460px;
    color: var(--muted);
}

.report-page {
    padding: 30px 0 52px;
}

.report-page h1 {
    margin-bottom: 0;
    font-size: 2.2rem;
}

.report-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.report-tools {
    grid-template-columns: minmax(0, 1fr) 220px;
}

.report-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.report-table th,
.report-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.report-table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.report-table a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.admin-page,
.kit-admin-page {
    padding: 30px 0 52px;
}

.admin-page h1,
.kit-admin-page h1 {
    margin-bottom: 0;
    font-size: 2.2rem;
}

.kit-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px;
}

.kit-admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
    gap: 18px;
    align-items: start;
}

.admin-shell {
    display: grid;
    gap: 16px;
}

.admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.admin-module {
    display: grid;
    gap: 16px;
}

.kit-builder {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 0.92fr);
    gap: 16px;
    align-items: start;
}

.product-source-panel,
.kit-target-panel {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px;
}

.builder-panel-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.builder-panel-header h3,
.builder-panel-header p {
    margin-bottom: 0;
}

.builder-panel-header p {
    color: var(--muted);
}

.admin-product-list {
    max-height: 620px;
    overflow: auto;
    display: grid;
    gap: 8px;
    padding-right: 4px;
}

.admin-product-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 8px;
    text-align: left;
}

.admin-product-row.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.admin-product-row img,
.selected-product-row img,
.kit-list-card.has-image > img {
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f7f5;
}

.admin-product-row img {
    width: 56px;
    height: 56px;
}

.admin-product-row strong,
.admin-product-row span,
.selected-product-row strong,
.selected-product-row span {
    display: block;
}

.admin-product-row strong {
    color: var(--ink);
    line-height: 1.2;
}

.admin-product-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.kit-target-panel label {
    display: grid;
    gap: 6px;
}

.kit-target-panel label > span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.kit-target-panel input,
.kit-target-panel textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

.kit-target-panel input:focus,
.kit-target-panel textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.selected-products-panel {
    min-height: 220px;
    display: grid;
    align-content: start;
    gap: 8px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 10px;
}

.selected-product-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 40px;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    padding: 8px;
}

.selected-product-row img {
    width: 58px;
    height: 58px;
}

.selected-product-row strong {
    line-height: 1.22;
}

.selected-product-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.kit-form,
.kit-list-panel {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px;
}

.kit-form label {
    display: grid;
    gap: 6px;
}

.kit-form span,
.field-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.kit-form input,
.kit-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

.kit-form input:focus,
.kit-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.kit-form-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.kit-checkbox {
    min-height: 42px;
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
}

.kit-checkbox input {
    width: auto;
    accent-color: var(--accent);
}

.kit-product-picker {
    max-height: 280px;
    overflow: auto;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
}

.picker-product {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
}

.picker-product.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.selected-kit-products {
    min-height: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 10px;
}

.selected-product-chip {
    min-height: 30px;
    border: 1px solid #b9dfd8;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

.kit-form-actions,
.kit-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kit-list {
    display: grid;
    gap: 10px;
}

.kit-list-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    padding: 14px;
}

.kit-list-card.has-image {
    grid-template-columns: 140px minmax(0, 1fr);
}

.kit-list-card.has-image > img {
    width: 140px;
    height: 82px;
}

.kit-list-card h3,
.kit-list-card p {
    margin-bottom: 0;
}

.muted-text {
    color: var(--muted);
}

.danger-button {
    border-color: #f0b5ae;
    background: #fff1f0;
    color: var(--danger);
}

@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 180ms;
    }
}

@media (max-width: 840px) {
    .store-intro,
    .product-detail,
    .spotlight-grid,
    .project-grid,
    .kit-grid,
    .confidence-section {
        grid-template-columns: 1fr;
    }

    .catalog-stats {
        min-width: 0;
    }

    .store-tools {
        grid-template-columns: minmax(0, 1fr) minmax(126px, 160px);
    }

    .detail-gallery {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .detail-actions {
        grid-template-columns: 96px 1fr;
    }

    #dialog-whatsapp {
        grid-column: 1 / -1;
    }

    .quick-filters {
        grid-column: 1 / -1;
        flex-wrap: wrap;
        margin-top: 0;
    }

    .related-products {
        grid-template-columns: 1fr;
    }

    .trust-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .confidence-grid,
    .report-stats,
    .report-tools,
    .kit-login,
    .kit-admin-layout,
    .kit-builder {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .topbar,
    main,
    .site-footer {
        width: min(100% - 20px, 1180px);
    }

    .topbar {
        min-height: 64px;
    }

    .brand small,
    .header-actions > .ghost-button:not(.install-button) {
        display: none;
    }

    .store-intro {
        padding-top: 28px;
    }

    h1 {
        font-size: 2.08rem;
    }

    .detail-info h2 {
        font-size: 1.42rem;
    }

    .catalog-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trust-strip {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .spotlight-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .spotlight-image {
        min-height: 160px;
    }

    .catalog-stats div {
        padding: 10px;
    }

    .catalog-stats strong {
        font-size: 1.1rem;
    }

    .catalog-stats span {
        font-size: 0.72rem;
    }

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

    .product-body {
        padding: 10px;
    }

    .product-card h3 {
        min-height: 58px;
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }

    .product-price {
        font-size: 1.05rem;
    }

    .card-actions {
        grid-template-columns: 1fr;
    }

    .mini-quantity {
        display: none;
    }

    .product-dialog {
        width: calc(100% - 10px);
        max-height: calc(100vh - 10px);
    }

    .detail-gallery,
    .detail-info {
        padding: 16px;
    }

    .detail-actions {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
    }

    .kit-form-row {
        grid-template-columns: 1fr;
    }

    .kit-list-card.has-image {
        grid-template-columns: 1fr;
    }

    .kit-list-card.has-image > img {
        width: 100%;
        height: auto;
        aspect-ratio: 1200 / 630;
    }
}
