/* Layout & Styling cho Product Meta Shortcode */
.custom-product-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    margin: 15px 0;
    padding: 0;
    list-style: none;
}

.custom-product-meta-item {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
    color: #333333;
    line-height: 1.5;
}

/* Biểu tượng dấu chấm tròn rỗng đầu dòng */
.custom-product-meta-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border: 1.5px solid #666666;
    border-radius: 50%;
}

.custom-product-meta-item strong {
    font-weight: 500;
    color: #333333;
}

.custom-product-meta-item a,
.custom-product-meta-item span.meta-val {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 5px;
}

.custom-product-meta-item a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .custom-product-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Action shortcode */
.product-action-container {
    margin-top: 16px;
}

.custom-cart-form {
    width: 100%;
}

.custom-variation-table-wrapper {
    overflow-x: auto;
    margin-bottom: 18px;
}

.custom-variation-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d9d9d9;
    background: #fff;
}

.custom-variation-table th,
.custom-variation-table td {
    border: 1px solid #d9d9d9;
    padding: 10px 12px !important;
    vertical-align: middle;
    text-align: center;
}

.custom-variation-table th {
    background: #f7f7f7;
    color: #2b3f5b;
    font-size: 14px;
    font-weight: 700;
}

.custom-variation-table td.col-name {
    text-align: left;
}

.custom-variation-table td.col-price {
    white-space: nowrap;
    font-weight: 700;
    color: #8c1f1f;
}

.custom-variation-table tr.variation-row {
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-variation-table tr.variation-row:hover {
    background: #f4fbf4;
}

.custom-variation-table tr.variation-row.selected {
    background: #0047aa;
    color: #fff;
}

.custom-variation-table tr.variation-row.selected td {
    color: #fff;
}

.custom-variation-table tr.variation-row.selected td.col-price {
    color: #fff;
}

.custom-variation-table tr.variation-row.selected td.col-price span.amount{
    color: inherit;
}
.custom-variation-table td.col-img img {
    display: block;
    margin: 0 auto;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.custom-simple-product-price {
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
    color: #d21f1f;
}

.product-action-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.product-action-container .added_to_cart.wc-forward {
    display: none !important;
}

.product-action-notice {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.product-action-notice.is-success {
    color: #155724;
    background: #d4edda;
}

.product-action-notice.is-error {
    color: #721c24;
    background: #f8d7da;
}

.product-action-buttons .quantity {
    margin: 0;
}

.quantity-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.quantity-stepper .qty-btn {
    width: 36px;
    height: 44px;
    border: 0;
    background: #f5f5f5;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin: 0;
}

.quantity-stepper .qty-btn:hover {
    background: #e9e9e9;
}

.quantity-stepper .qty-btn:focus {
    outline: none;
}

.product-action-buttons .qty-input {
    width: 60px;
    height: 44px;
    padding: 0 10px;
    text-align: center;
    border: 0;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}

.product-action-buttons .qty-input::-webkit-outer-spin-button,
.product-action-buttons .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 0;
}

.btn-custom:hover {
    color: #fff;
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-add-to-cart {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-add-to-cart:hover {
    color: var(--primary-color);
    background-color: #f7f7f7;
}

.btn-buy-now {
    background-color: var(--primary-color);
}

.btn-tu-van {
    background: #e53946;
}

@media (max-width: 480px) {
    .product-action-buttons {
        gap: 10px;
    }

    .btn-custom {
        width: 100%;
    }

    .product-action-buttons .quantity {
        width: 100%;
    }

    .quantity-stepper {
        width: 100%;
    }

    .quantity-stepper .qty-btn {
        width: 40px;
    }

    .product-action-buttons .qty-input {
        width: 100%;
    }
}
