/* Casavoltio – ofertas de fin de año, packs, etiqueta energética. */

:root {
    --cv-offer: #FC9800;
    --cv-offer-ink: #101A2E;
    --cv-sale: #B54708;
}

/* ---------- Product cards ---------- */
.store-pcard__media {
    position: relative;
}

.store-pcard__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--cv-offer);
    color: var(--cv-offer-ink);
    font: 700 13px/1 "Inter", Arial, sans-serif;
    letter-spacing: 0.01em;
    pointer-events: none;
}

.store-pcard__badge--pack {
    background: #101A2E;
    color: #FFFFFF;
}

.store-pcard__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.store-pcard__price del,
.store-v2-pack__price s {
    color: #626873;
    font-weight: 400;
    font-size: 0.82em;
    text-decoration-thickness: 1px;
}

.store-pcard__price del .amount {
    color: inherit;
}

.store-pcard__price ins {
    text-decoration: none;
    color: var(--cv-sale);
}

.store-pcard__price ins .amount {
    color: var(--cv-sale);
}

/* ---------- EU energy class arrow ---------- */
.cv-energy {
    --c: #00A651;
    display: inline-flex;
    align-items: stretch;
    flex: none;
    height: 22px;
    vertical-align: middle;
    text-decoration: none !important;
    font: 800 14px/1 Arial, Helvetica, sans-serif;
}

.cv-energy__range {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 3px;
    border: 1px solid #1D1D1F;
    border-right: 0;
    border-radius: 2px 0 0 2px;
    background: #FFFFFF;
    color: #1D1D1F;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
}

.cv-energy__range span:first-child { color: #00A651; }
.cv-energy__range span:last-child { color: #ED1C24; }

.cv-energy__class {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 9px;
    padding: 0 3px 0 6px;
    background: var(--c);
    color: #FFFFFF;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.cv-energy__class::after {
    content: "";
    position: absolute;
    top: 0;
    right: -9px;
    border-style: solid;
    border-width: 11px 0 11px 9px;
    border-color: transparent transparent transparent var(--c);
}

.cv-energy--lg {
    height: 30px;
    font-size: 19px;
}

.cv-energy--lg .cv-energy__range {
    padding: 3px 4px;
    font-size: 9px;
}

.cv-energy--lg .cv-energy__class {
    margin-right: 12px;
    padding: 0 4px 0 8px;
}

.cv-energy--lg .cv-energy__class::after {
    right: -12px;
    border-width: 15px 0 15px 12px;
}

.cv-energy--a { --c: #00A651; }
.cv-energy--b { --c: #50B848; }
.cv-energy--c { --c: #BFD730; }
.cv-energy--d { --c: #FFF200; }
.cv-energy--e { --c: #FDB913; }
.cv-energy--f { --c: #F37021; }
.cv-energy--g { --c: #ED1C24; }

/* ---------- Product page: Omnibus + energy row ---------- */
.cv-price-extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    font-family: "Inter", Arial, sans-serif;
}

.cv-omnibus {
    display: block;
    color: #626873;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
}

.cv-energy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1D1D1F;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
}

.cv-energy-row a {
    color: #0057D9;
    text-decoration: underline;
}

.single-product .price del {
    opacity: 1;
    color: #626873;
    font-weight: 400;
}

.single-product .summary .price ins,
.single-product .summary .price ins .amount {
    text-decoration: none;
    color: var(--cv-sale);
}

/* ---------- Pack «incluye» block (product page) ---------- */
.cv-pack {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #DCE1E8;
    border-radius: 14px;
    background: #F8FAFC;
    font-family: "Inter", Arial, sans-serif;
}

.cv-pack__title {
    margin: 0 0 10px;
    color: #101A2E;
    font-size: 15px;
    font-weight: 700;
}

.cv-pack__list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-pack__item {
    margin: 0;
}

.cv-pack__item a {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: #1D1D1F;
    text-decoration: none;
}

.cv-pack__item a:hover .cv-pack__name {
    color: #0057D9;
}

.cv-pack__img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #FFFFFF;
    object-fit: contain;
}

.cv-pack__name {
    font-size: 14px;
    line-height: 1.35;
}

.cv-pack__price {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.cv-pack__save {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0 6px;
    padding-top: 12px;
    border-top: 1px solid #DCE1E8;
    font-size: 14px;
}

.cv-pack__save strong {
    color: var(--cv-sale);
}

.cv-pack__note {
    margin: 0;
    color: #626873;
    font-size: 12px;
    line-height: 1.45;
}

/* ---------- Countdown ---------- */
.cv-countdown {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    vertical-align: middle;
}

.cv-countdown__u {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.cv-countdown__u b {
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.store-v2 .store-v2-hero__deadline,
.store-v2 .store-v2-banner__deadline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
}

.store-v2 .store-v2-banner__deadline {
    margin: -8px 0 24px;
}

/* ---------- Wide campaign banners (ofertas / packs) ---------- */
.store-v2 .store-v2-banner--wide.store-v2-banner--photo {
    aspect-ratio: 3 / 1;
    min-height: 420px;
}

.store-v2 .store-v2-banner--wide.store-v2-banner--photo .store-v2-banner__text {
    max-width: min(46%, 540px);
}

.store-v2 .store-v2-offers .store-v2-eyebrow,
.store-v2 .store-v2-packs .store-v2-eyebrow {
    color: var(--cv-offer);
}

/* Offer chips */
.store-v2 .store-v2-offer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 8px;
    padding: 0;
    list-style: none;
}

.store-v2 .store-v2-offer-chips > li {
    margin: 0;
}

.store-v2 .store-v2-offer-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    border: 1px solid #DCE1E8;
    border-radius: 999px;
    background: #FFFFFF;
    color: #1D1D1F;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.store-v2 .store-v2-offer-chip b {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--cv-offer);
    color: var(--cv-offer-ink);
    font-size: 12.5px;
    font-weight: 700;
}

.store-v2 .store-v2-offer-chip:hover {
    border-color: #0057D9;
    box-shadow: 0 6px 18px rgba(16, 26, 46, 0.08);
}

/* Packs grid */
.store-v2 .store-v2-packs__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.store-v2 .store-v2-pack {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #DCE1E8;
    border-radius: 18px;
    background: #FFFFFF;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.store-v2 .store-v2-pack:hover {
    box-shadow: 0 14px 34px rgba(16, 26, 46, 0.1);
    transform: translateY(-2px);
}

.store-v2 .store-v2-pack__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    padding: 12px;
    background: #FFFFFF;
}

.store-v2 .store-v2-pack__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-v2 .store-v2-pack__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 4px 20px 22px;
}

.store-v2 .store-v2-pack__title {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
}

.store-v2 .store-v2-pack__title a {
    color: #101A2E;
    text-decoration: none;
}

.store-v2 .store-v2-pack__items {
    margin: 0;
    padding-left: 18px;
    color: #626873;
    font-size: 13px;
    line-height: 1.45;
}

.store-v2 .store-v2-pack__items li {
    margin: 0 0 3px;
}

.store-v2 .store-v2-pack__price {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
}

.store-v2 .store-v2-pack__price strong {
    color: #101A2E;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.store-v2 .store-v2-pack__price span {
    color: #626873;
    font-size: 13px;
}

.store-v2 .store-v2-pack__cta {
    justify-content: center;
    width: 100%;
}

/* Category tiles: 5 (electrodomésticos) and 2 (informática) columns */
@media (min-width: 768px) {
    .store-v2 .store-v2-tiles--5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .store-v2 .store-v2-tiles--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-v2 .store-v2-tiles--2 .store-v2-tile__media {
        aspect-ratio: 16 / 7;
    }
}

@media (max-width: 1100px) {
    .store-v2 .store-v2-packs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-v2 .store-v2-banner--wide.store-v2-banner--photo .store-v2-banner__text {
        max-width: min(58%, 520px);
    }
}

@media (max-width: 1023px) {
    .store-v2 .store-v2-banner--wide.store-v2-banner--photo {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        aspect-ratio: auto;
        min-height: 0;
        padding: 0;
        background: #06122B;
    }

    .store-v2 .store-v2-banner--wide.store-v2-banner--photo::before {
        content: none;
    }

    .store-v2 .store-v2-banner--wide.store-v2-banner--photo .store-v2-banner__visual {
        position: relative;
        inset: auto;
        order: -1;
        aspect-ratio: 940 / 860;
    }

    .store-v2 .store-v2-banner--wide .store-v2-banner__photo-img {
        object-position: center bottom;
    }

    .store-v2 .store-v2-banner--wide.store-v2-banner--photo .store-v2-banner__text {
        max-width: none;
        padding: 4px 24px 28px;
    }
}

@media (max-width: 767px) {
    .store-v2 .store-v2-offer-chips {
        flex-wrap: nowrap;
        margin-right: -20px;
        padding-right: 20px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .store-v2 .store-v2-offer-chips::-webkit-scrollbar {
        display: none;
    }

    .store-v2 .store-v2-offer-chip {
        white-space: nowrap;
    }

    .store-v2 .store-v2-packs__grid {
        grid-auto-columns: 82%;
        grid-auto-flow: column;
        grid-template-columns: none;
        margin-right: -20px;
        padding-right: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .store-v2 .store-v2-pack {
        scroll-snap-align: start;
    }

    .cv-countdown__u {
        padding: 5px 7px;
    }

    .cv-countdown__u b {
        font-size: 15px;
    }
}

/* ---------- Header: campaign menu items + top bar ---------- */
@media (min-width: 1025px) {
    #menu-store-universos > li > a {
        padding-right: 11px !important;
        padding-left: 11px !important;
    }

    #menu-store-universos > li.cv-nav-offer > a {
        color: #B54708;
    }

    #menu-store-universos > li.cv-nav-offer > a .nav-link-text::after {
        content: "−30 %" !important;
        position: static !important;
        display: inline-block !important;
        margin-left: 2px;
        padding: 3px 7px;
        border-radius: 999px;
        background: var(--cv-offer);
        color: var(--cv-offer-ink);
        font: 700 11px/1 "Inter", Arial, sans-serif;
        opacity: 1 !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
    }
}

@media (min-width: 1025px) and (max-width: 1359px) {
    #menu-store-universos > li#menu-item-12920 {
        display: none !important;
    }
}

.store-topbar__offer a {
    color: inherit;
    text-decoration: none;
}

.store-topbar__offer strong {
    color: var(--cv-offer);
    font-weight: 700;
}

/* Mega menu «Ver todo» button: single arrow, one line */
.whb-header .store-mega__all {
    white-space: nowrap;
}

.whb-header .store-mega__all::after,
.whb-header .store-mega__all::before {
    content: none !important;
    display: none !important;
}

/* Electrodomésticos banner: keep the copy clear of the fridge */
@media (min-width: 1024px) {
    .store-v2 .store-v2-electro .store-v2-banner--photo .store-v2-banner__text {
        max-width: 420px;
    }

    .store-v2 .store-v2-electro .store-v2-banner--photo::before {
        background: linear-gradient(90deg, rgba(4, 12, 32, 0.86) 0%, rgba(4, 12, 32, 0.6) 30%, rgba(4, 12, 32, 0) 50%);
    }
}

/* Mobile: odd last tile (e.g. 5 appliance categories) spans the full row */
@media (max-width: 767px) {
    .store-v2 .store-v2-tiles > li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .store-v2 .store-v2-tiles > li:last-child:nth-child(odd) .store-v2-tile__media {
        aspect-ratio: 16 / 6;
    }
}

/* Shop archives: the Elementor products widget must not be squeezed (footer overlapped short grids) */
.elementor-widget.wd-shop-product {
    flex-shrink: 0;
    height: auto !important;
}

.elementor-widget.wd-shop-product > .elementor-widget-container {
    height: auto !important;
}

/* The flex column holding the shop grid under-measured card images (percent widths) and let the
   footer overlap short archives: lay that column out as normal blocks instead. */
.elementor-element:has(> .elementor-widget.wd-shop-product) {
    display: block !important;
}

.elementor-element:has(> .elementor-widget.wd-shop-product) > .elementor-element + .elementor-element {
    margin-top: var(--widgets-spacing-row, 20px);
}

/* Mobile side menu: campaign entry */
.wd-nav-mobile > li.cv-nav-offer > a,
.mobile-nav .cv-nav-offer > a {
    color: #B54708 !important;
    font-weight: 700;
}

/* Small screens: long banner buttons wrap instead of widening the copy block */
@media (max-width: 480px) {
    .store-v2 .store-v2-banner__text {
        min-width: 0;
        max-width: 100%;
    }

    .store-v2 .store-v2-banner .store-v2-button {
        max-width: 100%;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }
}

/* Mobile: Electrodomésticos / Informática banners stacked (copy, then photo cropped on the products) */
@media (max-width: 767px) {
    .store-v2 .store-v2-computing .store-v2-banner--photo:not(.store-v2-banner--wide) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        aspect-ratio: auto;
        min-height: 0;
        padding: 0;
        background: #06122B;
    }

    .store-v2 .store-v2-computing .store-v2-banner--photo:not(.store-v2-banner--wide)::before {
        content: none;
    }

    .store-v2 .store-v2-computing .store-v2-banner--photo:not(.store-v2-banner--wide) .store-v2-banner__text {
        padding: 28px 22px 22px;
    }

    .store-v2 .store-v2-computing .store-v2-banner--photo:not(.store-v2-banner--wide) .store-v2-banner__visual {
        position: relative;
        inset: auto;
        aspect-ratio: 941 / 980;
    }

    .store-v2 .store-v2-computing .store-v2-banner--photo:not(.store-v2-banner--wide) .store-v2-banner__photo-img {
        object-position: center bottom;
    }
}

/* Shipping is always free: the WoodMart free-shipping bar is shown as completed */
.wd-free-progress-bar .progress-bar {
    width: 100% !important;
    background: #16834D !important;
}

/* Desktop: tighter vertical rhythm between homepage sections */
@media (min-width: 1024px) {
    html body.store-v2 {
        --store-section-spacing: clamp(40px, 3.9vw, 56px);
    }

    /* white section right after another white one: no double gap */
    .store-v2 .store-slot--v2-ofertas .store-v2-band,
    .store-v2 .store-slot--v2-duo .store-v2-band {
        padding-top: calc(var(--store-section-spacing) * 0.5);
    }

    .store-v2 .store-v2-head {
        margin-bottom: 28px;
    }

    .store-v2 .store-v2-offer-chips {
        margin-top: 20px;
    }
}

/* Mobile hero: centred title, lead and buttons */
@media (max-width: 767px) {
    .store-v2 .store-v2-hero__copy {
        text-align: center;
    }

    .store-v2 .store-v2-hero__title,
    .store-v2 .store-v2-hero__lead {
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .store-v2 .store-v2-hero__lead {
        max-width: 34em;
        text-wrap: balance;
    }

    .store-v2 .store-v2-hero__title {
        max-width: none;
        font-size: min(calc((100vw - 32px) / 6.1), 76px);
        line-height: 1.02;
        text-wrap: wrap;
    }

    .store-v2 .store-v2-hero__line {
        display: block;
    }

    .store-v2 .store-v2-hero__actions {
        justify-content: center;
    }
}
