/*
 * Coderstyle 2.0. Colors, fonts and radius come from CSS variables defined
 * by config/settings_schema.json (css_var) and printed in content_for_header.
 * Palette: Terminal #0D0D12, Panel #16161D, Build #FFE600, Hotfix #FF2BD6,
 * Stdout #F4F2EE, Comment #9A9AAB.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
}
body {
    margin: 0;
    font-family: var(--font-sans, 'Space Grotesk', system-ui, sans-serif);
    color: var(--foreground, #F4F2EE);
    background: var(--background, #0D0D12);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
}
a:hover {
    color: var(--primary);
}
h1,
h2,
h3 {
    line-height: 1.05;
    margin: 0 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.03em;
}
h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
}
::selection {
    background: var(--accent, #FF2BD6);
    color: var(--background);
}
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.mono {
    font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
}
.muted {
    color: var(--muted-foreground);
}
.text-primary {
    color: var(--primary);
}
.text-accent {
    color: var(--accent, #FF2BD6);
}
.eyebrow {
    font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 0.9rem;
    color: var(--accent, #FF2BD6);
    margin: 0 0 0.75rem;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.error {
    color: var(--accent, #FF2BD6);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}
.page-width {
    width: 100%;
    max-width: var(--page-width, 80rem);
    margin-inline: auto;
    padding-inline: 1.5rem;
}
@media (max-width: 600px) {
    .page-width {
        padding-inline: 1rem;
    }
}
.main {
    min-height: 60vh;
}
.section-block {
    padding-block: 3rem;
}
.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 1.75rem;
}
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}
.section-head__link {
    text-decoration: none;
    margin-bottom: 1.75rem;
}
.skip-link {
    position: absolute;
    left: -999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    background: var(--background);
    padding: 0.5rem;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) * 1.4);
}
.empty-state p {
    margin: 0;
}

/* Controls */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1.4rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--primary-foreground);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover {
    color: var(--primary-foreground);
    transform: translateY(-1px);
}
.button[disabled] {
    background: var(--muted);
    border-color: var(--border);
    color: var(--muted-foreground);
    cursor: not-allowed;
    transform: none;
}
.button--lg {
    min-height: 56px;
    padding-inline: 1.75rem;
    font-size: 1.05rem;
}
.button--outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border);
    font-weight: 500;
}
.button--outline:hover {
    color: var(--foreground);
    border-color: var(--foreground);
}
.button--full {
    width: 100%;
}
.link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
    color: var(--muted-foreground);
}
.link:hover {
    color: var(--accent, #FF2BD6);
}
.input {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    font: inherit;
    color: inherit;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.input::placeholder {
    color: var(--muted-foreground);
}
.input:focus {
    outline: none;
    border-color: var(--primary);
}
.input--lg {
    min-height: 56px;
    padding-inline: 1.1rem;
}
.input--qty {
    width: 5rem;
}
select.input {
    appearance: auto;
}
.badge {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}
.chip {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
}
.chip input {
    position: absolute;
    opacity: 0;
}
.chip span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono, monospace);
    cursor: pointer;
}
.chip span:hover {
    border-color: var(--foreground);
}
.chip input:checked + span {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 700;
}
.chip input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.toast {
    max-width: var(--page-width, 80rem);
    margin: 1rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--muted);
    border: 1px solid var(--primary);
    font-family: var(--font-mono, monospace);
    font-size: 0.9rem;
}
.toast--error {
    border-color: var(--accent, #FF2BD6);
    color: var(--accent, #FF2BD6);
}

/* Header / footer */
.announcement {
    background: var(--primary);
    color: var(--primary-foreground);
    text-align: center;
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
}
.announcement a {
    text-decoration: none;
    color: inherit;
}
.site-header {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 92%, transparent);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    padding-block: 1rem;
}
.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--foreground);
}
.site-header__logo:hover {
    color: var(--foreground);
}
.wordmark {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}
.wordmark__cursor {
    color: var(--accent, #FF2BD6);
    animation: cs-blink 1.1s steps(1) infinite;
}
@keyframes cs-blink {
    50% {
        opacity: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .wordmark__cursor {
        animation: none;
    }
    .button {
        transition: none;
    }
}
.site-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    flex: 1;
    font-weight: 500;
}
.site-header__nav a,
.site-header__actions a,
.site-footer a {
    text-decoration: none;
}
.site-header__nav a.is-highlight {
    color: var(--accent, #FF2BD6);
}
.site-header__search input {
    min-height: 40px;
    width: 12rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono, monospace);
    font-size: 0.875rem;
    background: var(--muted);
    color: inherit;
}
.site-header__search input:focus {
    outline: none;
    border-color: var(--primary);
}
.site-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
@media (max-width: 720px) {
    .site-header__nav {
        order: 3;
        flex-basis: 100%;
    }
    .site-header__actions {
        margin-left: auto;
    }
    .site-header__search {
        order: 4;
        flex-basis: 100%;
    }
    .site-header__search input {
        width: 100%;
    }
}
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    padding-block: 3rem 1.5rem;
}
.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
}
.site-footer__brand p {
    margin: 0.6rem 0 0;
    max-width: 22rem;
}
.site-footer__logo img {
    height: 36px;
    width: auto;
}
.site-footer nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.site-footer__heading {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0 0 0.25rem;
}
.site-footer__copy {
    font-size: 0.8rem;
    margin-top: 2.5rem;
}

/* Hero */
.hero {
    padding-block: 4.5rem 3.5rem;
}
.hero__inner {
    display: grid;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.1fr 1fr;
    }
}
.hero__title {
    font-size: clamp(2.75rem, 7vw, 6rem);
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
}
.hero__subtitle {
    font-size: 1.2rem;
    color: #D6D4CF;
    max-width: 34rem;
    margin: 0 0 2rem;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.hero__media img,
.hero__mark {
    width: 100%;
    aspect-ratio: 7 / 8;
    max-height: 30rem;
    border-radius: calc(var(--radius) * 2);
    border: 1px solid var(--border);
    object-fit: cover;
}
.hero__mark {
    background: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}
.hero__mark .isologo {
    width: 45%;
    height: auto;
}

/* Elige tu stack */
.grid {
    display: grid;
    gap: 1rem;
}
.grid--stacks {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
}
.stack-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.4rem;
    border-radius: calc(var(--radius) * 1.4);
    background: var(--muted);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.stack-card:hover {
    border-color: var(--primary);
    color: inherit;
}
.stack-card__code {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.stack-card__name {
    font-size: 1.15rem;
    font-weight: 700;
}
.stack-card__hint {
    font-size: 0.875rem;
}

/* Products */
.grid--products {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1.25rem;
}
.product-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
}
.product-card:hover {
    color: inherit;
}
.product-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
    overflow: hidden;
    display: grid;
    place-items: center;
    transition: border-color 0.15s ease;
}
.product-card:hover .product-card__media {
    border-color: var(--primary);
}
.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card__placeholder {
    font-size: 2.5rem;
    color: var(--muted-foreground);
}
.product-card__tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: var(--accent, #FF2BD6);
    color: var(--background);
    font-size: 0.75rem;
    font-weight: 700;
}
.product-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.product-card__brand {
    font-size: 0.75rem;
}
.product-card__name {
    font-size: 1.1rem;
    font-weight: 500;
}
.product-card__price,
.price__current {
    color: var(--primary);
}
.price__compare {
    margin-left: 0.4rem;
    font-size: 0.9em;
    color: var(--muted-foreground);
}

/* Categories */
.grid--categories {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.category-card {
    min-height: 16rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1.75rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.8);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.category-card:hover {
    border-color: var(--primary);
    color: inherit;
}
.category-card__name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.category-card__meta {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}
.category-card--highlight {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}
.category-card--highlight:hover {
    color: var(--primary-foreground);
}
.category-card--highlight .category-card__meta {
    color: var(--primary-foreground);
}

/* Por qué nosotros */
.why-us {
    border-block: 1px solid var(--border);
    margin-top: 2rem;
}
.grid--why {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 2rem;
}
.why-item__num {
    color: var(--primary);
}
.why-item__title {
    font-size: 1.4rem;
    margin: 0.4rem 0;
}
.why-item__text {
    color: #D6D4CF;
    margin: 0;
}

/* Comunidad */
.community__tag {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0;
}
.grid--community {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}
.community__item {
    margin: 0;
    aspect-ratio: 1;
    border-radius: calc(var(--radius) * 1.2);
    overflow: hidden;
    background: var(--muted);
    border: 1px solid var(--border);
}
.community__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.community__item--empty {
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    color: var(--border);
}

/* Newsletter */
.newsletter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding: 3rem 2rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
}
.newsletter__copy {
    flex: 1 1 22rem;
}
.newsletter__copy .section-title {
    margin-bottom: 0.5rem;
}
.newsletter__copy p:last-child {
    margin: 0;
}
.newsletter__form {
    flex: 1 1 22rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.newsletter__form .input {
    flex: 1 1 14rem;
    width: auto;
}

/* Rich text / image with text */
.rich-text {
    padding-block: 2.5rem;
}
.rich-text--center {
    text-align: center;
}
.rich-text--center .rte {
    max-width: 42rem;
    margin-inline: auto;
}
.image-with-text {
    display: grid;
    gap: 2rem;
    align-items: center;
    padding-block: 2.5rem;
}
@media (min-width: 768px) {
    .image-with-text {
        grid-template-columns: 1fr 1fr;
    }
    .image-with-text--reverse .image-with-text__image {
        order: 2;
    }
}
.image-with-text__image {
    border-radius: calc(var(--radius) * 1.6);
    width: 100%;
}
.rte a {
    color: var(--primary);
}
.rte code {
    font-family: var(--font-mono, monospace);
    color: var(--accent, #FF2BD6);
}
.rte p:first-child {
    margin-top: 0;
}

/* Product */
.product {
    display: grid;
    gap: 2.5rem;
    padding-block: 2.5rem;
}
@media (min-width: 768px) {
    .product {
        grid-template-columns: 1fr 1fr;
    }
}
.product__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: calc(var(--radius) * 1.6);
    background: var(--muted);
    border: 1px solid var(--border);
}
.product__image--placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: var(--muted-foreground);
}
.product__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.product__thumbs button {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    width: 4.5rem;
    cursor: pointer;
    background: none;
    overflow: hidden;
}
.product__thumbs button:hover {
    border-color: var(--primary);
}
.product__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
}
.product__price {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}
.product__short {
    color: #D6D4CF;
}
.product__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-block: 1.75rem;
}
.product__option {
    border: 0;
    padding: 0;
    margin: 0;
}
.product__option legend {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}
.product__buy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.product__buy .input--qty {
    min-height: 56px;
}
.product__buy .button {
    flex: 1 1 12rem;
}
.product__availability {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}
.product__availability.is-out {
    color: var(--accent, #FF2BD6);
}
.product__pickup {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    background: var(--muted);
}
.product__pickup summary {
    cursor: pointer;
    font-weight: 500;
}
.product__description {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    color: #D6D4CF;
}

/* Collection */
.collection {
    padding-block: 2.5rem;
}
.collection__header {
    margin-bottom: 2rem;
}
.collection__layout {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .collection__layout {
        grid-template-columns: 15rem 1fr;
    }
    .collection__layout--full {
        grid-template-columns: 1fr;
    }
}
.filters {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: start;
    padding: 1.25rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
}
.filters__group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.filters__group a {
    text-decoration: none;
}
.filters__group input[type='checkbox'] {
    accent-color: var(--primary);
}
.filters__title {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0;
}
.filters__price {
    display: flex;
    gap: 0.5rem;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    font-family: var(--font-mono, monospace);
}
.pagination a {
    text-decoration: none;
    color: var(--primary);
}

/* Cart */
.cart {
    padding-block: 2.5rem;
}
.cart__layout {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .cart__layout {
        grid-template-columns: 1fr 24rem;
    }
}
.cart__items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cart-item {
    display: grid;
    grid-template-columns: 5rem 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding-block: 1.25rem;
    border-bottom: 1px solid var(--border);
}
@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 4rem 1fr auto;
    }
}
.cart-item__image {
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.cart-item__image--placeholder {
    display: block;
    background: var(--muted);
}
.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.cart-item__info a {
    font-weight: 500;
    text-decoration: none;
}
.cart-item__total {
    color: var(--primary);
}
.cart__summary {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.6);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: start;
}
.cart__summary .eyebrow {
    margin: 0;
}
.cart__coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.cart__coupon .input {
    flex: 1;
}
.totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
    margin: 0;
}
.totals dd {
    margin: 0;
    text-align: right;
}
.totals__total {
    font-weight: 700;
    font-size: 1.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
dd.totals__total {
    color: var(--primary);
}
