/* eSIM v2 - chỉ áp dụng khi <body> có class "esim-v2". Xóa class này là trang trở về như cũ. */
.esim-v2{--ink:#0f2a2e;--red:#c93a24;--line:#cfdad7;--mute:#4b6368}

/* Ảnh sản phẩm */
.esim-v2 .product-images .flickity-viewport,
.esim-v2 .product-images .woocommerce-product-gallery__image img{border-radius:24px;overflow:hidden}

/* Tiêu đề, đánh giá, giá */
.esim-v2 .product-info .is-divider{display:none}
.esim-v2 .product-info .woocommerce-breadcrumb{font-size:13px;color:var(--mute)}
.esim-v2 .product-info .product-title{font-size:clamp(24px,4vw,32px);line-height:1.15;font-weight:800;color:var(--ink);margin-bottom:.4em}
.esim-v2 .woocommerce-product-rating{font-size:13px;margin-bottom:.6em}
.esim-v2 .product-info .price-wrapper .price{font-size:clamp(22px,5vw,30px);line-height:1.1;font-weight:800;color:var(--ink)}

/* Mô tả ngắn: danh sách -> lưới thẻ nhỏ */
.esim-v2 .product-short-description ul{list-style:none;margin:0 0 16px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
.esim-v2 .product-short-description li{margin:0;padding:8px 12px;background:#fff;border:1px solid #e1e8e6;border-radius:12px;font-size:13px}

/* Variations (Data, Validity...): mỗi thuộc tính là một khối, ô chọn dàn đều 1 hàng */
.esim-v2 table.variations,.esim-v2 table.variations tbody,.esim-v2 table.variations tr,
.esim-v2 table.variations th,.esim-v2 table.variations td{display:block;width:100%;padding:0;border:0}
.esim-v2 table.variations tr{margin-bottom:14px}
.esim-v2 table.variations label{margin:0 0 8px;font-size:14px;font-weight:700;color:var(--ink)}
.esim-v2 .ux-swatches{display:flex;flex-wrap:wrap;gap:8px}
.esim-v2 .ux-swatch{flex:1 1 auto;box-sizing:border-box;width:auto;height:auto;min-width:max-content;max-width:100%;min-height:48px;margin:0;padding:8px 14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:16px;font-weight:800;line-height:1.2;text-align:center;box-shadow:none}
.esim-v2 .ux-swatch:hover{border-color:var(--ink)}
.esim-v2 .ux-swatch.selected{border-color:var(--ink);background:#e4f1ee;box-shadow:none!important}
/* Hàng có dòng Price (Validity): các ô chia đều, gọn */
.esim-v2 tr:has(.esim-price) .ux-swatch{flex:1 1 72px;min-width:0;min-height:60px;padding:6px 4px}
.esim-v2 .esim-price{font-size:11px;font-weight:500;color:var(--mute)}

/* Số lượng + nút mua */
.esim-v2 .woocommerce-variation-add-to-cart{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.esim-v2 .quantity{margin:0}
.esim-v2 .single_add_to_cart_button{order:3;flex:1 1 100%;height:48px;min-height:0;margin:0;border:1px solid var(--ink)!important;border-radius:999px;background:#fff!important;color:var(--ink)!important;font-size:14px;font-weight:700;box-shadow:none}
.esim-v2 .single_add_to_cart_button:hover{background:#e4f1ee!important}
.esim-v2 [class*="buy-now"]{order:2;flex:1;height:48px;min-height:0;margin:0;border:1px solid var(--ink)!important;border-radius:999px;background:var(--ink)!important;color:#fff!important;font-size:15px;font-weight:700;box-shadow:none}
.esim-v2 [class*="buy-now"]:hover{background:#16444a!important}

/* Điện thoại: số lượng, Buy now, Add to cart mỗi nút một dòng */
@media (max-width:549px){
.esim-v2 .woocommerce-variation-add-to-cart{flex-direction:column;align-items:flex-start;gap:16px}
.esim-v2 [class*="buy-now"],.esim-v2 .single_add_to_cart_button{flex:none;width:100%}
}

/* Khi đã có mục "What you get" bên dưới thì ẩn danh sách mô tả ngắn ở phía trên để khỏi lặp */
.esim-v2.esim-v2-has-facts .product-short-description{display:none}

/* Mục What you get và Set up in 3 steps */
.esim-v2-sec{margin:56px 0 0}
.esim-v2-sec h2{margin:0 0 20px;font-size:30px;font-weight:800;color:#0f2a2e}
.esim-v2-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}
.esim-v2-card{padding:20px 24px;background:#fff;border:1px solid #e1e8e6;border-radius:20px}
.esim-v2-card span{display:block;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#4b6368}
.esim-v2-card strong{display:block;margin-top:6px;font-size:20px;font-weight:800;line-height:1.25;color:#0f2a2e}
.esim-v2-steps{padding:20px clamp(20px,4vw,48px);background:#0f2a2e;border-radius:28px}
.esim-v2-steps h2{color:#fff}
.esim-v2-steps .esim-v2-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:28px}
.esim-v2-num{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:999px;background:#f2b705;color:#0f2a2e;font-weight:800}
.esim-v2-steps h3{margin:14px 0 6px;font-size:18px;font-weight:700;color:#fff}
.esim-v2-steps p{margin:0;font-size:14px;line-height:1.5;color:#b8d0cc}

/* Dòng tin cậy dưới nút mua */
.esim-v2-trust{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:16px 0 0;padding:0;list-style:none;font-size:12px;color:#2f4a4f}
.esim-v2-trust li{display:flex;align-items:center;gap:10px;margin:0}
.esim-v2-trust svg{flex:none;width:18px;height:18px;fill:none;stroke:#16444a;stroke-width:2}

/* Giá của gói đang chọn (ngay trên nút Buy now): to, đậm, nổi bật */
.esim-v2 .woocommerce-variation-price:not(:empty){margin:4px 0 8px;padding:12px 16px;background:#e4f1ee;border-radius:14px}
.esim-v2 .woocommerce-variation-price:not(:empty)::before{content:"Your eSIM price";display:block;margin-bottom:2px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.esim-v2 .woocommerce-variation-price .price,
.esim-v2 .woocommerce-variation-price .price .woocommerce-Price-amount{font-size:clamp(30px,6vw,40px);font-weight:800;line-height:1.1;color:var(--ink)}

/* iPad dọc và điện thoại: số thứ tự và tiêu đề bước cùng một hàng */
@media (max-width:849px){
.esim-v2-step{display:grid;grid-template-columns:44px 1fr;column-gap:14px;align-items:center}
.esim-v2-step h3{margin:0}
.esim-v2-step p{grid-column:2;margin-top:6px}
}

/* Điện thoại: thu gọn khoảng cách và cỡ chữ của các mục bên dưới */
@media (max-width:549px){
.esim-v2 .product-main{padding-bottom:0}
.esim-v2 .product-footer{margin-top:0;padding-top:0}
.esim-v2-sec{margin-top:20px}
.esim-v2-sec h2{margin-bottom:12px;font-size:24px}
.esim-v2-facts .esim-v2-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.esim-v2-facts .esim-v2-card{padding:12px 14px;border-radius:14px}
.esim-v2-facts .esim-v2-card span{font-size:11px}
.esim-v2-facts .esim-v2-card strong{margin-top:4px;font-size:15px}
}
.esim-v2-note{margin:12px 0 0;font-size:13px;color:#4b6368}

/* iPad và điện thoại: số lượng, Buy now, Add to cart cùng chiều rộng, bo tròn, dễ bấm */
@media (max-width:849px){
.esim-v2 .woocommerce-variation-add-to-cart{flex-direction:column;align-items:stretch;gap:12px}
.esim-v2 .quantity{display:flex;align-items:stretch;width:100%;height:48px;margin:0;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:#fff}
.esim-v2 .quantity .minus,.esim-v2 .quantity .plus,.esim-v2 .quantity .ux-quantity__button{flex:0 0 64px;width:64px;height:100%;margin:0;padding:0;border:0!important;border-radius:0;background:transparent!important;color:var(--ink);font-size:24px;line-height:1;box-shadow:none}
.esim-v2 .quantity .qty{flex:1;min-width:0;height:100%;margin:0;border:0!important;background:transparent;box-shadow:none;font-size:17px;font-weight:700;text-align:center;color:var(--ink);-moz-appearance:textfield}
.esim-v2 [class*="buy-now"],.esim-v2 .single_add_to_cart_button{flex:none;width:100%}
}

/* Thanh sticky: giá, số lượng, nút chọn / thêm vào giỏ */
.esim-v2 .sticky-add-to-cart-wrapper,.esim-v2 .sticky-add-to-cart{display:none!important}
.esim-v2-sticky{position:fixed;left:0;right:0;bottom:0;z-index:999;visibility:hidden;transform:translateY(110%);transition:transform .2s,visibility .2s;background:#fff;border-top:1px solid #e1e8e6;box-shadow:0 -4px 16px rgba(15,42,46,.08);padding:8px clamp(12px,3vw,24px) calc(8px + env(safe-area-inset-bottom,0px))}
.esim-v2-sticky.is-on{visibility:visible;transform:none}
.esim-v2-sticky__in{display:flex;align-items:center;gap:10px;max-width:1080px;margin:0 auto}
.esim-v2-sticky__price{flex:1;min-width:0;font-size:18px;font-weight:800;line-height:1.1;color:var(--ink)}
.esim-v2-sticky__qty{display:flex;align-items:center;flex:none;height:44px;border:1px solid var(--line);border-radius:999px;background:#fff;overflow:hidden}
.esim-v2-sticky__qty button{width:40px;height:44px;margin:0;padding:0;border:0;background:transparent;color:var(--ink);font-size:20px;line-height:1;cursor:pointer}
.esim-v2-sticky__n{min-width:24px;text-align:center;font-size:15px;font-weight:700}
.esim-v2-sticky__cta{flex:none;height:44px;margin:0;padding:0 20px;border:0;border-radius:999px;background:var(--ink);color:#fff;font-size:14px;font-weight:700;cursor:pointer}
.esim-v2.esim-v2-sticky-on{padding-bottom:72px}
@media (max-width:549px){.esim-v2-sticky__price{font-size:16px}.esim-v2-sticky__cta{padding:0 14px}}

/* Ô số lượng: ép căn giữa, cùng chiều cao (ghi đè style của theme) */
@media (max-width:849px){
.esim-v2 .quantity{display:flex!important;align-items:center!important;width:100%!important;height:48px!important;margin:0!important;padding:0!important;border:1px solid var(--line)!important;border-radius:999px!important;overflow:hidden;background:#fff}
.esim-v2 .quantity input[type="button"],.esim-v2 .quantity .minus,.esim-v2 .quantity .plus{flex:0 0 64px!important;width:64px!important;height:46px!important;min-height:0!important;margin:0!important;padding:0!important;line-height:46px!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--ink)!important;font-size:24px!important;box-shadow:none!important}
.esim-v2 .quantity input[type="number"],.esim-v2 .quantity .qty{flex:1 1 auto!important;width:auto!important;max-width:none!important;height:46px!important;min-height:0!important;margin:0!important;padding:0!important;line-height:46px!important;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important;font-size:17px!important;font-weight:700!important;color:var(--ink)!important}
}
