/* =========================================================
   HATACA.VN - CHI TIẾT SẢN PHẨM - FINAL CLEAN
   File: chi-tiet-san-pham.css
   Chỉ dùng cho WooCommerce single product.
   Header dùng chung từ hataca-global.css.
   Container chuẩn: 1100px.
   ========================================================= */

body.single-product {
    --hataca-product-container: 1100px;
    --hataca-product-gutter: 24px;
    --hataca-product-blue: #0057B8;
    --hataca-product-green: #16823A;
    --hataca-product-title: #12304A;
    --hataca-product-text: #374151;
    --hataca-product-muted: #64748B;
    --hataca-product-border: #E1E8EF;

    background: #FFFFFF;
    overflow-x: clip;
}


/* =========================================================
   1. MAIN / CONTAINER - EXACT HTML HATACA
   ========================================================= */

body.single-product .wp-site-blocks > .wp-block-group.woocommerce.product {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    overflow: visible !important;
}

body.single-product .wp-site-blocks > .wp-block-group.woocommerce.product > main,
body.single-product main.has-global-padding {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 26px 0 80px !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body.single-product main > .wp-block-breadcrumbs,
body.single-product main > .wc-block-store-notices,
body.single-product main > .wp-block-columns.alignwide,
body.single-product main > .wp-block-woocommerce-product-details.alignwide,
body.single-product main > .wp-block-woocommerce-product-collection.alignwide {
    width: calc(100% - (var(--hataca-product-gutter) * 2)) !important;
    max-width: var(--hataca-product-container) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}


/* =========================================================
   2. BREADCRUMB - LUÔN HIỂN THỊ TRÊN KHỐI SẢN PHẨM
   ========================================================= */

body.single-product main > .wp-block-breadcrumbs {
    display: block !important;
    position: relative !important;
    z-index: 20 !important;
    height: auto !important;
    min-height: 46px !important;
    max-height: none !important;
    margin-top: 0 !important;
    margin-bottom: 26px !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    transform: none !important;
    background: transparent !important;
}

body.single-product main > .wp-block-breadcrumbs .woocommerce-breadcrumb {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    color: var(--hataca-product-muted) !important;
    background: #F6F9FC !important;
    border: 1px solid var(--hataca-product-border) !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    box-sizing: border-box !important;
}

body.single-product main > .wp-block-breadcrumbs .woocommerce-breadcrumb a {
    color: var(--hataca-product-blue) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body.single-product main > .wp-block-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: #27853F !important;
}

body.single-product main > .wc-block-store-notices {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
}

body.single-product main > .wc-block-store-notices:has(.woocommerce-notices-wrapper:empty) {
    display: none !important;
}


/* =========================================================
   3. HÀNG SẢN PHẨM CHÍNH
   - Không có dải nền kéo full màn hình.
   - Ảnh trái + thông tin phải cùng nền trắng.
   ========================================================= */

body.single-product main > .wp-block-columns.alignwide {
    width: calc(100% - (var(--hataca-product-gutter) * 2)) !important;
    max-width: var(--hataca-product-container) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 42px !important;
    background: #FFFFFF !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body.single-product main > .wp-block-columns.alignwide > .wp-block-column {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    align-self: flex-start !important;
}

body.single-product main > .wp-block-columns.alignwide > .wp-block-column:first-child {
    position: relative !important;
    flex: 0 0 calc(50% - 21px) !important;
}

body.single-product main > .wp-block-columns.alignwide > .wp-block-column:last-child {
    flex: 1 1 calc(50% - 21px) !important;
    padding-top: 4px !important;
}

body.single-product main > .wp-block-columns.alignwide > .wp-block-column > * {
    margin-block-start: 0 !important;
}

body.single-product main > .wp-block-columns.alignwide
> .wp-block-column:last-child > h1.wp-block-post-title {
    background: transparent !important;
    background-image: none !important;
}

body.single-product main div.product {
    position: relative !important;
    clear: both !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.single-product main div.product::after {
    content: "";
    display: table;
    clear: both;
}


/* =========================================================
   4. THƯ VIỆN ẢNH - CHỈ 1 KHUNG
   ========================================================= */

body.single-product .wp-block-woocommerce-product-image-gallery {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.single-product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery,
body.single-product div.product .woocommerce-product-gallery {
    position: relative !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px !important;

    overflow: hidden !important;
    border: 1px solid var(--hataca-product-border) !important;
    border-radius: 16px !important;
    background: #FFFFFF !important;
    box-shadow: 0 8px 30px rgba(18, 48, 74, .06) !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce-product-gallery__wrapper {
    margin: 0 !important;
}

body.single-product .woocommerce-product-gallery__image {
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .wp-block-woocommerce-product-image-gallery img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    object-fit: contain !important;
}

/* Nút kính lúp nằm đúng trong khung ảnh */
body.single-product .woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    z-index: 40 !important;
}


/* Thumbnail */
body.single-product .flex-control-thumbs {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.single-product .flex-control-thumbs li {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-product .flex-control-thumbs img {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    padding: 5px !important;
    border: 1px solid var(--hataca-product-border) !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}

body.single-product .flex-control-thumbs img.flex-active,
body.single-product .flex-control-thumbs img:hover {
    border-color: var(--hataca-product-blue) !important;
}


/* =========================================================
   5. BADGE GIẢM GIÁ
   - Bám vào góc trái khung hình.
   ========================================================= */

body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
> .wp-block-column:first-child > .onsale,

body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
.wp-block-woocommerce-product-image-gallery > .onsale,

body.single-product main div.product .woocommerce-product-gallery > .onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    bottom: auto !important;

    width: max-content !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 7px 11px !important;

    border: 0 !important;
    border-radius: 7px !important;
    background: #C62828 !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;

    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;

    transform: none !important;
    z-index: 50 !important;
    box-sizing: border-box !important;
}

body.single-product main .wp-block-woocommerce-product-image-gallery .wc-block-components-product-sale-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    bottom: auto !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 7px 11px !important;

    border: 0 !important;
    border-radius: 7px !important;
    background: #C62828 !important;
    color: #FFFFFF !important;

    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;

    transform: none !important;
    z-index: 50 !important;
}


/* =========================================================
   6. THÔNG TIN SẢN PHẨM BÊN PHẢI
   ========================================================= */

/* Không tạo thêm một card thứ hai ở cột phải */
body.single-product div.product .summary,
body.single-product div.product .summary.entry-summary {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

body.single-product .product_title,
body.single-product div.product .summary .wp-block-post-title,
body.single-product main > .wp-block-columns.alignwide
> .wp-block-column:last-child .wp-block-post-title {
    margin: 0 0 18px !important;
    padding: 0 !important;
    color: var(--hataca-product-title) !important;
    background: transparent !important;
    background-image: none !important;
    font-size: clamp(34px, 3.6vw, 44px) !important;
    font-weight: 750 !important;
    line-height: 1.16 !important;
    letter-spacing: -.025em !important;
}


/* =========================================================
   7. GIÁ
   ========================================================= */

body.single-product div.product .summary .price,
body.single-product .summary .wp-block-woocommerce-product-price,
body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
> .wp-block-column:last-child .wp-block-woocommerce-product-price {
    margin: 0 0 24px !important;
    color: var(--hataca-product-green) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.single-product div.product .summary .price del,
body.single-product .summary .wp-block-woocommerce-product-price del,
body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
> .wp-block-column:last-child .wp-block-woocommerce-product-price del {
    margin-right: 8px !important;
    color: #7B8794 !important;
    -webkit-text-fill-color: #7B8794 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

body.single-product div.product .summary .price ins,
body.single-product .summary .wp-block-woocommerce-product-price ins,
body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
> .wp-block-column:last-child .wp-block-woocommerce-product-price ins {
    color: var(--hataca-product-green) !important;
    -webkit-text-fill-color: var(--hataca-product-green) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}


/* =========================================================
   8. MÔ TẢ NGẮN
   ========================================================= */

body.single-product .woocommerce-product-details__short-description {
    margin: 0 0 22px !important;
    color: var(--hataca-product-text) !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
}

body.single-product .woocommerce-product-details__short-description p {
    margin: 0 0 12px !important;
}


/* =========================================================
   9. SỐ LƯỢNG + THÊM VÀO GIỎ
   ========================================================= */

body.single-product div.product form.cart,
body.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 12px !important;

    margin: 24px 0 !important;
    padding: 20px 0 !important;

    border-top: 1px solid #E5EBF1 !important;
    border-bottom: 1px solid #E5EBF1 !important;
}

body.single-product div.product form.cart .quantity,
body.single-product .wp-block-woocommerce-add-to-cart-form .quantity {
    margin: 0 !important;
}

body.single-product div.product form.cart .qty,
body.single-product .wp-block-woocommerce-add-to-cart-form .qty {
    width: 76px !important;
    height: 48px !important;
    padding: 0 10px !important;

    border: 1px solid #D7E0E8 !important;
    border-radius: 8px !important;
    outline: 0 !important;

    background: #FFFFFF !important;
    color: var(--hataca-product-title) !important;

    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

body.single-product div.product form.cart .qty:focus,
body.single-product .wp-block-woocommerce-add-to-cart-form .qty:focus {
    border-color: var(--hataca-product-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 87, 184, .10) !important;
}

body.single-product div.product .single_add_to_cart_button,
body.single-product .wp-block-woocommerce-add-to-cart-form button {
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 26px !important;

    border: 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(90deg, #0057B8 0%, #168A55 100%) !important;

    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;

    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

body.single-product div.product .single_add_to_cart_button:hover,
body.single-product .wp-block-woocommerce-add-to-cart-form button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 18px rgba(0, 87, 184, .16) !important;
}


/* =========================================================
   10. META / DANH MỤC / TAG
   ========================================================= */

body.single-product .product_meta {
    margin-top: 20px !important;
    padding-top: 18px !important;
    border-top: 1px solid #E5EBF1 !important;

    color: var(--hataca-product-muted) !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
}

body.single-product .product_meta > span {
    display: block !important;
    margin-bottom: 4px !important;
}

body.single-product .product_meta a {
    color: var(--hataca-product-blue) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}


/* =========================================================
   11. TABS SẢN PHẨM
   ========================================================= */

body.single-product .woocommerce-tabs,
body.single-product .wp-block-woocommerce-product-details {
    clear: both !important;
    margin-top: 58px !important;
}

body.single-product .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;

    margin: 0 !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #DDE5EC !important;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs::after,
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 #DCE4EB !important;
    border-radius: 8px !important;
    background: #F7FAFC !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 11px 18px !important;

    color: var(--hataca-product-title) !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    text-decoration: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li.active {
    border-color: var(--hataca-product-blue) !important;
    background: var(--hataca-product-blue) !important;
}

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

body.single-product .woocommerce-tabs .panel {
    margin: 0 !important;
    padding: 30px 0 10px !important;

    color: var(--hataca-product-text) !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}

body.single-product .woocommerce-tabs .panel > h2:first-child {
    margin-top: 0 !important;
}

body.single-product .woocommerce-tabs .panel h2 {
    color: var(--hataca-product-title) !important;
    font-size: clamp(25px, 3vw, 32px) !important;
}

body.single-product .woocommerce-tabs .panel h3 {
    color: var(--hataca-product-title) !important;
    font-size: 22px !important;
}


/* =========================================================
   12. BẢNG THÔNG SỐ
   ========================================================= */

body.single-product .woocommerce-tabs table,
body.single-product table.woocommerce-product-attributes {
    width: 100% !important;
    margin: 22px 0 !important;
    border-collapse: collapse !important;
    background: #FFFFFF !important;
    font-size: 15px !important;
}

body.single-product .woocommerce-tabs table th,
body.single-product .woocommerce-tabs table td,
body.single-product table.woocommerce-product-attributes th,
body.single-product table.woocommerce-product-attributes td {
    padding: 13px 14px !important;
    border: 1px solid #DCE4EC !important;
    vertical-align: top !important;
}

body.single-product table.woocommerce-product-attributes th {
    width: 30% !important;
    background: #F5F8FB !important;
    color: var(--hataca-product-title) !important;
    font-weight: 750 !important;
}


/* =========================================================
   13. SẢN PHẨM TƯƠNG TỰ / LIÊN QUAN
   ========================================================= */

body.single-product main .wp-block-woocommerce-related-products,
body.single-product main .related.products,
body.single-product main .upsells.products {
    width: calc(100% - (var(--hataca-product-gutter) * 2)) !important;
    max-width: var(--hataca-product-container) !important;
    margin: 58px auto 0 !important;
    padding: 0 !important;
    clear: both !important;
    box-sizing: border-box !important;
}

/* Tiêu đề */
body.single-product main .wp-block-woocommerce-related-products h2,
body.single-product main .wp-block-woocommerce-related-products h3,
body.single-product main .wp-block-woocommerce-related-products .wp-block-heading,
body.single-product main .related.products > h2,
body.single-product main .related.products > h3,
body.single-product main .upsells.products > h2,
body.single-product main .upsells.products > h3 {
    position: relative !important;
    margin: 0 0 26px !important;
    padding: 0 0 12px !important;

    color: var(--hataca-product-title) !important;
    font-size: clamp(24px, 2.6vw, 32px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -.02em !important;
    text-align: left !important;
}

body.single-product main .wp-block-woocommerce-related-products h2::after,
body.single-product main .wp-block-woocommerce-related-products h3::after,
body.single-product main .wp-block-woocommerce-related-products .wp-block-heading::after,
body.single-product main .related.products > h2::after,
body.single-product main .related.products > h3::after,
body.single-product main .upsells.products > h2::after,
body.single-product main .upsells.products > h3::after {
    content: "" !important;
    display: block !important;
    width: 58px !important;
    height: 3px !important;
    margin-top: 10px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #0057B8 0 58%, #34A853 58% 100%) !important;
}


/* Grid WooCommerce Block */
body.single-product main .wc-block-product-template {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;
    align-items: stretch !important;

    list-style: none !important;
}

body.single-product main .wc-block-product-template::before,
body.single-product main .wc-block-product-template::after {
    display: none !important;
    content: none !important;
}


/* Card */
body.single-product main .wc-block-product-template > li,
body.single-product main .wc-block-product-template > .wc-block-product {
    position: relative !important;
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 0 22px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
    border: 1px solid #E3E9EF !important;
    border-radius: 14px !important;
    background: #FFFFFF !important;
    box-shadow: 0 5px 20px rgba(18, 48, 74, .06) !important;

    box-sizing: border-box !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease !important;
}

body.single-product main .wc-block-product-template > li:hover,
body.single-product main .wc-block-product-template > .wc-block-product:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(0, 87, 184, .24) !important;
    box-shadow: 0 14px 36px rgba(18, 48, 74, .12) !important;
}


/* Ảnh card */
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-image {
    position: relative !important;
    width: 100% !important;
    margin: 0 0 17px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
}

body.single-product main .wc-block-product-template .wp-block-woocommerce-product-image > a {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
}

body.single-product main .wc-block-product-template .wp-block-woocommerce-product-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;

    margin: 0 !important;
    padding: 12px !important;
    object-fit: contain !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;

    transition: transform .35s ease !important;
}

body.single-product main .wc-block-product-template > li:hover .wp-block-woocommerce-product-image img,
body.single-product main .wc-block-product-template > .wc-block-product:hover .wp-block-woocommerce-product-image img {
    transform: scale(1.035) !important;
}


/* Badge khuyến mãi card - luôn 1 dòng */
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-sale-badge {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    overflow: visible !important;
    z-index: 20 !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-sale-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: max-content !important;
    min-width: 90px !important;
    max-width: none !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 7px 11px !important;

    border: 0 !important;
    border-radius: 6px !important;
    background: #E53935 !important;

    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;

    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-align: center !important;

    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    box-sizing: border-box !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-sale-badge__text {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    white-space: nowrap !important;
}


/* Tên card */
body.single-product main .wc-block-product-template .wp-block-post-title {
    min-height: 52px !important;
    margin: 0 0 10px !important;
    padding: 0 17px !important;

    color: var(--hataca-product-title) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: left !important;
}

body.single-product main .wc-block-product-template .wp-block-post-title a {
    color: var(--hataca-product-title) !important;
    text-decoration: none !important;
}

body.single-product main .wc-block-product-template .wp-block-post-title a:hover {
    color: var(--hataca-product-blue) !important;
}


/* Giá card */
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-price {
    width: 100% !important;
    margin: 0 0 15px !important;
    padding: 0 17px !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-price {
    color: var(--hataca-product-green) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-price del {
    margin-right: 5px !important;
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-price ins {
    color: var(--hataca-product-green) !important;
    -webkit-text-fill-color: var(--hataca-product-green) !important;
    text-decoration: none !important;
}


/* Nút card */
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-button {
    width: 100% !important;
    margin: auto 0 0 !important;
    padding: 0 17px !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;

    text-align: left !important;
    box-sizing: border-box !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-button__button,
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-button .wp-block-button__link {
    width: auto !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 10px 17px !important;

    border: 2px solid var(--hataca-product-blue) !important;
    border-radius: 7px !important;
    background: var(--hataca-product-blue) !important;

    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.single-product main .wc-block-product-template .wc-block-components-product-button__button:hover,
body.single-product main .wc-block-product-template .wp-block-woocommerce-product-button .wp-block-button__link:hover {
    border-color: #34A853 !important;
    background: #34A853 !important;
    transform: translateY(-1px) !important;
}


/* =========================================================
   14. FALLBACK WOOCOMMERCE CLASSIC - RELATED / UPSELLS
   ========================================================= */

body.single-product main .related.products ul.products,
body.single-product main .upsells.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;

    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.single-product main .related.products ul.products::before,
body.single-product main .related.products ul.products::after,
body.single-product main .upsells.products ul.products::before,
body.single-product main .upsells.products ul.products::after {
    display: none !important;
    content: none !important;
}

body.single-product main .related.products ul.products li.product,
body.single-product main .upsells.products ul.products li.product {
    position: relative !important;
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 0 22px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
    border: 1px solid #E3E9EF !important;
    border-radius: 14px !important;
    background: #FFFFFF !important;
    box-shadow: 0 5px 20px rgba(18, 48, 74, .06) !important;
}

body.single-product main .related.products ul.products li.product a img,
body.single-product main .upsells.products ul.products li.product a img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;

    margin: 0 0 17px !important;
    padding: 12px !important;
    object-fit: contain !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
}

body.single-product main .related.products .woocommerce-loop-product__title,
body.single-product main .upsells.products .woocommerce-loop-product__title {
    min-height: 52px !important;
    margin: 0 0 10px !important;
    padding: 0 17px !important;

    color: var(--hataca-product-title) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    text-align: left !important;
}

body.single-product main .related.products .price,
body.single-product main .upsells.products .price {
    margin: 0 0 15px !important;
    padding: 0 17px !important;

    color: var(--hataca-product-green) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    text-align: left !important;
}

body.single-product main .related.products .button,
body.single-product main .upsells.products .button {
    width: auto !important;
    min-height: 42px !important;

    margin: auto 17px 0 !important;
    padding: 10px 17px !important;
    align-self: flex-start !important;

    border: 2px solid var(--hataca-product-blue) !important;
    border-radius: 7px !important;
    background: var(--hataca-product-blue) !important;

    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}


/* =========================================================
   15. TABLET
   ========================================================= */

@media (max-width: 1024px) {

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) {
        gap: 28px !important;
    }

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:first-child {
        flex-basis: calc(48% - 14px) !important;
    }

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:last-child {
        flex-basis: calc(52% - 14px) !important;
    }

    body.single-product .product_title,
    body.single-product div.product .summary .wp-block-post-title,
    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:last-child .wp-block-post-title {
        font-size: 36px !important;
    }
}

@media (max-width: 900px) {

    body.single-product main .wc-block-product-template,
    body.single-product main .related.products ul.products,
    body.single-product main .upsells.products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }
}


/* =========================================================
   16. MOBILE
   ========================================================= */

@media (max-width: 781px) {

    body.single-product {
        --hataca-product-gutter: 18px;
    }

    body.single-product main,
    body.single-product main.has-global-padding {
        padding-top: 24px !important;
        padding-right: 0 !important;
        padding-bottom: 60px !important;
        padding-left: 0 !important;
    }

    body.single-product main > .alignwide,
    body.single-product main > .woocommerce,
    body.single-product main > div.product,
    body.single-product main > .woocommerce-tabs,
    body.single-product main > .related.products,
    body.single-product main > .upsells.products,
    body.single-product main > .wp-block-woocommerce-product-details,
    body.single-product main > .wp-block-woocommerce-related-products,
    body.single-product main > .wp-block-woocommerce-upsells,
    body.single-product main > .wp-block-breadcrumbs,
    body.single-product main > .wc-block-breadcrumbs {
        width: calc(100% - 36px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.single-product main .wc-block-breadcrumbs,
    body.single-product main .wp-block-breadcrumbs {
        margin-bottom: 20px !important;
    }

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) {
        width: calc(100% - 36px) !important;
        max-width: none !important;

        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:first-child,
    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:last-child {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
        padding-top: 0 !important;
    }

    body.single-product .wp-block-woocommerce-product-image-gallery {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.single-product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery,
    body.single-product div.product .woocommerce-product-gallery {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px !important;
        border-radius: 13px !important;
    }

    body.single-product .product_title,
    body.single-product div.product .summary .wp-block-post-title,
    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:last-child .wp-block-post-title {
        margin-bottom: 14px !important;
        font-size: 30px !important;
        line-height: 1.2 !important;
    }

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:first-child > .onsale,

    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    .wp-block-woocommerce-product-image-gallery > .onsale,

    body.single-product main div.product .woocommerce-product-gallery > .onsale,

    body.single-product main .wp-block-woocommerce-product-image-gallery
    .wc-block-components-product-sale-badge {
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        margin: 0 !important;
        transform: none !important;
    }

    body.single-product .woocommerce-product-gallery__trigger {
        top: 10px !important;
        right: 10px !important;
    }

    body.single-product .woocommerce-tabs {
        margin-top: 42px !important;
    }

    body.single-product .woocommerce-tabs .panel table,
    body.single-product table.woocommerce-product-attributes {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.single-product main .wp-block-woocommerce-related-products,
    body.single-product main .related.products,
    body.single-product main .upsells.products {
        width: calc(100% - 36px) !important;
        max-width: none !important;
    }
}


/* =========================================================
   17. MOBILE NHỎ
   ========================================================= */

@media (max-width: 600px) {

    body.single-product .product_title,
    body.single-product div.product .summary .wp-block-post-title,
    body.single-product main .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery)
    > .wp-block-column:last-child .wp-block-post-title {
        font-size: 27px !important;
    }

    body.single-product .woocommerce-product-details__short-description {
        font-size: 15px !important;
    }

    body.single-product .woocommerce-tabs ul.tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    body.single-product .woocommerce-tabs ul.tabs li {
        width: 100% !important;
        text-align: center !important;
    }

    body.single-product main .wc-block-product-template,
    body.single-product main .related.products ul.products,
    body.single-product main .upsells.products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.single-product main .wc-block-product-template > li,
    body.single-product main .wc-block-product-template > .wc-block-product,
    body.single-product main .related.products ul.products li.product,
    body.single-product main .upsells.products ul.products li.product {
        padding-bottom: 15px !important;
        border-radius: 10px !important;
    }

    body.single-product main .wc-block-product-template .wp-block-woocommerce-product-image img {
        padding: 7px !important;
    }

    body.single-product main .wc-block-product-template .wp-block-woocommerce-product-sale-badge {
        top: 9px !important;
        right: 9px !important;
    }

    body.single-product main .wc-block-product-template .wc-block-components-product-sale-badge {
        min-width: 82px !important;
        padding: 6px 9px !important;
        font-size: 11px !important;
    }

    body.single-product main .wp-block-woocommerce-related-products h2,
    body.single-product main .wp-block-woocommerce-related-products h3,
    body.single-product main .wp-block-woocommerce-related-products .wp-block-heading,
    body.single-product main .related.products > h2,
    body.single-product main .related.products > h3,
    body.single-product main .upsells.products > h2,
    body.single-product main .upsells.products > h3 {
        margin-bottom: 20px !important;
        padding-bottom: 9px !important;
        font-size: 23px !important;
    }

    body.single-product main .wc-block-product-template .wp-block-post-title,
    body.single-product main .related.products .woocommerce-loop-product__title,
    body.single-product main .upsells.products .woocommerce-loop-product__title {
        min-height: 44px !important;
        padding-left: 11px !important;
        padding-right: 11px !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    body.single-product main .wc-block-product-template .wp-block-woocommerce-product-price,
    body.single-product main .related.products .price,
    body.single-product main .upsells.products .price {
        padding-left: 11px !important;
        padding-right: 11px !important;
    }

    body.single-product main .wc-block-product-template .wc-block-components-product-price,
    body.single-product main .related.products .price,
    body.single-product main .upsells.products .price {
        font-size: 15px !important;
    }

    body.single-product main .wc-block-product-template .wp-block-woocommerce-product-button {
        padding-left: 11px !important;
        padding-right: 11px !important;
    }

    body.single-product main .wc-block-product-template .wc-block-components-product-button__button,
    body.single-product main .wc-block-product-template .wp-block-woocommerce-product-button .wp-block-button__link {
        width: 100% !important;
        padding: 9px 8px !important;
        font-size: 12px !important;
    }

    body.single-product main .related.products .button,
    body.single-product main .upsells.products .button {
        width: calc(100% - 22px) !important;
        margin-left: 11px !important;
        margin-right: 11px !important;
        text-align: center !important;
        font-size: 12px !important;
    }
}


/* =========================================================
   18. MOBILE RẤT NHỎ
   ========================================================= */

@media (max-width: 390px) {

    body.single-product div.product form.cart,
    body.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.single-product div.product form.cart .quantity,
    body.single-product div.product form.cart .qty,
    body.single-product div.product .single_add_to_cart_button,
    body.single-product .wp-block-woocommerce-add-to-cart-form .quantity,
    body.single-product .wp-block-woocommerce-add-to-cart-form .qty,
    body.single-product .wp-block-woocommerce-add-to-cart-form button {
        width: 100% !important;
    }

    body.single-product main .wc-block-product-template,
    body.single-product main .related.products ul.products,
    body.single-product main .upsells.products ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   HATACA - KHOẢNG CÁCH ĐẦU TRANG CHI TIẾT SẢN PHẨM
   ========================================================= */

body.single-product
.wp-block-group.woocommerce.product
> main.wp-block-group {
    padding-top: 110px !important;
}

/* Breadcrumb */
body.single-product
main
> .wp-block-breadcrumbs:first-child {
    margin-top: 0 !important;
    margin-bottom: 26px !important;
}

@media (max-width: 781px) {

    body.single-product
    .wp-block-group.woocommerce.product
    > main.wp-block-group {
        padding-top: 30px !important;
    }

    body.single-product
    main
    > .wp-block-breadcrumbs:first-child {
        margin-bottom: 20px !important;
    }
}
