/* Phase 1 single-product polish. WooCommerce structure and form semantics remain intact. */

body.havit-product-detail .page-container {
    padding-top: 26px;
    padding-bottom: 80px;
}

body.havit-product-detail .product-images-summary {
    align-items: stretch;
    gap: clamp(24px, 2.5vw, 36px);
}

body.havit-product-detail .product-images-summary::after {
    content: none !important;
    display: none !important;
}

body.havit-product-detail .woocommerce-product-gallery {
    overflow: hidden;
    border: 1px solid #e4e4df;
    border-radius: 22px;
    background: #ffffff;
    align-self: stretch;
    min-height: 0;
    max-height: none;
}

/* Hover zoom overlay should not block click-to-lightbox */
body.havit-product-detail .woocommerce-product-gallery .zoomImg {
    cursor: zoom-in;
    pointer-events: none !important;
    display: none !important; /* zoom was fighting placement; lightbox covers expand */
}

/*
 * Gallery shell: thumbs left + main stage right.
 * Its height is stable and independent from summary-copy length.
 */
body.havit-product-detail .product-images-summary > div.images.woocommerce-product-gallery,
body.havit-product-detail .woocommerce-product-gallery.woocommerce-product-gallery--with-images,
body.havit-product-detail.gallery-layout-vertical .woocommerce-product-gallery,
body.havit-product-detail .woocommerce-product-gallery {
    position: relative !important;
    top: 0 !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    height: clamp(560px, 50vw, 720px) !important;
    min-height: 0 !important;
    max-height: 720px !important;
    overflow: hidden !important;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    z-index: 6;
    right: 18px !important;
    top: 18px !important;
}

/* ---- Main image stage (right column) ---- */
body.havit-product-detail .woocommerce-product-gallery .flex-viewport,
body.havit-product-detail .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    float: none !important;
    overflow: hidden !important;
    background: #fff !important;
    border-radius: 14px;
}

/* Wrapper inside flex-viewport must fill the stage */
body.havit-product-detail .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: block !important;
}

/* Every slide fills the stage and centers its image */
body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 0 !important;
    background: #fff !important;
    float: none !important;
}

/* Active slide — controlled by havit-slide-active (our JS), not flexslider alone */
body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image.havit-slide-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2 !important;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__wrapper:not(:has(.havit-slide-active)) > .woocommerce-product-gallery__image:first-child {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1 !important;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: zoom-in;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image img,
body.havit-product-detail .woocommerce-product-gallery .flex-viewport img {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    cursor: zoom-in;
    background: transparent !important;
}

/* ---- Thumb rail (left column) ---- */
body.havit-product-detail .woocommerce-product-gallery ol.flex-control-nav,
body.havit-product-detail .woocommerce-product-gallery .flex-control-thumbs {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 88px !important;
    max-width: 88px !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 2px 0 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    list-style: none !important;
    scrollbar-width: thin;
    scrollbar-color: #cfcfc9 transparent;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    float: none !important;
    align-self: stretch !important;
}

body.havit-product-detail .woocommerce-product-gallery .flex-control-thumbs li {
    width: 76px !important;
    height: 76px !important;
    margin: 0 !important;
    float: none !important;
    flex: 0 0 76px !important;
}

body.havit-product-detail .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 76px !important;
    height: 76px !important;
    object-fit: contain !important;
    object-position: center center !important;
    border: 1px solid #e8e8e4;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

body.havit-product-detail .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: var(--havit-black);
    box-shadow: 0 0 0 1px var(--havit-black);
}

body.havit-product-detail .woocommerce-product-gallery .flex-direction-nav {
    display: none !important;
}

/* Sale badge sits on the main stage, not over thumbs */
body.havit-product-detail .woocommerce-product-gallery .product-label {
    left: 110px !important;
    top: 20px !important;
}

/* Summary height follows its own content rather than stretching the gallery. */
body.havit-product-detail .summary.entry-summary {
    height: auto;
    min-height: 0;
    align-self: start;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

@media (min-width: 901px) {
    body.havit-product-detail .product-images-summary {
        display: grid !important;
        grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
        gap: 28px !important;
        align-items: start !important;
    }

    body.havit-product-detail .product-images-summary > .woocommerce-product-gallery,
    body.havit-product-detail .product-images-summary > .summary.entry-summary {
        float: none !important;
        width: 100% !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 900px) {
    body.havit-product-detail .product-images-summary {
        display: block !important;
    }

    body.havit-product-detail .product-images-summary > div.images.woocommerce-product-gallery,
    body.havit-product-detail .product-images-summary > .woocommerce-product-gallery,
    body.havit-product-detail .product-images-summary > .summary.entry-summary {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Horizontal layout: thumbs under image */
body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery {
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
}

body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery .flex-viewport,
body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery .flex-control-thumbs {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px 0 0 !important;
}

body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery .product-label {
    left: 20px !important;
}

body.havit-product-detail.gallery-layout-horizontal .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 76px !important;
}

/* WooCommerce zoom can create a circular flex percentage calculation during
   gallery initialization and collapse the initial image to a few pixels before
   interaction. Keep the source image authoritative at every viewport. */
body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image > a {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image img.zoomImg {
    display: none !important;
}

@media (max-width: 900px) {
    /* Match the desktop gallery selector specificity so mobile truly collapses
       the 88px thumbnail column instead of placing the main stage inside it. */
    body.havit-product-detail .product-images-summary > div.images.woocommerce-product-gallery,
    body.havit-product-detail .woocommerce-product-gallery.woocommerce-product-gallery--with-images,
    body.havit-product-detail.gallery-layout-vertical .woocommerce-product-gallery,
    body.havit-product-detail .woocommerce-product-gallery {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: minmax(280px, 62vw) auto !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body.havit-product-detail .woocommerce-product-gallery .flex-viewport,
    body.havit-product-detail .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-height: min(70vw, 420px) !important;
        height: min(70vw, 420px) !important;
    }

    body.havit-product-detail .woocommerce-product-gallery ol.flex-control-nav,
    body.havit-product-detail .woocommerce-product-gallery .flex-control-thumbs {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-top: 8px !important;
    }

    body.havit-product-detail .woocommerce-product-gallery .product-label {
        left: 20px !important;
    }

    body.havit-product-detail .summary.entry-summary {
        height: auto;
    }
}

body.havit-product-detail .summary.entry-summary {
    padding: clamp(26px, 3vw, 38px);
    border: 1px solid #e2e2dd;
    border-radius: 22px;
    background: #f8f8f5;
}

body.havit-product-detail .summary .woocommerce-product-rating {
    margin-bottom: 15px;
}

body.havit-product-detail .summary .product_title {
    max-width: 22ch;
    margin-bottom: 16px;
    color: var(--havit-black);
    font-size: clamp(28px, 2.45vw, 40px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

body.havit-product-detail .summary .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid #dcdcd6;
    color: var(--havit-audio, #f6745e);
    font-size: clamp(25px, 2.1vw, 34px);
    font-weight: 700;
}

body.havit-product-detail .summary .price ins {
    color: var(--havit-audio, #f6745e);
    text-decoration: none;
}

body.havit-product-detail .summary .price del {
    order: 2;
    color: #8a8a84;
    font-size: 13px;
    font-weight: 500;
}

body.havit-product-detail .woocommerce-product-details__short-description {
    margin: 0 0 22px;
    max-width: 100%;
    overflow: hidden;
}

/* Kill accidental ChatGPT / Tailwind paste chrome inside product copy */
body.havit-product-detail .woocommerce-product-details__short-description :is(
    .flex,
    .markdown,
    .prose,
    .text-message,
    .min-h-8,
    .max-w-full,
    .flex-col,
    .flex-grow,
    .items-end,
    .gap-1,
    .gap-2,
    .w-full,
    .break-words
) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    min-height: 0 !important;
    white-space: normal !important;
}

body.havit-product-detail .woocommerce-product-details__short-description p,
body.havit-product-detail .woocommerce-product-details__short-description li,
body.havit-product-detail .woocommerce-product-details__short-description div {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #33332f !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
}

body.havit-product-detail .woocommerce-product-details__short-description p:last-child,
body.havit-product-detail .woocommerce-product-details__short-description li:last-child,
body.havit-product-detail .woocommerce-product-details__short-description div:last-child {
    margin-bottom: 0 !important;
}

body.havit-product-detail .woocommerce-product-details__short-description strong {
    display: inline !important;
    width: auto !important;
    color: var(--havit-black) !important;
    font-weight: 700 !important;
    font-size: inherit !important;
}

body.havit-product-detail .woocommerce-product-details__short-description br {
    display: block !important;
    content: "" !important;
    margin: 0 0 8px !important;
    width: 100% !important;
    height: 0 !important;
}

body.havit-product-detail .woocommerce-product-details__short-description img.emoji,
body.havit-product-detail .woocommerce-product-details__short-description img {
    display: inline !important;
    width: 1.05em !important;
    height: 1.05em !important;
    margin: 0 0.25em 0 0 !important;
    vertical-align: -0.1em;
    object-fit: contain;
    flex: none !important;
}

body.havit-product-detail .woocommerce-product-details__short-description a {
    color: var(--havit-black);
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Keep the purchase panel focused. Detailed feature/specification lists belong
   in the Description tab rather than between the price and purchase controls. */
body.havit-product-detail .woocommerce-product-details__short-description :is(ul, ol) {
    display: none !important;
}

body.havit-product-detail .woocommerce-product-details__short-description > p {
    max-width: 62ch !important;
    margin-bottom: 0 !important;
}

body.havit-product-detail .summary .ts-product-viewing,
body.havit-product-detail .summary .ts-summary-custom-content {
    display: none !important;
}

body.havit-product-detail .summary table.variations {
    margin: 0 0 20px;
}

body.havit-product-detail .summary table.variations th,
body.havit-product-detail .summary table.variations td {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
}

body.havit-product-detail .summary table.variations th label {
    display: block;
    margin-bottom: 10px;
    color: var(--havit-black);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.havit-product-detail .summary .ts-product-attribute {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.havit-product-detail .summary .ts-product-attribute .option.color {
    width: 42px;
    height: 42px;
    margin: 0;
}

body.havit-product-detail .summary .ts-product-attribute .option.color > a {
    width: 42px;
    height: 42px;
    border: 3px solid #f8f8f5;
    box-shadow: 0 0 0 1px #bdbdb7;
}

body.havit-product-detail .summary .ts-product-attribute .option.selected > a {
    box-shadow: 0 0 0 2px var(--havit-black);
}

body.havit-product-detail .summary .reset_variations {
    display: inline-block;
    margin-top: 12px;
    color: #7b3127;
    font-size: 10px;
    font-weight: 700;
    text-underline-offset: 3px;
}

body.havit-product-detail .summary .variations_button,
body.havit-product-detail .summary form.cart:not(.variations_form) {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
}

body.havit-product-detail .summary .quantity {
    width: 120px;
    margin: 0;
}

body.havit-product-detail .summary .quantity .qty-label {
    margin-bottom: 8px;
    color: var(--havit-black);
    font-size: 10px;
    font-weight: 800;
}

body.havit-product-detail .summary .quantity .number-button {
    width: 120px;
    height: 52px;
    border: 1px solid #d5d5cf;
    border-radius: 999px;
    background: #fff;
}

body.havit-product-detail .summary .single_add_to_cart_button,
body.havit-product-detail .summary .ts-buy-now-button {
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

body.havit-product-detail .summary .single_add_to_cart_button {
    align-self: end;
    background: var(--havit-black);
    color: var(--havit-white);
}

body.havit-product-detail .summary .ts-buy-now-button {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--havit-audio, #f6745e);
    color: var(--havit-black);
}

body.havit-product-detail .summary :is(.single_add_to_cart_button, .ts-buy-now-button):hover,
body.havit-product-detail .summary :is(.single_add_to_cart_button, .ts-buy-now-button):focus-visible {
    background: #d94f3b;
    color: #fff;
}

body.havit-product-detail .summary :is(button, a, input):focus-visible,
body.havit-product-detail .woocommerce-tabs a:focus-visible {
    outline: 3px solid var(--havit-audio, #f6745e);
    outline-offset: 3px;
}

body.havit-product-detail .single-product-buttons {
    margin: 14px 0 0;
}

body.havit-product-detail .havit-product-whatsapp-question {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfcfc9;
    border-radius: 999px;
    background: #fff;
    color: var(--havit-black);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

body.havit-product-detail .havit-product-whatsapp-question::before {
    content: "WA";
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    margin-right: 9px;
    border-radius: 50%;
    background: #11110f;
    color: #fff;
    font-size: 8px;
    letter-spacing: 0.05em;
}

body.havit-product-detail .havit-product-whatsapp-question:hover {
    border-color: var(--havit-audio, #f6745e);
    background: #fff2ef;
}

body.havit-product-detail .meta-content {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #dcdcd6;
}

body.havit-product-detail div.product:not(.tabs-accordion) > .woocommerce-tabs,
body.havit-product-detail .woocommerce-tabs {
    margin-top: clamp(48px, 6vw, 76px) !important;
}

body.havit-product-detail .woocommerce-tabs .tabs {
    gap: 24px;
    border-bottom: 1px solid #d9d9d3;
}

body.havit-product-detail .woocommerce-tabs .tabs li a {
    padding-bottom: 14px;
    font-size: 11px;
    font-weight: 800;
}

body.havit-product-detail .woocommerce-tabs .panel {
    max-width: 980px;
    margin: 36px auto 0;
}

body.havit-product-detail .woocommerce-tabs .product-content {
    color: #33332f;
    font-size: 14px;
    line-height: 1.75;
}

/* Product descriptions are imported from several editors. The parent theme's
   zero-indent list reset can strand markers outside the content column, while
   block paragraphs inside <li> elements push the marker onto its own line. */
body.havit-product-detail .woocommerce-tabs .product-content ul,
body.havit-product-detail .woocommerce-tabs .product-content ol {
    margin: 0 0 20px !important;
    padding-inline-start: 24px !important;
    list-style-position: outside !important;
}

body.havit-product-detail .woocommerce-tabs .product-content ul {
    list-style-type: disc !important;
}

body.havit-product-detail .woocommerce-tabs .product-content ol {
    list-style-type: decimal !important;
}

body.havit-product-detail .woocommerce-tabs .product-content li {
    margin: 0 0 7px !important;
    padding: 0 !important;
    line-height: 1.65 !important;
}

body.havit-product-detail .woocommerce-tabs .product-content li > p {
    margin: 0 !important;
}

body.havit-product-detail .woocommerce-tabs .product-content li > p:first-child {
    display: inline !important;
}

body.havit-product-detail .woocommerce-tabs .product-content li > p + p {
    display: block !important;
    margin-top: 8px !important;
}

body.havit-product-detail .woocommerce-tabs .product-content li > ul,
body.havit-product-detail .woocommerce-tabs .product-content li > ol {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

body.havit-product-detail .woocommerce-tabs .product-content h2,
body.havit-product-detail .woocommerce-tabs .product-content h3 {
    color: var(--havit-black);
    font-size: 24px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

body.havit-product-detail .woocommerce-tabs .product-content h2 {
    margin: 34px 0 14px;
}

body.havit-product-detail .woocommerce-tabs .product-content h3 {
    margin: 30px 0 12px;
}

body.havit-product-detail .woocommerce-tabs .product-content > :is(h2, h3):first-child {
    margin-top: 0;
}

body.havit-product-detail .woocommerce-tabs .product-content strong {
    font-weight: 600;
}

body.havit-product-detail .woocommerce-tabs .product-content hr {
    height: 0;
    margin: 28px 0 !important;
    border: 0 !important;
    border-top: 1px solid #deded8 !important;
}

body.havit-product-detail .woocommerce-tabs .product-content table {
    width: 100% !important;
    overflow: hidden;
    border: 1px solid #deded8 !important;
    border-radius: 14px;
}

body.havit-product-detail .woocommerce-tabs .product-content td {
    padding: 12px 14px !important;
    border-color: #deded8 !important;
}

@media (max-width: 767px) {
    body.havit-product-detail .breadcrumb-title-wrapper {
        display: none !important;
    }

    body.havit-product-detail .page-container {
        padding-top: 18px;
        padding-bottom: 64px;
    }

    body.havit-product-detail .product-images-summary {
        display: block;
        align-items: initial;
    }

    body.havit-product-detail .woocommerce-product-gallery {
        width: 100% !important;
        margin-bottom: 18px;
        padding: 10px;
        border-radius: 16px;
    }

    body.havit-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__image img {
        max-height: 300px;
    }

    body.havit-product-detail .summary.entry-summary {
        width: 100% !important;
        margin: 0 !important;
        padding: 22px 18px;
        border-radius: 16px;
    }

    body.havit-product-detail .summary .woocommerce-product-rating {
        margin-bottom: 12px;
    }

    body.havit-product-detail .summary .product_title {
        max-width: none;
        margin-bottom: 13px;
        font-size: 26px;
        line-height: 1.08;
    }

    body.havit-product-detail .summary .price {
        margin-bottom: 20px;
        padding-bottom: 18px;
        font-size: 27px;
    }

    body.havit-product-detail .summary .variations_button,
    body.havit-product-detail .summary form.cart:not(.variations_form) {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    body.havit-product-detail .summary .quantity,
    body.havit-product-detail .summary .quantity .number-button {
        width: 96px;
    }

    body.havit-product-detail .summary .quantity {
        padding-top: 30px !important;
    }

    body.havit-product-detail .summary .single_add_to_cart_button,
    body.havit-product-detail .summary .ts-buy-now-button {
        min-height: 50px;
        padding-right: 14px;
        padding-left: 14px;
    }

    body.havit-product-detail .woocommerce-tabs {
        margin-top: 58px;
    }

    body.havit-product-detail .woocommerce-tabs .tabs {
        gap: 16px;
        overflow-x: auto;
        white-space: nowrap;
    }

    body.havit-product-detail .woocommerce-tabs .panel {
        margin-top: 28px;
    }

    body.havit-product-detail .woocommerce-tabs .product-content {
        font-size: 13px;
    }

    body.havit-product-detail .woocommerce-tabs .product-content table {
        display: block;
        overflow-x: auto;
    }
}

/* Phase 1 polish: correct parent-theme simple-product geometry and hierarchy. */
body.havit-product-no-reviews .summary .woocommerce-product-rating {
    display: none !important;
}

body.havit-product-detail .havit-product-purchase-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    width: 100%;
    margin: 10px 0 18px;
    color: #55554f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1.25;
    text-transform: uppercase;
}

body.havit-product-detail .havit-product-stock-status {
    display: inline-flex;
    width: auto !important;
    min-height: 24px;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2d6f48;
    font: inherit;
}

body.havit-product-detail .havit-product-model {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-height: 24px;
    padding-left: 16px;
    border-left: 1px solid #d9d9d3;
}

body.havit-product-detail .havit-product-model strong {
    color: var(--havit-black);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.025em;
}

body.havit-product-detail .havit-product-stock-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #278552;
}

body.havit-product-detail .havit-product-stock-status.is-sold-out {
    border-color: #e1b8b2;
    background: #fff3f1;
    color: #8d2d21;
}

body.havit-product-detail .havit-product-stock-status.is-sold-out .havit-product-stock-dot {
    background: #c83c2c;
}

body.havit-product-simple .summary form.cart:not(.variations_form) {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    grid-template-areas:
        "quantity add"
        "buy buy";
    gap: 12px !important;
    align-items: end;
    width: 100% !important;
    height: auto !important;
}

body.havit-product-simple .summary form.cart:not(.variations_form) > .quantity {
    grid-area: quantity !important;
    order: 0 !important;
    float: none !important;
    width: 120px !important;
    margin: 0 !important;
}

body.havit-product-simple .summary form.cart:not(.variations_form) > .quantity .number-button {
    width: 100% !important;
}

body.havit-product-simple .summary form.cart:not(.variations_form) > .single_add_to_cart_button {
    grid-area: add !important;
    order: 0 !important;
    float: none !important;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    align-self: end !important;
    justify-content: center;
    padding: 0 24px !important;
    border-radius: 999px !important;
    line-height: 1.1 !important;
    white-space: nowrap;
}

body.havit-product-simple .summary form.cart:not(.variations_form) > .ts-buy-now-button {
    grid-area: buy !important;
    order: 0 !important;
    float: none !important;
    width: 100% !important;
    height: 52px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 24px !important;
    background: #f05b46;
    color: #11110f;
    line-height: 1.1 !important;
}

body.havit-product-detail .single-product-buttons {
    display: block !important;
    width: 100%;
    margin-top: 14px;
}

body.havit-product-detail .havit-product-whatsapp-question {
    width: 100% !important;
    min-height: 50px;
    justify-content: center;
    padding: 0 20px;
    border-color: #bdbdb7;
    font-size: 11px;
}

body.havit-product-detail .havit-product-service-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 14px 0 18px;
    padding: 12px 0;
    border-top: 1px solid #e2e2dc;
    border-bottom: 1px solid #e2e2dc;
}

body.havit-product-detail .havit-product-service-benefits a {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    color: #353530;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
}

body.havit-product-detail .havit-product-service-benefits a + a {
    border-left: 1px solid #e2e2dc;
}

body.havit-product-detail .havit-product-service-benefits a:hover,
body.havit-product-detail .havit-product-service-benefits a:focus-visible {
    color: var(--havit-red);
}

body.havit-product-detail .havit-product-service-icon {
    display: inline-grid;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    place-items: center;
    border: 1px solid #278552;
    border-radius: 50%;
    color: #278552;
    font-size: 11px;
    font-weight: 800;
}

body.havit-product-detail .summary .product_title {
    max-width: 27ch;
}

@media (min-width: 901px) {
    body.havit-product-detail .summary.entry-summary {
        padding: 32px 34px;
    }
}

@media (max-width: 767px) {
    body.havit-product-simple .summary form.cart:not(.variations_form) {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    body.havit-product-simple .summary form.cart:not(.variations_form) > .quantity {
        width: 96px !important;
    }

    body.havit-product-simple .summary form.cart:not(.variations_form) > .single_add_to_cart_button,
    body.havit-product-simple .summary form.cart:not(.variations_form) > .ts-buy-now-button {
        height: 50px !important;
        min-height: 50px !important;
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    body.havit-product-detail .havit-product-purchase-meta {
        gap: 8px 12px;
        margin-bottom: 16px;
    }

    body.havit-product-detail .havit-product-stock-status {
        margin: 0;
    }

    body.havit-product-detail .havit-product-whatsapp-question {
        min-height: 48px;
    }

    body.havit-product-detail .havit-product-service-benefits {
        grid-template-columns: 1fr;
        padding: 4px 0;
    }

    body.havit-product-detail .havit-product-service-benefits a {
        justify-content: flex-start;
        padding: 7px 4px;
        font-size: 11px;
    }

    body.havit-product-detail .havit-product-service-benefits a + a {
        border-top: 1px solid #ededE8;
        border-left: 0;
    }
}


/* Paste-guard: product description CSS must not shrink the document body. */
html body.havit-refresh { max-width: none !important; }

/* Recently-viewed layout guard: never let main .product width rules blow up carousel cards */
body.havit-product-detail .recently-viewed .product,
body.havit-product-detail .woocommerce .recently-viewed li.product,
body.havit-product-detail section.up-sells li.product,
body.havit-product-detail section.related li.product,
body.havit-product-detail .ts-product-in-content-wrapper .product {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
}
