/* =====================================================
   MEXI – SINGLE PRODUCT (LAYOUT 3 CỘT CHUẨN DELAX)
   Cột 1: Ảnh
   Cột 2: Giá + nút + ưu đãi
   Cột 3: Mô tả ngắn (Đặc điểm nổi bật)
===================================================== */

/* WRAPPER */
.mexi-sp {
    margin: 30px 0;
}

/* GRID 3 CỘT */
.mexi-sp-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr 1fr;
    gap: 36px;
    align-items: flex-start;
}

/* =====================================================
   CỘT 1 – GALLERY
===================================================== */
.mexi-sp-gallery .woocommerce-product-gallery {
    width: 100%;
}

/* CHỈ áp cho ảnh lớn (slide chính) */
.mexi-sp-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image>img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

/* Thumbnail: bỏ shadow/radius to, giữ gọn */
.mexi-sp-gallery .flex-control-thumbs img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: none;
}

/* .woocommerce-product-gallery__image {
    overflow: hidden;
} */

/* =====================================================
   CỘT 2 – MAIN INFO
===================================================== */
.mexi-sp-main .product_title {
    font-size: 30px;
    font-weight: 900;
    margin: 0 0 10px;
    line-height: 1.3;
}

/* PRICE */
.mexi-sp-main .price {
    font-size: 22px;
    font-weight: 900;
    color: #0f6b5c;
    margin-bottom: 14px;
}

.mexi-sp-main .price del {
    opacity: 0.55;
    font-weight: 700;
    margin-right: 8px;
}

/* BENEFITS */
.mexi-sp-benefits {
    padding-left: 18px;
    margin: 12px 0 18px;
}

.mexi-sp-benefits li {
    margin: 6px 0;
    font-size: 14px;
}

/* ACTIONS ROW */
.mexi-sp-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* CART FORM */
.mexi-sp-actions form.cart {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
}

/* QUANTITY */
.mexi-sp .quantity input.qty {
    width: 70px !important;
    height: 44px !important;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
}

/* ADD TO CART */
.mexi-sp .single_add_to_cart_button {
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 800;
    background: #5bb85c;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* CONTACT BUTTON */
.mexi-btn-contact {
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 800;
    background: #0f6b5c;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* BUY NOW */
.mexi-btn-buy {
    display: block;
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(90deg, #ff9800, #ff6a00);
    text-decoration: none;
}

.mexi-btn-buy span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.95;
}

/* =====================================================
   KHỐI CHÍNH SÁCH / ĐỔI TRẢ
===================================================== */
.mexi-product-policies {
    margin-top: 18px;
    background: #f2f2f2;
    border-radius: 14px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    font-size: 14px;
}

.mexi-product-policies div {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* =====================================================
   CỘT 3 – SHORT DESCRIPTION
===================================================== */


.mexi-sp-highlight h3 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 14px;
    color: #0f6b5c;
}

.mexi-sp-excerpt {
    font-size: 15px;
    line-height: 1.7;
}

.mexi-sp-excerpt ul {
    padding-left: 18px;
    margin: 0;
}

.mexi-sp-excerpt li {
    margin: 8px 0;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .mexi-sp-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .mexi-sp-highlight {
        border-left: none;
        padding-left: 0;
        border-top: 4px solid #0f6b5c;
        padding-top: 14px;
    }

    .mexi-product-policies {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {

    .mexi-sp-actions form.cart,
    .mexi-sp .single_add_to_cart_button,
    .mexi-btn-contact {
        width: 100%;
    }
}


/* ================================
   PRODUCT TITLE – DELAX STYLE
================================ */

/* Đẩy tiêu đề sản phẩm lên đầu */
.single-product .product_title {
    grid-column: 1 / -1;
    /* ăn toàn bộ grid */
    order: -1;
    /* lên trước các cột */

    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    color: #0f6b5c;

    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e5e5;
}

/* Mobile nhỏ lại cho đẹp */
@media (max-width: 768px) {
    .single-product .product_title {
        font-size: 26px;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
}

/* ================================
   POLICY BOX – DELAX STYLE
================================ */

.mexi-sp-policies {
    margin-top: 20px;
    background: #f1f1f1;
    border-radius: 14px;
    padding: 16px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* mỗi ô */
.mexi-sp-policies .policy-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 14px;
    font-weight: 500;
    color: #222;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* icon */
.mexi-sp-policies .policy-item .icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* text */
.mexi-sp-policies .policy-item .text {
    line-height: 1.4;
}

/* MOBILE */
@media (max-width: 768px) {
    .mexi-sp-policies {
        grid-template-columns: 1fr;
    }
}

/* ================================
   FIX DÍNH MÉP – SINGLE PRODUCT
================================ */

/* Wrapper chính của WooCommerce */
.woocommerce div.product {
    max-width: 1200px;
    /* giống DELAX */
    margin: 0 auto;
    padding: 30px 20px;
    /* tạo khoảng thở */
    box-sizing: border-box;
}

/* Breadcrumb */
.woocommerce .woocommerce-breadcrumb {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .woocommerce div.product {
        padding: 20px 16px;
    }
}   

/* Ẩn badge giảm giá */
.single-product span.onsale {
    display: none !important;
}

.mexi-sp-title {
    margin-bottom: 30px;
    color: #0f6b5c;
    border-bottom: solid #627D47;
    padding-bottom: 20px;
}

/* FIX breadcrumb dính viền */
.woocommerce .woocommerce-breadcrumb {
    max-width: 1200px;
    margin: 20px auto -40px;
    padding: 10px 16px;
    background: #f6f9f8;
    border-radius: 8px;
    font-size: 14px;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #0f6b5c;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

.woocommerce .woocommerce-breadcrumb span,
.woocommerce .woocommerce-breadcrumb {
    color: #555;
}

/* ===============================
   DETAIL 2 COLUMNS
================================ */
.mexi-sp-detail-wrap {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* CỘT TRÁI */
.mexi-sp-detail-left section {
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 30px;
}

.mexi-section-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f6b5c;
    border-left: 6px solid #0f6b5c;
    padding-left: 14px;
    margin-bottom: 18px;
}

/* MÔ TẢ CHI TIẾT */
.mexi-description {
    line-height: 1.8;
    font-size: 16px;
}

/* REVIEW */
.mexi-reviews {
    background: #fafafa;
}

/* CỘT PHẢI */
.mexi-sp-detail-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 120px;
}

.mexi-sp-detail-right img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

/* MOBILE */
@media (max-width: 1024px) {
    .mexi-sp-detail-wrap {
        grid-template-columns: 1fr;
    }

    .mexi-sp-detail-right {
        order: 99;
        position: static;
        margin-top: 40px;
    }
}

.mexi-sp-detail-left section {
    padding: 0;
}

/* ================================
   MÔ TẢ CHI TIẾT – MEXI STYLE
================================ */

.single-product .mexi-sp-bottom {
    margin-top: 50px;
}

/* Bọc nội dung mô tả */
.single-product .woocommerce-Tabs-panel--description,
.single-product .woocommerce-product-details__long-description {
    max-width: 100%;
    background: #ffffff;
    padding: 32px 36px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    line-height: 1.9;
    font-size: 16px;
    color: #1f2937;
}

/* ================================
   HEADING
================================ */

.single-product .woocommerce-product-details__long-description h2,
.single-product .woocommerce-product-details__long-description h3 {
    position: relative;
    font-size: 26px;
    font-weight: 800;
    color: #0f6b5c;
    margin: 40px 0 20px;
    padding-left: 18px;
}

.single-product .woocommerce-product-details__long-description h2::before,
.single-product .woocommerce-product-details__long-description h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 70%;
    background: linear-gradient(180deg, #0f6b5c, #3bb78f);
    border-radius: 4px;
}

/* Heading nhỏ */
.single-product .woocommerce-product-details__long-description h4 {
    font-size: 20px;
    font-weight: 700;
    color: #14532d;
    margin: 28px 0 14px;
}

/* ================================
   ĐOẠN VĂN
================================ */

.single-product .woocommerce-product-details__long-description p {
    margin-bottom: 18px;
    color: #374151;
}

/* ================================
   DANH SÁCH (UL / OL)
================================ */

.single-product .woocommerce-product-details__long-description ul {
    padding-left: 0;
    margin: 20px 0;
}

.single-product .woocommerce-product-details__long-description ul li {
    list-style: none;
    position: relative;
    padding-left: 34px;
    margin-bottom: 14px;
    color: #1f2937;
}

/* Icon check xanh */
.single-product .woocommerce-product-details__long-description ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    background: #e6f4f1;
    color: #0f6b5c;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ================================
   BOX THÔNG SỐ / GHI CHÚ
================================ */

.single-product .woocommerce-product-details__long-description blockquote {
    margin: 28px 0;
    padding: 22px 26px;
    background: linear-gradient(180deg, #f0fdfa, #ecfeff);
    border-left: 5px solid #0f6b5c;
    border-radius: 12px;
    font-style: normal;
    font-size: 15px;
}

/* ================================
   HÌNH ẢNH TRONG NỘI DUNG
================================ */

.single-product .woocommerce-product-details__long-description img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 26px 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

/* ================================
   TABLE (nếu có)
================================ */

.single-product .woocommerce-product-details__long-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: 15px;
}

.single-product .woocommerce-product-details__long-description table th,
.single-product .woocommerce-product-details__long-description table td {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
}

.single-product .woocommerce-product-details__long-description table th {
    background: #f0fdfa;
    color: #0f6b5c;
    font-weight: 700;
}

/* ================================
   MOBILE
================================ */

@media (max-width: 768px) {
    .single-product .woocommerce-product-details__long-description {
        padding: 22px 18px;
        font-size: 15px;
    }

    .single-product .woocommerce-product-details__long-description h2,
    .single-product .woocommerce-product-details__long-description h3 {
        font-size: 22px;
    }
}

/* ================================
   ĐÁNH GIÁ SẢN PHẨM – MEXI STYLE
================================ */

.single-product #reviews {
    margin-top: 60px;
}

/* Tiêu đề Đánh giá */
.single-product #reviews>h2,
.single-product #reviews h3 {
    position: relative;
    font-size: 26px;
    font-weight: 800;
    color: #0f6b5c;
    margin-bottom: 26px;
    padding-left: 18px;
}

.single-product #reviews>h2::before,
.single-product #reviews h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 70%;
    background: linear-gradient(180deg, #0f6b5c, #3bb78f);
    border-radius: 4px;
}

/* Box tổng */
.single-product #review_form_wrapper {
    background: #ffffff;
    padding: 32px 36px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    max-width: 820px;
}

/* Text mô tả */
.single-product #reviews p {
    color: #374151;
    font-size: 15px;
    line-height: 1.8;
}

/* ================================
   SAO ĐÁNH GIÁ
================================ */

.single-product .comment-form-rating {
    margin: 20px 0;
}

.single-product .comment-form-rating label {
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    color: #111827;
}

.single-product .stars a {
    font-size: 26px;
    color: #d1d5db;
    margin-right: 6px;
    transition: all .2s ease;
}

.single-product .stars a:hover,
.single-product .stars a.active {
    color: #f59e0b;
    transform: scale(1.15);
}

/* ================================
   INPUT + TEXTAREA
================================ */

.single-product #review_form input[type="text"],
.single-product #review_form input[type="email"],
.single-product #review_form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 15px;
    transition: all .2s ease;
}

.single-product #review_form textarea {
    min-height: 140px;
}

.single-product #review_form input:focus,
.single-product #review_form textarea:focus {
    outline: none;
    border-color: #0f6b5c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 107, 92, .12);
}

/* Label */
.single-product #review_form label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #111827;
}

/* ================================
   CHECKBOX
================================ */

.single-product #review_form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    font-size: 14px;
}

/* ================================
   NÚT GỬI
================================ */

.single-product #review_form input.submit {
    background: linear-gradient(90deg, #ff9800, #ff6a00);
    border: none;
    color: #fff;
    padding: 14px 34px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 8px 20px rgba(255, 106, 0, .35);
}

.single-product #review_form input.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 106, 0, .45);
}

/* ================================
   REVIEW ĐÃ CÓ (SAU NÀY)
================================ */

.single-product .commentlist li {
    background: #f9fafb;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

.single-product .commentlist .comment-text {
    border: none;
}

/* ================================
   MOBILE
================================ */

@media (max-width: 768px) {
    .single-product #review_form_wrapper {
        padding: 22px 18px;
    }

    .single-product #reviews>h2 {
        font-size: 22px;
    }

    .single-product .stars a {
        font-size: 22px;
    }
}

/* ================================
   SẢN PHẨM LIÊN QUAN – CUỐI TRANG
================================ */

.mexi-related-bottom {
    margin-top: 60px;
}

.mexi-related-bottom .products {
    margin-top: 24px;
}

.mexi-related-bottom li.product {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
    transition: all .25s ease;
}

.mexi-related-bottom li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .14);
}

.mexi-related-bottom li.product img {
    border-radius: 12px 12px 0 0;
}

/* Mobile */
@media (max-width: 768px) {
    .mexi-related-bottom ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mexi-buy-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mexi-buy-modal.active {
    display: flex;
}

.mexi-buy-box {
    width: 480px;
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    position: relative;
}

.mexi-buy-box h3 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.mexi-buy-box input,
.mexi-buy-box textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.mexi-buy-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.btn-submit-buy {
    width: 100%;
    padding: 14px;
    background: #0f6b5c;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
}

/* Đảm bảo khung ảnh nằm gọn trong cột */
/* KHÔNG hidden ở đây */
.mexi-sp-gallery .woocommerce-product-gallery {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* hidden đúng chỗ (viewport của flexslider) */
.mexi-sp-gallery .woocommerce-product-gallery .flex-viewport {
    overflow: hidden;
}

/* Ẩn icon zoom nếu bạn thấy nó che mất ảnh (tùy chọn) */
.woocommerce-product-gallery__trigger {
    z-index: 99;
    /* Bạn có thể chỉnh vị trí icon kính lúp ở đây */
}

/* Tùy chỉnh nút tắt (X) trong chế độ xem ảnh (Lightbox) - Mặc định WooCommerce đã có, nhưng nếu muốn đẹp hơn */
.pswp__button--close {
    opacity: 1 !important;
}


/* 1) overflow đúng chỗ */
.mexi-sp-gallery .woocommerce-product-gallery {
    overflow: visible;
}

.mexi-sp-gallery .woocommerce-product-gallery .flex-viewport {
    overflow: hidden;
}

/* 2) Flexslider: ép cấu trúc slide đúng, KHÔNG đè wrapper */
.mexi-sp-gallery .woocommerce-product-gallery .slides {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.mexi-sp-gallery .woocommerce-product-gallery .slides>li {
    margin: 0 !important;
    padding: 0 !important;
}

/* 3) Ảnh lớn luôn full */
.mexi-sp-gallery .woocommerce-product-gallery .slides img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

/* ===== MEXI FIX: Woo Gallery Safe ===== */

/* Đừng để rule nào đó làm gallery mất chiều cao */
.mexi-sp-gallery .woocommerce-product-gallery {
    width: 100%;
    position: relative;
}

/* viewport phải có height, overflow đúng chỗ */
.mexi-sp-gallery .woocommerce-product-gallery .flex-viewport {
    overflow: hidden !important;
}

/* slides không được grid/flex/absolute */
.mexi-sp-gallery .woocommerce-product-gallery .slides {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.mexi-sp-gallery .woocommerce-product-gallery .slides>li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
}

/* Ảnh lớn luôn hiện */
.mexi-sp-gallery .woocommerce-product-gallery .slides img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

/* Quan trọng: KHÔNG được overflow hidden ở wrapper/gallery wrapper */
.mexi-sp-gallery .woocommerce-product-gallery__wrapper {
    overflow: visible !important;
}

/* Thumb gọn lại */
.mexi-sp-gallery .flex-control-thumbs img {
    border-radius: 10px;
    box-shadow: none !important;
}

/* ===== WooCommerce Gallery FIX (minimal + safe) ===== */
.mexi-sp-gallery .woocommerce-product-gallery {
    width: 100%;
}

.mexi-sp-gallery .woocommerce-product-gallery .flex-viewport {
    overflow: hidden;
    /* đúng tầng */
    position: relative;
    /* giúp tính height đúng */
}

.mexi-sp-gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
}

/* Ảnh lớn */
.mexi-sp-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

/* Thumb */
.mexi-sp-gallery .flex-control-thumbs img {
    border-radius: 10px;
    box-shadow: none;
}

/* ===== KILL ZOOM OVERLAY (GLOBAL) ===== */
img.zoomImg,
.zoomImg,
.zoomContainer,
.zoomWindowContainer,
.zoomLens {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Trả overflow về đúng để không bị tràn */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.flex-viewport {
    overflow: hidden !important;
}

.mexi-sp-gallery,
.mexi-sp-gallery div.images,
.mexi-sp-gallery figure.woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    min-width: 0 !important;
}

/* ===== FIX: PhotoSwipe đóng mà vẫn hiện ===== */
.pswp {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 999999 !important;
}

.pswp.pswp--open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}