:root {
    --huanca-bg: #ffffff;
    --huanca-text: #17210f;
    --huanca-muted: #66705f;
    --huanca-border: #e5e9e1;
    --huanca-accent: #95c233;
    --huanca-accent-strong: #729d18;
    --huanca-radius: 14px;
    --huanca-container: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--huanca-bg);
    color: var(--huanca-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

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

.huanca-container {
    width: min(100% - 32px, var(--huanca-container));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--huanca-border);
    background: #fff;
}

.site-header__inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.custom-logo {
    width: auto;
    max-height: 48px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.primary-nav__menu,
.footer-nav {
    display: flex;
    gap: 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.primary-nav__menu a,
.footer-nav a {
    text-decoration: none;
}

.site-main {
    padding-block: 32px 56px;
}

.entry-title,
.archive-title {
    line-height: 1.15;
}

.content-card {
    padding-block: 22px;
    border-bottom: 1px solid var(--huanca-border);
}

.huanca-button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--huanca-accent);
    color: #17210f;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.huanca-button:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--huanca-accent-strong);
    color: #fff;
}

.site-footer {
    border-top: 1px solid var(--huanca-border);
    background: #f8faf6;
}

.site-footer__inner {
    padding-block: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer__copyright {
    margin: 0;
    color: var(--huanca-muted);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 99999;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px 14px;
    clip: auto;
    background: #fff;
    color: #000;
}

/* WooCommerce: only a safe baseline. Product-specific design comes next. */
.woocommerce .woocommerce-breadcrumb {
    color: var(--huanca-muted);
}

.woocommerce ul.products li.product a img {
    border-radius: var(--huanca-radius);
}

.woocommerce span.onsale {
    min-width: auto;
    min-height: auto;
    padding: 5px 9px;
    border-radius: 999px;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .primary-nav {
        display: none;
    }

    .huanca-container {
        width: min(100% - 24px, var(--huanca-container));
    }
}

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ==========================================================
   Huanca Header v0.3 — limpio, ecommerce, mobile-first
   ========================================================== */
.huanca-header {
    position: relative;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eeeeee;
}

.huanca-header__inner {
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(320px, 1fr) auto;
    align-items: center;
    gap: 28px;
}

.huanca-brand,
.huanca-brand .custom-logo-link,
.huanca-brand__fallback {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.huanca-brand .custom-logo,
.huanca-brand__fallback img {
    width: auto;
    height: auto;
    max-width: 285px;
    max-height: 72px;
    object-fit: contain;
}

.huanca-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    border: 1px solid #dedede;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.huanca-search:focus-within {
    border-color: #9ca5ae;
    box-shadow: 0 0 0 3px rgba(36, 47, 58, .07);
}

.huanca-search__icon {
    flex: 0 0 auto;
    display: inline-flex;
    margin-left: 17px;
    color: #20262c;
}

.huanca-search__icon svg,
.huanca-search button svg,
.huanca-account svg,
.huanca-cart svg,
.huanca-menu-toggle svg,
.huanca-menu-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.huanca-search input[type="search"] {
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1e2328;
    font: inherit;
    font-size: 15px;
}

.huanca-search input[type="search"]::placeholder {
    color: #8b8f94;
    opacity: 1;
}

.huanca-search input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.huanca-search button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-right: 3px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #273442;
    color: #fff;
    cursor: pointer;
}

.huanca-search button:hover,
.huanca-search button:focus-visible {
    background: #17212b;
    color: #fff;
}

.huanca-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.huanca-account,
.huanca-cart {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 650;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.huanca-account {
    border: 1px solid #1e1e1e;
    background: #fff;
    color: #1e1e1e;
}

.huanca-account:hover {
    background: #f7f7f7;
    color: #1e1e1e;
}

.huanca-cart {
    min-width: 176px;
    border: 1px solid #1c1c1c;
    background: #1c1c1c;
    color: #fff;
}

.huanca-cart:hover {
    background: #000;
    color: #fff;
}

.huanca-cart__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.huanca-cart .woocommerce-Price-amount,
.huanca-cart .woocommerce-Price-currencySymbol {
    color: inherit;
}

.huanca-menu-toggle,
.huanca-menu-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1d252d;
}

.huanca-search-mobile-wrap {
    display: none;
}

.huanca-mobile-panel,
.huanca-mobile-overlay {
    display: none;
}

@media (max-width: 1100px) {
    .huanca-header__inner {
        grid-template-columns: minmax(180px, 235px) minmax(280px, 1fr) auto;
        gap: 18px;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 225px;
        max-height: 62px;
    }

    .huanca-account {
        width: 50px;
        padding: 0;
    }

    .huanca-account span {
        display: none;
    }

    .huanca-cart {
        min-width: auto;
        padding-inline: 15px;
    }
}

@media (max-width: 767px) {
    .huanca-header {
        padding: 0 0 11px;
    }

    .huanca-header__inner {
        min-height: 67px;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .huanca-menu-toggle {
        display: inline-flex;
    }

    .huanca-brand {
        justify-content: center;
    }

    .huanca-brand .custom-logo-link,
    .huanca-brand__fallback {
        justify-content: center;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 176px;
        max-height: 47px;
    }

    .huanca-search--desktop,
    .huanca-account {
        display: none;
    }

    .huanca-header__actions {
        gap: 0;
    }

    .huanca-cart {
        position: relative;
        min-width: 44px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #1d252d;
    }

    .huanca-cart:hover {
        background: #f3f5f6;
        color: #1d252d;
    }

    .huanca-cart__label {
        position: absolute;
        top: 1px;
        right: 0;
        min-width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border-radius: 999px;
        background: #273442;
        color: #fff;
        font-size: 0;
        line-height: 1;
    }

    .huanca-cart__label > .woocommerce-Price-amount,
    .huanca-cart__label > span:not(.huanca-cart__count) {
        display: none;
    }

    .huanca-cart__count {
        font-size: 11px;
    }

    .huanca-cart__count::before,
    .huanca-cart__count::after {
        content: none;
    }

    .huanca-search-mobile-wrap {
        display: block;
    }

    .huanca-search--mobile {
        height: 42px;
        border-color: #cfd6dd;
        box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
    }

    .huanca-search--mobile input[type="search"] {
        padding-left: 17px;
        font-size: 13px;
    }

    .huanca-search--mobile button {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        min-height: 38px;
        margin-right: 1px;
        background: #273442;
    }

    .huanca-search--mobile button svg {
        width: 20px;
        height: 20px;
    }

    .huanca-mobile-panel {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1002;
        width: min(86vw, 360px);
        display: block;
        padding: 20px;
        background: #fff;
        box-shadow: 14px 0 40px rgba(0, 0, 0, .16);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .22s ease, visibility .22s ease;
    }

    .huanca-mobile-panel__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        border-bottom: 1px solid #ececec;
    }

    .huanca-menu-close {
        display: inline-flex;
    }

    .huanca-mobile-panel__body {
        padding-top: 16px;
    }

    .huanca-mobile-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .huanca-mobile-menu ul {
        margin: 8px 0 8px 18px;
        padding: 0;
        list-style: none;
    }

    .huanca-mobile-menu a,
    .huanca-mobile-panel__account {
        display: block;
        padding: 13px 0;
        border-bottom: 1px solid #f0f0f0;
        color: #1e252b;
        text-decoration: none;
        font-weight: 650;
    }

    .huanca-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 1001;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(0, 0, 0, .34);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
    }

    body.huanca-menu-open {
        overflow: hidden;
    }

    body.huanca-menu-open .huanca-mobile-panel {
        transform: translateX(0);
        visibility: visible;
    }

    body.huanca-menu-open .huanca-mobile-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* ==========================================================
   Huanca Header v0.4 — refinamiento desktop + móvil 2 filas
   ========================================================== */
.huanca-account__mobile,
.huanca-cart__badge {
    display: none;
}

@media (min-width: 768px) {
    .huanca-header__inner {
        min-height: 94px;
        grid-template-columns: minmax(220px, 275px) minmax(360px, 1fr) auto;
        gap: 24px;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 250px;
        max-height: 64px;
    }

    .huanca-search {
        height: 48px;
    }

    .huanca-account,
    .huanca-cart {
        min-height: 48px;
    }
}

@media (max-width: 767px) {
    .huanca-header {
        padding: 0 0 10px;
    }

    .huanca-header__inner {
        min-height: 56px;
        grid-template-columns: 34px minmax(118px, 1fr) auto;
        gap: 8px;
        padding-top: 2px;
    }

    .huanca-menu-toggle {
        width: 34px;
        height: 40px;
        min-height: 40px;
        border-radius: 8px;
    }

    .huanca-menu-toggle svg {
        width: 22px;
        height: 22px;
    }

    .huanca-brand {
        justify-content: flex-start;
    }

    .huanca-brand .custom-logo-link,
    .huanca-brand__fallback {
        justify-content: flex-start;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 136px;
        max-height: 42px;
    }

    .huanca-header__actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .huanca-account {
        display: inline-flex;
        width: auto;
        min-width: 76px;
        height: 42px;
        min-height: 42px;
        padding: 0 4px;
        gap: 7px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #17212b;
    }

    .huanca-account:hover {
        background: #f7f8f8;
    }

    .huanca-account svg {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    .huanca-account__desktop {
        display: none;
    }

    .huanca-account__mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        line-height: 1.03;
    }

    .huanca-account__mobile small {
        font-size: 9px;
        font-weight: 500;
        color: #5d6670;
    }

    .huanca-account__mobile strong {
        margin-top: 2px;
        font-size: 12px;
        font-weight: 700;
        color: #17212b;
    }

    .huanca-cart {
        position: relative;
        width: 38px;
        min-width: 38px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #17212b;
    }

    .huanca-cart:hover {
        background: #f7f8f8;
        color: #17212b;
    }

    .huanca-cart__icon-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .huanca-cart__icon-wrap svg {
        width: 23px;
        height: 23px;
    }

    .huanca-cart__badge {
        position: absolute;
        top: -8px;
        right: -9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #e72d4f;
        color: #fff;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }

    .huanca-cart__label {
        display: none;
    }

    .huanca-search-mobile-wrap {
        width: min(100% - 24px, var(--huanca-container));
    }

    .huanca-search--mobile {
        height: 40px;
        border: 1px solid #d7dee5;
        box-shadow: none;
    }

    .huanca-search--mobile:focus-within {
        border-color: #aeb9c3;
        box-shadow: 0 0 0 3px rgba(39, 52, 66, .05);
    }

    .huanca-search--mobile input[type="search"] {
        padding-left: 17px;
        font-size: 12.5px;
    }

    .huanca-search--mobile button {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        min-height: 38px;
        margin-right: 0;
        background: #273442;
    }
}

@media (max-width: 390px) {
    .huanca-container {
        width: min(100% - 20px, var(--huanca-container));
    }

    .huanca-header__inner {
        grid-template-columns: 32px minmax(105px, 1fr) auto;
        gap: 5px;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 122px;
    }

    .huanca-header__actions {
        gap: 4px;
    }

    .huanca-account {
        min-width: 69px;
        gap: 5px;
    }

    .huanca-account svg {
        width: 20px;
        height: 20px;
    }

    .huanca-account__mobile small {
        font-size: 8px;
    }

    .huanca-account__mobile strong {
        font-size: 11px;
    }
}

/* ==========================================================
   Huanca Header v0.5 — móvil inspirado en el header anterior
   ========================================================== */
.huanca-cart__mobile-icon { display: none; }

@media (max-width: 767px) {
    .huanca-header {
        padding-bottom: 8px;
        border-top: 1px solid #111827;
    }

    .huanca-container {
        width: min(100% - 16px, var(--huanca-container));
    }

    .huanca-header__inner {
        min-height: 47px;
        grid-template-columns: 30px minmax(118px, 1fr) auto;
        gap: 7px;
        padding-top: 0;
    }

    .huanca-menu-toggle {
        width: 30px;
        height: 38px;
        min-height: 38px;
        padding: 0;
    }

    .huanca-menu-toggle svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.45;
    }

    .huanca-brand,
    .huanca-brand .custom-logo-link,
    .huanca-brand__fallback {
        justify-content: flex-start;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 128px;
        max-height: 39px;
    }

    .huanca-header__actions {
        gap: 8px;
    }

    .huanca-account {
        display: inline-flex;
        width: auto;
        min-width: 79px;
        height: 40px;
        min-height: 40px;
        padding: 0 2px;
        gap: 7px;
        border: 0;
        background: transparent;
    }

    .huanca-account svg {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        stroke-width: 1.5;
    }

    .huanca-account .huanca-account__desktop {
        display: none;
    }

    .huanca-account .huanca-account__mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        line-height: 1.02;
    }

    .huanca-account .huanca-account__mobile small {
        display: block;
        font-size: 8.5px;
        font-weight: 500;
        color: #24364a;
    }

    .huanca-account .huanca-account__mobile strong {
        display: block;
        margin-top: 2px;
        font-size: 11.5px;
        font-weight: 700;
        color: #0f2743;
    }

    .huanca-cart {
        width: 34px;
        min-width: 34px;
        height: 40px;
        min-height: 40px;
    }

    .huanca-cart__desktop-icon {
        display: none;
    }

    .huanca-cart__mobile-icon {
        display: block;
        width: 23px !important;
        height: 23px !important;
        stroke-width: 1.55;
    }

    .huanca-cart__badge {
        top: -7px;
        right: -8px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-width: 1.5px;
        background: #eb2448;
        font-size: 9px;
    }

    .huanca-search-mobile-wrap {
        width: min(100% - 16px, var(--huanca-container));
    }

    .huanca-search--mobile {
        height: 39px;
        border: 1.5px solid #d7e0e8;
        border-radius: 999px;
        box-shadow: 0 1px 2px rgba(15, 39, 67, .03);
    }

    .huanca-search--mobile input[type="search"] {
        padding-left: 17px;
        font-size: 12px;
        color: #22354a;
    }

    .huanca-search--mobile input[type="search"]::placeholder {
        color: #8a9aae;
    }

    .huanca-search--mobile button {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        min-height: 38px;
        margin-right: -1px;
        background: #24364a;
    }

    .huanca-search--mobile button svg {
        width: 19px;
        height: 19px;
    }
}

@media (max-width: 390px) {
    .huanca-container,
    .huanca-search-mobile-wrap {
        width: min(100% - 14px, var(--huanca-container));
    }

    .huanca-header__inner {
        grid-template-columns: 28px minmax(110px, 1fr) auto;
        gap: 5px;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 120px;
    }

    .huanca-header__actions {
        gap: 5px;
    }

    .huanca-account {
        min-width: 74px;
        gap: 5px;
    }

    .huanca-account .huanca-account__mobile small {
        font-size: 8px;
    }

    .huanca-account .huanca-account__mobile strong {
        font-size: 11px;
    }
}

/* ==========================================================
   Huanca Header v0.6 — móvil más grande y compacto
   Ajustado para parecerse al header móvil de referencia.
   ========================================================== */
@media (max-width: 767px) {
    .huanca-header {
        padding-bottom: 8px;
    }

    .huanca-container {
        width: min(100% - 12px, var(--huanca-container));
    }

    .huanca-header__inner {
        min-height: 50px;
        grid-template-columns: 34px minmax(145px, 1fr) auto;
        gap: 7px;
    }

    .huanca-menu-toggle {
        width: 34px;
        height: 44px;
        min-height: 44px;
    }

    .huanca-menu-toggle svg {
        width: 23px;
        height: 23px;
        stroke-width: 1.55;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 154px;
        max-height: 45px;
    }

    .huanca-header__actions {
        gap: 9px;
    }

    .huanca-account {
        min-width: 88px;
        height: 44px;
        min-height: 44px;
        gap: 8px;
        padding: 0 2px;
    }

    .huanca-account svg {
        width: 25px;
        height: 25px;
        flex: 0 0 25px;
        stroke-width: 1.55;
    }

    .huanca-account .huanca-account__mobile small {
        font-size: 9px;
        line-height: 1;
    }

    .huanca-account .huanca-account__mobile strong {
        margin-top: 3px;
        font-size: 13px;
        line-height: 1;
    }

    .huanca-cart {
        width: 38px;
        min-width: 38px;
        height: 44px;
        min-height: 44px;
    }

    .huanca-cart__mobile-icon {
        width: 27px !important;
        height: 27px !important;
        stroke-width: 1.55;
    }

    .huanca-cart__badge {
        top: -7px;
        right: -7px;
        min-width: 17px;
        height: 17px;
        font-size: 9.5px;
        border-width: 1.5px;
    }

    .huanca-search-mobile-wrap {
        width: min(100% - 12px, var(--huanca-container));
    }

    .huanca-search--mobile {
        height: 43px;
    }

    .huanca-search--mobile input[type="search"] {
        padding-left: 18px;
        font-size: 12.5px;
    }

    .huanca-search--mobile button {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        min-height: 42px;
    }

    .huanca-search--mobile button svg {
        width: 21px;
        height: 21px;
    }
}

@media (max-width: 390px) {
    .huanca-container,
    .huanca-search-mobile-wrap {
        width: min(100% - 10px, var(--huanca-container));
    }

    .huanca-header__inner {
        grid-template-columns: 32px minmax(135px, 1fr) auto;
        gap: 5px;
    }

    .huanca-brand .custom-logo,
    .huanca-brand__fallback img {
        max-width: 145px;
    }

    .huanca-header__actions {
        gap: 6px;
    }

    .huanca-account {
        min-width: 82px;
        gap: 6px;
    }

    .huanca-account svg {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    .huanca-account .huanca-account__mobile small {
        font-size: 8.5px;
    }

    .huanca-account .huanca-account__mobile strong {
        font-size: 12px;
    }

    .huanca-cart__mobile-icon {
        width: 25px !important;
        height: 25px !important;
    }
}
