/* =============================================
   WC Product Variants Display - Frontend CSS
   Hiển thị variant giống mẫu "VARIANTI"
   ============================================= */

/* ----- Shared base (đồng nhất cả 2 section) ----- */
.wc-pvd-section,
.wc-pvd-specs-section {
    margin: 30px 0;
    padding: 0;
    clear: both;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-sizing: border-box;
}

.wc-pvd-section *,
.wc-pvd-specs-section * {
    box-sizing: border-box;
    font-family: inherit;
}

.wc-pvd-section-title,
.wc-pvd-specs-title {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.3;
    margin: 0 0 25px 0;
    padding: 0 0 12px 0;
    text-transform: uppercase;
    color: #222;
    border-bottom: 1px solid #ddd;
}

.wc-pvd-section {
    /* (kế thừa từ rule shared ở trên) */
}

.wc-pvd-variants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;
    justify-content: flex-start;
}

.wc-pvd-variant-item {
    flex: 0 0 auto;
    width: calc(25% - 23px);
    min-width: 140px;
    max-width: 200px;
    text-align: center;
    text-decoration: none !important;
    color: #333;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

a.wc-pvd-variant-item:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

/* Selectable mode - card hoạt động như nút chọn variation */
button.wc-pvd-variant-item.is-selectable,
.wc-pvd-variant-item.is-selectable {
    cursor: pointer;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 2px solid #e5e5e5;
    padding: 10px 8px;
    border-radius: 6px;
    font-family: inherit;
    font-size: inherit;
    color: #333 !important;
    text-shadow: none !important;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

button.wc-pvd-variant-item.is-selectable:hover,
.wc-pvd-variant-item.is-selectable:hover {
    transform: translateY(-3px);
    border-color: #0c914a;
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

button.wc-pvd-variant-item.is-selectable:focus,
.wc-pvd-variant-item.is-selectable:focus {
    outline: none;
    border-color: #0c914a;
    box-shadow: 0 0 0 3px rgba(12, 145, 74, 0.2);
}

.wc-pvd-variant-item.is-selectable.is-selected,
button.wc-pvd-variant-item.is-selectable.is-selected,
button.wc-pvd-variant-item.is-selectable.is-selected:hover {
    border-color: #0c914a;
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 4px 12px rgba(12, 145, 74, 0.15);
    position: relative;
}

.wc-pvd-variant-item.is-selectable.is-selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: #0c914a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
}

.wc-pvd-variant-item.is-selectable.is-selected .wc-pvd-variant-label {
    font-weight: 600;
    color: #222;
}

/* Khi bật "Ẩn dropdown mặc định" — JS sẽ tự hide table.variations
   CSS dưới chỉ làm fallback cho 1 số theme cụ thể */
form.variations_form.wc-pvd-default-hidden table.variations,
form.variations_form.wc-pvd-default-hidden .reset_variations {
    display: none !important;
}

.wc-pvd-variant-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff !important;
    background-color: #fff !important;
    box-sizing: border-box;
    border-radius: 4px;
    overflow: hidden;
}

.wc-pvd-variant-image,
.wc-pvd-variant-image-wrap img,
.wc-pvd-variant-image-wrap .attachment-medium,
.wc-pvd-variant-image-wrap .wp-post-image {
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain;
    display: block !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.wc-pvd-variant-placeholder {
    width: 80%;
    height: 80%;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-pvd-variant-placeholder svg {
    width: 100%;
    height: 100%;
}

.wc-pvd-variant-label {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
    margin-top: 4px;
    /* Đảm bảo label không tràn ra ngoài box variant */
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    display: block;
    box-sizing: border-box;
    /* Min-height để các item có baseline đồng đều (label 1 hay 2 dòng đều cùng cao) */
    min-height: 2.8em;
    width: 100%;
}

.wc-pvd-variant-sku {
    font-size: 12px;
    line-height: 1.3;
    color: #888;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-pvd-variants-grid {
        gap: 20px;
    }
    .wc-pvd-variant-item {
        width: calc(33.333% - 14px);
    }
    .wc-pvd-section-title,
    .wc-pvd-specs-title {
        font-size: 18px;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .wc-pvd-variant-item {
        width: calc(50% - 10px);
        min-width: 0;
    }
    .wc-pvd-variants-grid {
        gap: 15px;
    }
}

/* =============================================
   SCHEDA TECNICA - Bảng thông số kỹ thuật
   ============================================= */

.wc-pvd-specs-section {
    --wc-pvd-bar-color: #0c914a;
    --wc-pvd-cell-border: #2b2b2b;
}

.wc-pvd-specs-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-pvd-specs-row {
    display: grid;
    grid-template-columns: minmax(180px, 35%) 1fr;
    align-items: center;
    gap: 20px;
}

.wc-pvd-specs-label {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #222;
    line-height: 1.3;
}

.wc-pvd-specs-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: 26px;
    border: 1px solid var(--wc-pvd-cell-border);
    background: #fff;
    overflow: hidden;
}

.wc-pvd-specs-cell {
    border-right: 1px solid var(--wc-pvd-cell-border);
    background: #fff;
    transition: background-color 0.15s ease;
}

.wc-pvd-specs-cell:last-child {
    border-right: none;
}

.wc-pvd-specs-cell.is-filled {
    background: var(--wc-pvd-bar-color);
}

/* Ô bán phần - cho giá trị decimal (vd: 2.5/10 → ô thứ 3 filled 50%) */
.wc-pvd-specs-cell.is-partial {
    background: linear-gradient(
        to right,
        var(--wc-pvd-bar-color) var(--wc-pvd-fill, 0%),
        #fff var(--wc-pvd-fill, 0%)
    );
}

.wc-pvd-specs-footer {
    margin-top: 25px;
    padding-top: 15px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #222;
}

.wc-pvd-specs-footer--cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}

.wc-pvd-specs-footer-item {
    flex: 1 1 auto;
}

.wc-pvd-specs-footer-item:last-child {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-pvd-specs-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .wc-pvd-specs-label {
        font-size: 13px;
    }
    .wc-pvd-specs-bar {
        height: 22px;
    }
    .wc-pvd-specs-footer--cols {
        flex-direction: column;
        gap: 8px;
    }
    .wc-pvd-specs-footer-item:last-child {
        text-align: left;
    }
}

/* =============================================

/* =============================================
   VARIATION SWATCHES - Dùng chung component với VARIANTI cards
   ============================================= */

/* Ẩn dropdown gốc và link Clear khi đã có swatches.
   Dùng body.wc-pvd-swatches-active để ẨN NGAY TỪ PHA PARSE HTML
   (không đợi JS chạy, chống FOUC) */
body.wc-pvd-swatches-active form.variations_form table.variations select,
body.wc-pvd-swatches-active form.variations_form table.variations select[name^="attribute_"],
body.wc-pvd-swatches-active form.variations_form table.variations a.reset_variations,
form.variations_form select.wc-pvd-hidden-select,
form.variations_form a.wc-pvd-hidden-reset {
    display: none !important;
}

/* Khi swatches nằm trong table.variations: bỏ margin-top để khít với label */
form.variations_form table.variations .wc-pvd-section--swatches {
    margin: 0;
    padding: 0;
    border-top: none;
}

/* Trong bảng variations của WC: chuyển sang block để swatches có chỗ rộng */
form.variations_form table.variations,
form.variations_form table.variations tbody,
form.variations_form table.variations tr,
form.variations_form table.variations td.value,
form.variations_form table.variations th.label {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

form.variations_form table.variations {
    margin: 0 0 24px 0;
}

form.variations_form table.variations tr {
    margin-bottom: 18px;
}

form.variations_form table.variations tr:last-child {
    margin-bottom: 0;
}

/* Label "Varianti:" — ẨN hoàn toàn theo yêu cầu, swatches đứng tự lập */
form.variations_form table.variations th.label,
form.variations_form table.variations th.label label {
    display: none !important;
}

/* Disabled state cho swatch */
.wc-pvd-variant-item.is-selectable.is-disabled,
button.wc-pvd-variant-item.is-selectable.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    background: #f7f7f7 !important;
    background-color: #f7f7f7 !important;
}

.wc-pvd-variant-item.is-selectable.is-disabled .wc-pvd-variant-label {
    text-decoration: line-through;
}

/* Reset background của table.variations cells (1 số theme tô màu) */
form.variations_form table.variations,
form.variations_form table.variations tr,
form.variations_form table.variations td,
form.variations_form table.variations td.value,
form.variations_form table.variations th,
form.variations_form table.variations th.label {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Ẩn giá variation mặc định của WC dưới form (vì đã update vào Elementor widget) */
.single_variation_wrap .woocommerce-variation-price,
.single_variation_wrap .single_variation .price {
    display: none !important;
}

/* =============================================
   QUANTITY (styled) + ADD TO CART (full width)
   Áp dụng:
   - Trang sản phẩm có swatches active
   - Trong Elementor widget của plugin
   ============================================= */

/* Layout: quantity + button CÙNG 1 HÀNG (chỉ trong wrapper add-to-cart,
   KHÔNG flex toàn form vì sẽ phá vỡ layout swatches phía trên) */

/* Variable product: target wrapper qty+button cụ thể */
body.wc-pvd-swatches-active form.variations_form .woocommerce-variation-add-to-cart,
.wc-pvd-elementor-atc .woocommerce-variation-add-to-cart,
/* Simple product: form.cart trực tiếp (loại trừ variations_form) */
body.wc-pvd-swatches-active form.cart:not(.variations_form),
.wc-pvd-elementor-atc form.cart:not(.variations_form) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    align-items: stretch;
    margin-top: 16px;
}

/* Quantity wrapper - đẹp như shopify */
body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled,
.wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled {
    display: inline-flex !important;
    align-items: stretch;
    flex: 0 0 auto;
    width: auto !important;
    height: 48px;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled:hover,
.wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled:hover {
    border-color: #999;
}

body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled input.qty,
.wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled input.qty {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #222 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield;
    border-radius: 0 !important;
    outline: none;
}

/* Ẩn spinner mặc định của input number */
body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled input.qty::-webkit-outer-spin-button,
body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled input.qty::-webkit-inner-spin-button,
.wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled input.qty::-webkit-outer-spin-button,
.wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0;
}

body.wc-pvd-swatches-active .wc-pvd-qty-btn,
.wc-pvd-elementor-atc .wc-pvd-qty-btn {
    width: 42px;
    height: 100%;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: #444 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

body.wc-pvd-swatches-active .wc-pvd-qty-btn:hover,
.wc-pvd-elementor-atc .wc-pvd-qty-btn:hover {
    background: #f5f5f5 !important;
    background-color: #f5f5f5 !important;
    color: #0c914a !important;
}

body.wc-pvd-swatches-active .wc-pvd-qty-btn:active,
.wc-pvd-elementor-atc .wc-pvd-qty-btn:active {
    background: #eee !important;
}

body.wc-pvd-swatches-active .wc-pvd-qty-minus,
.wc-pvd-elementor-atc .wc-pvd-qty-minus {
    border-right: 1px solid #e0e0e0 !important;
}

body.wc-pvd-swatches-active .wc-pvd-qty-plus,
.wc-pvd-elementor-atc .wc-pvd-qty-plus {
    border-left: 1px solid #e0e0e0 !important;
}

/* Button Add to Cart - auto fill hết width còn lại */
body.wc-pvd-swatches-active form.variations_form .single_add_to_cart_button,
body.wc-pvd-swatches-active form.cart .single_add_to_cart_button,
.wc-pvd-elementor-atc form.cart .single_add_to_cart_button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 48px;
    height: auto;
    margin: 0 !important;
    padding: 0 24px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: quantity + button VẪN cùng 1 hàng, button shrink theo width còn lại */
@media (max-width: 480px) {
    body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled,
    .wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled {
        height: 44px;
    }
    body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled input.qty,
    .wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled input.qty {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        font-size: 14px !important;
    }
    body.wc-pvd-swatches-active .wc-pvd-qty-btn,
    .wc-pvd-elementor-atc .wc-pvd-qty-btn {
        width: 34px;
        flex-basis: 34px;
        font-size: 18px;
    }
    body.wc-pvd-swatches-active form.variations_form .single_add_to_cart_button,
    body.wc-pvd-swatches-active form.cart .single_add_to_cart_button,
    .wc-pvd-elementor-atc form.cart .single_add_to_cart_button {
        min-height: 44px;
        padding: 0 14px !important;
        font-size: 13px;
        letter-spacing: 0.3px;
    }
}

/* Mobile rất hẹp: shrink thêm để 2 button vẫn ở cùng hàng */
@media (max-width: 360px) {
    body.wc-pvd-swatches-active .quantity.wc-pvd-qty-styled input.qty,
    .wc-pvd-elementor-atc .quantity.wc-pvd-qty-styled input.qty {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
    }
    body.wc-pvd-swatches-active .wc-pvd-qty-btn,
    .wc-pvd-elementor-atc .wc-pvd-qty-btn {
        width: 30px;
        flex-basis: 30px;
    }
    body.wc-pvd-swatches-active form.variations_form .single_add_to_cart_button,
    body.wc-pvd-swatches-active form.cart .single_add_to_cart_button,
    .wc-pvd-elementor-atc form.cart .single_add_to_cart_button {
        padding: 0 10px !important;
        font-size: 12px;
    }
}

/* =============================================
   SWATCHES - LAYOUT NGANG (image trái, name+price phải)
   Chỉ áp dụng cho .wc-pvd-section--swatches
   Shortcode cards giữ nguyên layout DỌC mặc định
   ============================================= */

/* Grid 4 cột cho swatches */
.wc-pvd-section--swatches .wc-pvd-variants-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Card dùng CSS Grid 2 columns: image | content
   Dùng grid (không phải flex) để chắc chắn không bị theme/rule khác override */
.wc-pvd-section--swatches .wc-pvd-variant-item {
    display: grid !important;
    grid-template-columns: 52px 1fr !important;
    grid-template-rows: auto !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 8px 10px 8px 8px !important;
    flex-direction: unset !important;
}

/* Ảnh trái - cell 1, 52x52 */
.wc-pvd-section--swatches .wc-pvd-variant-image-wrap {
    width: 52px !important;
    height: 52px !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    padding: 3px !important;
    background: #fff !important;
    border-radius: 4px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: none !important;
    overflow: hidden;
}

.wc-pvd-section--swatches .wc-pvd-variant-image-wrap img,
.wc-pvd-section--swatches .wc-pvd-variant-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block !important;
    margin: 0 !important;
}

/* Content phải - cell 2, flex column cho label + price */
.wc-pvd-section--swatches .wc-pvd-variant-content {
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    overflow: hidden;
}

.wc-pvd-section--swatches .wc-pvd-variant-label {
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #222 !important;
    margin: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: center !important;
}

.wc-pvd-section--swatches .wc-pvd-variant-price {
    font-size: 13px !important;
    line-height: 1.2 !important;
    color: #666 !important;
    margin: 0 !important;
    text-align: center !important;
    max-width: 100%;
}

/* Style giá WC */
.wc-pvd-section--swatches .wc-pvd-variant-price .price,
.wc-pvd-section--swatches .wc-pvd-variant-price .woocommerce-Price-amount {
    color: #666;
    font-weight: 500;
}

.wc-pvd-section--swatches .wc-pvd-variant-price del {
    color: #999;
    margin-right: 4px;
    font-size: 12px;
}

.wc-pvd-section--swatches .wc-pvd-variant-price ins {
    color: #0c914a;
    text-decoration: none;
    font-weight: 600;
}

/* Selected state */
.wc-pvd-section--swatches .wc-pvd-variant-item.is-selected {
    border-color: #0c914a !important;
    background: rgba(12, 145, 74, 0.04) !important;
    background-color: rgba(12, 145, 74, 0.04) !important;
}

.wc-pvd-section--swatches .wc-pvd-variant-item.is-selected .wc-pvd-variant-label {
    color: #0c914a;
}

/* Reposition checkmark cho layout ngang */
.wc-pvd-section--swatches .wc-pvd-variant-item.is-selectable.is-selected::after {
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 1024px) {
    .wc-pvd-section--swatches .wc-pvd-variants-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wc-pvd-section--swatches .wc-pvd-variants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-item {
        grid-template-columns: 48px 1fr !important;
        padding: 8px 10px 8px 6px !important;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-image-wrap {
        width: 48px !important;
        height: 48px !important;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-label {
        font-size: 13px !important;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-price {
        font-size: 12px !important;
    }
}

/* Mobile: 1 cột full width */
@media (max-width: 480px) {
    .wc-pvd-section--swatches .wc-pvd-variants-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-item {
        grid-template-columns: 56px 1fr !important;
        padding: 10px !important;
    }
    .wc-pvd-section--swatches .wc-pvd-variant-image-wrap {
        width: 56px !important;
        height: 56px !important;
    }
}

/* =============================================
   SCHEDA TECNICA - DANGER INDEX + COMPATIBILITY WITH DIRT
   2 cột phía dưới bảng rating bars
   ============================================= */

.wc-pvd-specs-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
}

.wc-pvd-specs-bottom-col {
    min-width: 0;
}

.wc-pvd-specs-subtitle {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin: 0 0 14px;
    color: #222;
}

/* ===== Danger Index - lưới 3 cột icons ===== */
.wc-pvd-dangers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wc-pvd-danger-item {
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.wc-pvd-danger-img,
.wc-pvd-danger-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ===== Compatibility with Dirt - 3 vòng tròn donut ===== */
.wc-pvd-dirt-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.wc-pvd-dirt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.wc-pvd-dirt-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #222;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.wc-pvd-dirt-circle {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: conic-gradient(
        var(--wc-pvd-bar-color, #0c914a) calc(var(--wc-pvd-dirt-percent, 0) * 1%),
        #e8e8e8 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Donut hole - inner white circle */
.wc-pvd-dirt-circle::before {
    content: '';
    position: absolute;
    inset: 9px;
    background: #fff;
    border-radius: 50%;
    z-index: 0;
}

.wc-pvd-dirt-percent {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 14px;
    color: #222;
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-pvd-specs-bottom {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .wc-pvd-dirt-circle {
        width: 70px;
        height: 70px;
    }
    .wc-pvd-dirt-circle::before {
        inset: 8px;
    }
    .wc-pvd-dirt-percent {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wc-pvd-dangers-grid {
        gap: 6px;
    }
    .wc-pvd-dirt-list {
        gap: 8px;
    }
    .wc-pvd-dirt-circle {
        width: 64px;
        height: 64px;
    }
    .wc-pvd-dirt-circle::before {
        inset: 7px;
    }
    .wc-pvd-dirt-percent {
        font-size: 12px;
    }
    .wc-pvd-dirt-label {
        font-size: 11px;
    }
}

/* =============================================
   SKU - hiển thị dưới label trong variant cards
   - Shortcode cards: dưới label, căn giữa
   - Swatches: giữa label và price, căn giữa
   ============================================= */

/* Default (shortcode VARIANTI cards - layout dọc) */
.wc-pvd-variant-sku {
    font-size: 11px;
    line-height: 1.3;
    color: #888;
    margin-top: 2px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.3px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Swatches: SKU bên trong content area (cùng cột với label + price) */
.wc-pvd-section--swatches .wc-pvd-variant-sku {
    font-size: 11px;
    color: #999;
    margin: 0;
    text-align: center;
    max-width: 100%;
}

/* Khi selected: SKU vẫn giữ màu xám nhạt (không đổi theo brand color) */
.wc-pvd-section--swatches .wc-pvd-variant-item.is-selected .wc-pvd-variant-sku {
    color: #888;
}

@media (max-width: 480px) {
    .wc-pvd-variant-sku,
    .wc-pvd-section--swatches .wc-pvd-variant-sku {
        font-size: 10.5px;
    }
}
