/* Huanca single-product UI. Business logic lives in plugins. */
body.single-product .site-main,
body.single-product main,
body.single-product .woocommerce {
    width: 100%;
}

body.single-product .woocommerce-notices-wrapper,
body.single-product div.product,
body.single-product .related.products,
body.single-product .huanca-details-heading,
body.single-product .woocommerce-tabs {
    width: min(1420px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

body.single-product div.product {
    padding: 22px 0 32px;
}

body.single-product .woocommerce-breadcrumb {
    width: min(1420px, calc(100% - 48px));
    margin: 16px auto 8px;
    font-size: 12px;
    color: #8a92a8;
}

body.single-product .woocommerce-breadcrumb a {
    color: #8490ad;
    text-decoration: none;
}

body.single-product div.product .woocommerce-product-gallery {
    width: 41%;
    margin-right: 3%;
}

body.single-product div.product .summary {
    width: 37%;
    margin-right: 0;
}

body.single-product div.product .woocommerce-product-gallery__wrapper {
    border: 1px solid #edf0eb;
    background: #fff;
}

body.single-product div.product .woocommerce-product-gallery__image a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 540px;
}

body.single-product div.product .woocommerce-product-gallery__image img {
    max-height: 540px;
    width: auto;
    object-fit: contain;
    margin: auto;
}

body.single-product .flex-control-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 14px !important;
}

body.single-product .flex-control-thumbs li {
    width: 68px !important;
    border: 1px solid #dfe4dc;
    border-radius: 5px;
    overflow: hidden;
    padding: 3px;
}

body.single-product .flex-control-thumbs li:has(img.flex-active) {
    border-color: #151a17;
}

.huanca-product-eyebrow {
    margin: 3px 0 7px;
    font-size: 12px;
    font-weight: 600;
    color: #8993ad;
}

body.single-product .product_title {
    margin: 0 0 8px;
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: #101713;
}

body.single-product .woocommerce-product-rating {
    margin: 0 0 12px !important;
    font-size: 13px;
}

body.single-product .star-rating,
body.single-product .star-rating::before {
    color: #ff8a00;
}

body.single-product .summary > .price {
    display: none;
}

body.single-product .product_meta {
    font-size: 12px;
    color: #7c847c;
    margin-top: 14px;
}

.huanca-offer-card {
    margin: 14px 0 14px;
    border: 1px solid #dce5d6;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 7px 22px rgba(24, 49, 19, .06);
}

.huanca-offer-card__bar {
    min-height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #2f5f2b;
    border-bottom: 3px solid #95c233;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.huanca-offer-card__title,
.huanca-offer-card__stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.huanca-offer-dot {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #95c233;
    color: #fff;
    font-size: 11px;
}

.huanca-offer-card__stock span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #a8e23b;
    box-shadow: 0 0 0 3px rgba(168,226,59,.16);
}

.huanca-offer-card__body {
    padding: 14px;
}

.huanca-offer-card__price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.huanca-offer-card__price-row small,
.huanca-offer-card__before,
.huanca-offer-card__saving > span {
    font-size: 11px;
    color: #737b72;
}

.huanca-offer-card__price {
    margin-top: 1px;
    font-size: 40px;
    line-height: .98;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: #111816;
}

.huanca-offer-card__price .woocommerce-Price-currencySymbol {
    font-size: .7em;
}

.huanca-offer-card__before {
    margin-top: 3px;
}

.huanca-offer-card__saving {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    padding-bottom: 2px;
}

.huanca-offer-card__saving strong {
    color: #07882d;
}

.huanca-offer-card__discount {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 18px;
    background: #fff0f3;
    color: #ee2349;
    font-size: 13px;
    font-weight: 900;
}

.huanca-offer-card__discount img {
    width: 12px;
    max-height: 22px;
    object-fit: contain;
}

.huanca-installments {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    padding: 11px 13px;
    border: 1px solid #d7e2cc;
    border-left: 5px solid #95c233;
    border-radius: 12px;
    background: #fbfdf9;
}

.huanca-installments__card {
    width: 42px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 5px;
    background: linear-gradient(#2d5d28 0 34%, #eff5e9 34% 100%);
}

.huanca-installments strong {
    display: block;
    font-size: 11px;
    color: #23311f;
}

.huanca-installments b {
    font-size: 20px;
    color: #142319;
}

.huanca-installments span,
.huanca-installments small {
    font-size: 10px;
    color: #50594f;
}

.huanca-bank-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 10px;
    color: #70786e;
}

.huanca-bank-row img {
    width: auto;
    height: 22px;
    max-width: 78px;
    object-fit: contain;
}

body.single-product .woocommerce-product-details__short-description {
    position: relative;
    margin: 14px 0 16px;
    padding: 16px 18px;
    border-radius: 10px;
    background: #fbfbfb;
    border-left: 4px solid #e2ad1e;
    color: #1d241e;
    font-size: 14px;
    line-height: 1.45;
}

body.single-product .woocommerce-product-details__short-description p {
    margin: 0;
}

/* Pack UI supplied by the Huanca Product Packs plugin. */
.huanca-packs {
    margin: 18px 0 0;
}

.huanca-packs__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #6d9a18;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .03em;
}

.huanca-packs__heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 10px;
}

.huanca-packs__heading h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.1;
    color: #121914;
}

.huanca-packs__heading small {
    font-size: 10px;
    color: #6e766c;
}

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

.huanca-pack {
    position: relative;
    display: grid;
    grid-template-columns: 28px 58px 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 80px;
    padding: 11px 13px;
    border: 1px solid #dfe4db;
    border-radius: 13px;
    cursor: pointer;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.huanca-pack:hover {
    border-color: #a9c979;
}

.huanca-pack:has(input:checked) {
    border: 2px solid #8bc429;
    box-shadow: 0 4px 14px rgba(116, 162, 30, .12);
}

.huanca-pack input {
    width: 21px;
    height: 21px;
    margin: 0;
    accent-color: #8bc429;
}

.huanca-pack__image {
    position: relative;
    display: grid;
    place-items: center;
}

.huanca-pack__image img {
    width: 42px;
    height: 55px;
    object-fit: contain;
}

.huanca-pack__qty {
    position: absolute;
    right: 0;
    bottom: -3px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    background: #225f36;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.huanca-pack__copy strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    color: #151b16;
}

.huanca-pack__copy small {
    font-size: 10px;
    color: #6d756b;
}

.huanca-pack__unit-price {
    display: block;
    color: #168628 !important;
    font-weight: 800;
}

.huanca-pack__saving {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 4px;
    background: #eef8e9;
    color: #16832a;
    font-size: 9px;
    font-weight: 800;
}

.huanca-pack__total {
    min-width: 92px;
    text-align: right;
}

.huanca-pack__total small {
    display: block;
    font-size: 9px;
    color: #777f75;
}

.huanca-pack__total del {
    display: block;
    font-size: 10px;
    color: #99a098;
}

.huanca-pack__total strong {
    display: block;
    font-size: 20px;
    line-height: 1.05;
    color: #101612;
}

.huanca-pack__badge {
    position: absolute;
    right: 10px;
    top: -10px;
    padding: 4px 10px;
    border-radius: 12px;
    background: #5f962a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.huanca-pack--best .huanca-pack__badge {
    background: #315f43;
}

.huanca-pack__bottom-note {
    grid-column: 2 / -1;
    margin: -1px 0 0;
    padding: 4px 8px;
    border-radius: 5px;
    background: #f2f8ef;
    color: #315f2b;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.huanca-pack-form .quantity {
    display: none !important;
}

.huanca-pack-form .single_add_to_cart_button {
    width: 100%;
    min-height: 58px;
    margin-top: 14px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: #80c33b !important;
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.huanca-pack-form .single_add_to_cart_button::after {
    content: 'No te quedes sin el tuyo';
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    opacity: .94;
}

@keyframes huancaCartNudge {
    0%, 88%, 100% { transform: translateX(0); }
    90% { transform: translateX(-4px) rotate(-.7deg); }
    92% { transform: translateX(4px) rotate(.7deg); }
    94% { transform: translateX(-3px) rotate(-.5deg); }
    96% { transform: translateX(3px) rotate(.5deg); }
    98% { transform: translateX(0); }
}

.huanca-pack-form .single_add_to_cart_button:not(:disabled) {
    animation: huancaCartNudge 4.2s ease-in-out infinite;
}

/* Description + reviews: centered and compact. */
.huanca-details-heading {
    max-width: 900px;
    padding-top: 28px;
    text-align: center;
}

.huanca-details-heading span {
    color: #719f21;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.huanca-details-heading h2 {
    margin: 4px 0 0;
    font-size: 26px;
    color: #162019;
}

body.single-product .woocommerce-tabs {
    max-width: 900px;
    padding: 0 0 48px;
}

body.single-product .woocommerce-tabs ul.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 22px !important;
    padding: 0 !important;
    border: 0 !important;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e2e7df !important;
    border-radius: 999px !important;
    background: #fff !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
    padding: 9px 16px !important;
    color: #626b61 !important;
    font-size: 12px;
    font-weight: 700 !important;
}

body.single-product .woocommerce-tabs ul.tabs li.active {
    border-color: #8fbd45 !important;
    background: #f4faef !important;
}

body.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #39661c !important;
}

body.single-product .woocommerce-tabs .panel {
    max-width: 820px;
    margin: 0 auto !important;
    color: #303831;
    font-size: 15px;
    line-height: 1.7;
}

body.single-product .woocommerce-tabs .panel h2:first-child {
    display: none;
}

@media (max-width: 1100px) {
    body.single-product div.product .woocommerce-product-gallery {
        width: 48%;
    }

    body.single-product div.product .summary {
        width: 48%;
    }
}

@media (max-width: 767px) {
    body.single-product .woocommerce-notices-wrapper,
    body.single-product div.product,
    body.single-product .related.products,
    body.single-product .huanca-details-heading,
    body.single-product .woocommerce-tabs,
    body.single-product .woocommerce-breadcrumb {
        width: calc(100% - 20px);
    }

    body.single-product div.product {
        padding-top: 8px;
    }

    body.single-product div.product .woocommerce-product-gallery,
    body.single-product div.product .summary {
        width: 100%;
        float: none;
        margin-right: 0;
    }

    body.single-product div.product .woocommerce-product-gallery__image a {
        min-height: 365px;
    }

    body.single-product div.product .woocommerce-product-gallery__image img {
        max-height: 365px;
    }

    body.single-product .flex-control-thumbs li {
        width: 58px !important;
    }

    .huanca-product-eyebrow {
        margin-top: 14px;
    }

    body.single-product .product_title {
        font-size: 24px;
    }

    .huanca-offer-card__price {
        font-size: 34px;
    }

    .huanca-bank-row {
        gap: 7px;
    }

    .huanca-bank-row img {
        height: 18px;
        max-width: 62px;
    }

    .huanca-pack {
        grid-template-columns: 24px 48px 1fr auto;
        padding: 10px;
    }

    .huanca-pack__image img {
        width: 36px;
        height: 48px;
    }

    .huanca-pack__copy strong {
        font-size: 13px;
    }

    .huanca-pack__total {
        min-width: 75px;
    }

    .huanca-pack__total strong {
        font-size: 18px;
    }

    .huanca-details-heading {
        padding-top: 20px;
    }

    .huanca-details-heading h2 {
        font-size: 21px;
    }

    body.single-product .woocommerce-tabs {
        padding-bottom: 28px;
    }

    body.single-product .woocommerce-tabs ul.tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px !important;
    }

    body.single-product .woocommerce-tabs .panel {
        max-width: none;
        font-size: 14px;
        line-height: 1.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .huanca-pack-form .single_add_to_cart_button {
        animation: none !important;
    }
}
