/* Scoped to the child header so catalogue and checkout styling stay independent. */
#wf_header.muxacra-header {
    --muxacra-red: #bd3529;
    padding: 0;
    background: #fff;
    color: #343b4a;
}
.muxacra-header .wf-container { width: 100%; max-width: 1440px; padding-inline: 24px; }
.muxacra-header .muxacra-topbar { background: #faf5ef; border-bottom: 1px solid #eee7de; }
.muxacra-header .wf_header-topbar .widget { padding-block: 6px; font-size: 13px; }
.muxacra-header .wf_header-navwrapperinner { min-height: 0; }
.muxacra-header .muxacra-shopping-row {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    padding-block: 18px;
}
.muxacra-header .ssite--logo { min-width: 0; line-height: 1; }
.muxacra-header .ssite--logo a { display: block; color: inherit; }
.muxacra-header .ssite--logo img { display: block; width: 100%; height: auto; max-height: 72px; object-fit: contain; }
.muxacra-header .ssite--logo .site-description { font-size: 12px; margin: 4px 0 0; }
.muxacra-header .muxacra-search { min-width: 0; width: 100%; }
.muxacra-header .muxacra-search form { margin: 0; }
.muxacra-header .muxacra-product-search { display: flex; align-items: stretch; border: 1px solid #dedee3; border-radius: 8px; background: #f7f7f8; overflow: hidden; }
.muxacra-header .muxacra-search input[type="search"],
.muxacra-header .muxacra-search input[type="text"] { min-width: 0; height: 48px; font-size: 15px; }
.muxacra-header .muxacra-product-search input[type="search"] { flex: 1; width: 100%; border: 0; background: transparent; padding: 0 16px; color: #343b4a; }
.muxacra-header .muxacra-product-search button { flex: 0 0 52px; padding: 0; border: 0; background: var(--muxacra-red); color: #fff; }
.muxacra-header .muxacra-navigation-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #eee; padding-block: 6px; }
.muxacra-header .muxacra-navigation-row .wf_navbar-menu { min-height: 44px; height: auto; width: auto; min-width: 0; justify-content: flex-start; }
.muxacra-header .wf_navbar-nav { text-align: left; }
.muxacra-header .wf_navbar-nav .wf_navbar-mainmenu > li > a { padding: 12px 11px; font-size: 14px; line-height: 20px; }
.muxacra-header .wf_navbar-list-right { gap: 12px; margin: 0; padding: 0; }
.muxacra-header .muxacra-delivery { flex-shrink: 0; }
.muxacra-header .muxacra-delivery .wf-btn { padding: 9px 16px; font-size: 13px; line-height: 20px; border-radius: 6px; }
.muxacra-header .muxacra-desktop { border-bottom: 1px solid #e9e9ed; }
.muxacra-header a:focus-visible,
.muxacra-header button:focus-visible,
.muxacra-header input:focus-visible { outline: 2px solid var(--muxacra-red); outline-offset: 3px; }
@media (min-width: 992px) and (max-width: 1199px) {
    .muxacra-header .muxacra-shopping-row { grid-template-columns: 190px minmax(0, 1fr) auto; gap: 20px; }
    .muxacra-header .muxacra-navigation-row { flex-wrap: wrap; gap: 0; }
    .muxacra-header .muxacra-delivery { margin-left: auto; }
}
@media (max-width: 991px) {
    .muxacra-header .wf-container { padding-inline: 16px; }
    .muxacra-header .wf_mobilenav-menu { min-height: 68px; padding-block: 10px; }
    .muxacra-header .wf_mobilenav-logo { min-width: 0; }
    .muxacra-header .wf_mobilenav-logo .site--logo img { width: 170px; max-width: 100%; height: auto; max-height: 48px; object-fit: contain; }
    .muxacra-header .muxacra-mobile-shopping { display: flex; align-items: center; gap: 14px; padding: 8px 16px 14px; border-bottom: 1px solid #e9e9ed; }
    .muxacra-header .muxacra-mobile-shopping .muxacra-search { flex: 1; }
    .muxacra-header .muxacra-mobile-shopping > ul { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .muxacra-header .is--sticky.on { animation: none; }
}

.muxacra-header .wf_navbar-list-right,
.muxacra-header .wf_navbar-list-right > li { list-style: none; }
.muxacra-header .muxacra-mobile-cart-item > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e9e9ed;
    border-radius: 50%;
    color: #343b4a;
}
.muxacra-header .muxacra-mobile-cart-item .cart_count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    padding: 2px 4px;
    border-radius: 12px;
    background: var(--muxacra-red);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
}
.muxacra-header .muxacra-search .apsw-search-wrap { width: 100%; max-width: none; margin: 0; }
.muxacra-header .muxacra-search .apsw-search-form { display: flex; width: 100%; }
.muxacra-header .muxacra-search .apsw-search-input { flex: 1; width: 100%; min-width: 0; }
.muxacra-header .muxacra-search .apsw-search-btn { flex: 0 0 auto; padding-inline: 18px; }

/* The front-page slider starts directly beneath the header. */
body.home #content.site-content > section.wf-py-default:first-child {
    padding-top: 0;
}

/* Small, readable category links instead of large catalogue tiles. */
.muxacra-category-links { --category-columns: 3; margin: 20px 0 28px; }
.muxacra-category-links--1 { --category-columns: 1; }
.muxacra-category-links--2 { --category-columns: 2; }
.muxacra-category-links--4 { --category-columns: 4; }
.muxacra-category-links > ul {
    display: grid;
    grid-template-columns: repeat(var(--category-columns), minmax(0, 1fr));
    gap: 8px 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.muxacra-category-links > ul > li { margin: 0; padding: 0; list-style: none; }
.muxacra-category-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    height: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid #ece7e3;
    border-radius: 5px;
    color: #343b4a;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
}
.muxacra-category-links a:hover { background: #faf5ef; color: #bd3529; }
.muxacra-category-links a:focus-visible { outline: 2px solid #bd3529; outline-offset: 2px; }
.muxacra-category-links a > span:last-child { overflow-wrap: anywhere; }
.muxacra-category-links .muxacra-category-links__image,
.muxacra-category-links .muxacra-category-links__fallback {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0;
    object-fit: contain;
    font-size: 24px;
    line-height: 30px;
}
@media (max-width: 767px) {
    .muxacra-category-links { --category-columns: 2; }
    .muxacra-category-links--1 { --category-columns: 1; }
    .muxacra-category-links > ul { gap: 4px 12px; }
}
@media (max-width: 420px) {
    .muxacra-category-links { --category-columns: 1; }
}

.muxacra-category-directory { margin: 20px 0 30px; }
.muxacra-category-directory h2 { margin: 0 0 12px; font-size: 22px; }
.muxacra-category-directory .muxacra-category-links { margin: 0; }
.muxacra-category-directory .muxacra-category-links > ul {
    gap: 0;
    border: 1px solid #ece7e3;
    border-radius: 8px;
    overflow: hidden;
}
.muxacra-category-directory .muxacra-category-links a {
    border-radius: 0;
    padding: 14px 18px;
}

/* Checkout already contains the delivery address and its postcode field. */
body.woocommerce-checkout form.muxacra-postcode {
    display: none !important;
}

/* Delivery verification is the first interaction, not an extra header banner. */
html.muxacra-entry-open { overflow: hidden; }
.muxacra-entry-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(24, 28, 34, .72);
}
dialog.muxacra-entry {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    width: min(660px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 40px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: #343b4a;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0,0,0,.25);
    font-size: 16px;
    line-height: 1.5;
}
.muxacra-entry::backdrop { background: rgba(24, 28, 34, .72); }
body:has(.muxacra-entry:modal) > .muxacra-entry-backdrop { display: none; }
.muxacra-entry__brand { margin: 0 0 28px; font-size: 18px; }
.muxacra-entry__brand strong { color: #bd3529; font-size: 25px; }
.muxacra-entry__eyebrow { color: #bd3529; font-weight: 700; margin: 0 0 8px; }
.muxacra-entry h2 { font-size: 30px; line-height: 1.2; margin: 0 0 16px; color: #252b35; }
.muxacra-entry #muxacra-entry-description { margin: 0 0 24px; }
.muxacra-entry label { display: block; margin: 0 0 8px; font-weight: 600; }
.muxacra-entry__form-row { display: flex; gap: 12px; align-items: stretch; }
.muxacra-entry input[type="text"] {
    min-width: 0; width: 150px; min-height: 48px;
    padding: 10px 14px; border: 1px solid #b8bbc0; border-radius: 7px; font-size: 18px;
}
.muxacra-entry button,
.muxacra-entry__primary,
.muxacra-entry__secondary {
    display: block; min-height: 48px; padding: 12px 18px;
    border: 1px solid #bd3529; border-radius: 7px;
    background: #bd3529; color: #fff; font-size: 16px;
    font-weight: 600; text-align: center; text-decoration: none; line-height: 1.4;
}
.muxacra-entry button:hover, .muxacra-entry__primary:hover { background: #a82d22; color: #fff; }
.muxacra-entry__choices { display: grid; gap: 12px; }
.muxacra-entry__choices form { margin: 0; }
.muxacra-entry__choices button { width: 100%; }
.muxacra-entry .muxacra-entry__secondary { background: #fff; color: #bd3529; }
.muxacra-entry .muxacra-entry__guest { background: #f5f5f6; color: #343b4a; border-color: #d9dadd; }
.muxacra-entry__change { margin-top: 20px; }
.muxacra-entry__change summary { cursor: pointer; text-decoration: underline; }
.muxacra-entry__change form { margin-top: 14px; }
.muxacra-entry__error { padding: 12px; background: #fff0ed; border-left: 3px solid #bd3529; margin-top: 14px; }
.muxacra-entry__help { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 24px; font-size: 13px; }
.muxacra-entry__help a { color: #525b6b; text-decoration: underline; }
.muxacra-entry :is(a, button, input, summary):focus-visible { outline: 3px solid #394c78; outline-offset: 3px; }
@media (max-width: 600px) {
    dialog.muxacra-entry { padding: 24px; }
    .muxacra-entry h2 { font-size: 25px; }
    .muxacra-entry__form-row { flex-wrap: wrap; }
    .muxacra-entry__form-row input[type="text"], .muxacra-entry__form-row button { width: 100%; }
}

/* Side basket: scoped to WPC so ordinary checkout controls are unaffected. */
#wcspc-area {
    background: #fff !important;
    color: #28312c !important;
    box-shadow: -8px 0 32px #0002;
    display: flex;
    flex-direction: column;
    padding-top: 52px !important;
}
#wcspc-area::before { content: 'Mi cesta'; position: absolute; top: 15px; left: 20px; font-size: 22px; font-weight: 700; }
#wcspc-area .wcspc-close { top: 8px !important; right: 8px !important; left: auto !important; width: 40px; height: 40px; color: #28312c !important; display: grid; place-items: center; }
#wcspc-area .wcspc-area-top { position: relative !important; top: auto !important; bottom: auto !important; flex: 1 1 auto; min-height: 0; height: auto !important; padding: 0 16px !important; overflow-y: auto !important; }
#wcspc-area .wcspc-item { padding: 16px 0 !important; margin: 0 !important; border-bottom: 1px solid #e7e9e6 !important; background: #fff !important; }
#wcspc-area .wcspc-item-inner { display: grid !important; grid-template-columns: 52px minmax(0,1fr) 32px; gap: 10px; padding: 0 !important; align-items: start; }
#wcspc-area .wcspc-item-thumb { width: 52px !important; margin: 0 !important; float: none !important; }
#wcspc-area .wcspc-item-thumb img { width: 52px; height: 64px; object-fit: contain; }
#wcspc-area .wcspc-item-info { width: auto !important; padding: 0 !important; margin: 0 !important; }
#wcspc-area .wcspc-item-title a { color: #28312c !important; font-size: 15px !important; line-height: 1.4 !important; font-weight: 600; }
#wcspc-area .wcspc-item-price { display: block; margin-top: 6px; color: #b72c27 !important; font-size: 15px; }
#wcspc-area .wcspc-item-price del { color: #6c716e; font-size: 13px; }
#wcspc-area .wcspc-item-price ins { text-decoration: none; font-weight: 700; }
#wcspc-area .wcspc-item-qty { grid-column: 2; width: auto !important; position: static !important; }
#wcspc-area .wcspc-item-qty-inner { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
#wcspc-area .wcspc-item-qty-inner > * { width: 38px !important; height: 38px !important; line-height: 38px !important; margin: 0 !important; padding: 0 !important; text-align: center; border: 1px solid #dce1dc; background: #f5f7f4; color: #28312c; }
#wcspc-area .wcspc-item-remove { grid-column: 3; grid-row: 1; position: static !important; color: #767c78 !important; width: 32px; height: 40px; display: grid; place-items: center; }
#wcspc-area .wcspc-area-bot { position: relative !important; bottom: auto !important; flex: 0 0 auto; width: 100%; padding: 16px !important; border-top: 1px solid #e7e9e6; background: #fff !important; max-height: 65%; overflow-y: auto; }
#wcspc-area .wcspc-total, #wcspc-area .wcspc-action { padding: 0 !important; margin: 0 !important; }
#wcspc-area .wcspc-total-inner { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; }
#wcspc-area .wcspc-total-right { color: #28312c !important; }
#wcspc-area .muxacra-basket-delivery { background: #f1f6ef; border-radius: 8px; padding: 12px; margin: 14px 0; font-size: 14px; line-height: 1.45; }
#wcspc-area .muxacra-basket-delivery strong { color: #346235; }
#wcspc-area .muxacra-basket-delivery p { margin: 6px 0 0; }
#wcspc-area .wcspc-action-inner { display: flex !important; flex-direction: column-reverse; gap: 8px; }
#wcspc-area .wcspc-action-inner > div { float: none !important; width: 100% !important; padding: 0 !important; }
#wcspc-area .wcspc-action a { display: flex !important; justify-content: center; align-items: center; width: 100%; min-height: 48px; height: auto !important; padding: 12px 8px !important; margin: 0 !important; border-radius: 8px; white-space: nowrap; line-height: 1.25 !important; font-size: 15px !important; text-transform: none !important; font-weight: 700; box-sizing: border-box; }
#wcspc-area .wcspc-action-right a { background: #bc3329 !important; color: #fff !important; }
#wcspc-area .wcspc-action-left a { background: #f2f3f1 !important; color: #28312c !important; }
#wcspc-area .wcspc-continue { padding: 12px 0 0 !important; color: #505b53 !important; font-size: 14px; text-transform: none; text-align: center; }
#wcspc-area a:focus-visible, #wcspc-area input:focus-visible { outline: 3px solid #bd3529; outline-offset: 2px; }

/* Override the cart plugin's gradient, including its inner scroll area. */
html body #wcspc-area.wcspc-area,
html body #wcspc-area .wcspc-area-top,
html body #wcspc-area .wcspc-items,
html body #wcspc-area .wcspc-area-bot,
html body #wcspc-area .wcspc-item,
html body #wcspc-area .wcspc-item-inner,
html body #wcspc-area .muxacra-basket-delivery {
    background: #fff !important;
    background-image: none !important;
}
html body #wcspc-area .muxacra-basket-delivery {
    border: 1px solid #e7e9e6;
}
