/* Smooth scroll optimization */
html {
    scroll-behavior: auto; /* Reset default, will be controlled by JS */
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    
    /*.esim-product-selector,
    .esim-product-item {
        transition: none !important;
    } */
}
/* Price container - flex row cho giá */
.esim-product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
}

/* Row chứa giá hiện tại + giá gốc */
.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Giá hiện tại */
.price-current {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

/* Giá gốc - gạch ngang */
.price-original {
    font-size: 14px;
    font-weight: 400;
    color: #9CA3AF;
    text-decoration: line-through;
}

/* Price per day - dòng riêng bên dưới */
.price-per-day {
    display: block;
    font-size: 12px;
    font-style: italic;
    color: #6B7280;
    font-weight: 400;
    line-height: 1.2;
    width: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .price-current {
        font-size: 15px;
    }
    
    .price-original {
        font-size: 13px;
    }
    
    .price-per-day {
        font-size: 11px;
    }
}
/* Optimize scroll performance */
.esim-product-selector {
    contain: layout style;
    will-change: auto;
}
/* Force cart dropdown visible */
@media (min-width: 769px) {
    .menu-item-cart.forced-open .minicart.forced-visible {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        z-index: 99999 !important;
    }
    
    /* Sticky cart hover effect */
    .sticky-cart-left {
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .sticky-cart-left:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}
/* Loading state during scroll */
.esim-product-updating {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
/* Khi content bị display none, không còn gap */
.esim-coupons-content[style*="display: none"] {
    margin: 0;
    padding: 0;
    height: 0;
}
/* Performance optimizations */
.esim-coupons-display {
    /* Enable GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Optimize repaints */
    will-change: contents;
}

.esim-coupons-list {
    /* Contain layout calculations */
    contain: layout style;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* Reduce paint areas */
.esim-coupon-item {
    /* Isolate each item's rendering */
    will-change: transform;
    transform: translateZ(0);
}

.esim-coupons-display.show {
    margin-bottom: 20px;
    display: block;
}
.esim-view-details-inline:not(:disabled):hover {
    background: transparent;
    border: none;
    color: #1565c0;
    border: 1px solid #33333317;
}

.esim-view-details-inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.esim-view-details-inline svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: none;
}

.esim-view-details-inline:not(:disabled):hover svg {
    transform: none;
}

/* Update action buttons to 2 columns */


/* Remove the 3rd button full width style */
.esim-buy-now {
    grid-column: auto; /* Change from 1 / -1 to auto */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-view-details-inline {
        font-size: 12px;
    }
        .esim-selector-grid.unlimited-package .esim-days-item, .esim-selector-grid.unlimited-package .esim-quantity-item {
        display: flex;
        flex-direction: row!important;
    }


.esim-selector-item {
    justify-content: space-between;
}
    .esim-total-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: nowrap; /* THÊM DÒNG NÀY */
}
    .esim-action-buttons {
        gap: 10px;
        /* Giữ nguyên 2 cột trên mobile */
        grid-template-columns: 1fr 1fr;
    }
    .esim-action-button {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .esim-action-button svg {
        width: 16px;
        height: 16px;
    }
    
    .esim-action-button span {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .esim-view-details-inline {
        font-size: 12px;
    }
}
/* eSIM Product Selector Styles */
.esim-coupon-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.esim-coupon-code {
    font-size: 14px;
    font-weight: 600;
    color: #1e88e5;
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 4px;
    border: 1px dashed #1e88e5;
}

.esim-coupon-amount {
    font-size: 15px;
    font-weight: 600;
    color: #2e7d32;
}

.esim-coupon-desc {
    font-size: 13px;
    color: #616161;
    flex: 1;  /* Để description chiếm hết không gian còn lại */
}

.esim-coupon-condition {
    font-size: 12px;
    color: #757575;
    margin-top: 2px;
}
.esim-product-selector {
    max-width: 800px;
    margin: 0 auto;
    padding: 0px 0px;
    border-radius: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Package Type Tabs */
.esim-package-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #F3F4F6;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    min-height: 52px;
    position: relative;
    transition: opacity 0.3s ease;
    
    /* Remove fixed width behavior */
    overflow: visible; /* Changed from auto/scroll */
    flex-wrap: nowrap; /* Keep tabs in one row */
    justify-content: center; /* Center tabs */
}

/* Tab buttons with flexible width */
.esim-tab-button {
    /* Remove flex: 1 to allow flexible width */
    flex: 0 0 auto; /* Don't grow, don't shrink, auto width */
    padding: 10px 16px; /* Consistent padding */
    border: none;
    background: #ffffff;
    color: #6c757d;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid transparent;
    white-space: nowrap;
    
    /* Min width for touch targets */
    min-width: auto; /* Remove any min-width */
    width: auto; /* Auto width based on content */
}

.esim-tab-button:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #495057;
}
.esim-tab-button:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}
.esim-tab-button.active {
    background: #1E3A8A;
    color: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Selection Grid */
.esim-selector-grid {
    display: grid;
    gap: 20px;
    transition: grid-template-columns 0.2s ease;
    width: 100%;
    grid-template-columns: repeat(1, 1fr) !important;
    padding: 15px 15px;
    background: #f3f4f6;
    border-radius: 12px;
    box-shadow: 1px 1px 4px #e5f7ff80;
}
input#esim-quantity {
    max-width: unset!important;
    vertical-align: middle;
    width: 100%;
}
/* Layout cho gói không giới hạn - 2 cột */
.esim-selector-grid.unlimited-package {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* Ẩn item dung lượng cho gói không giới hạn */
.esim-selector-grid.unlimited-package .esim-data-usage-item {
    display: none !important;
}

/* Grid positioning cho gói không giới hạn */
.esim-selector-grid.unlimited-package .esim-days-item {
    grid-area: 1 / 1 / 2 / 2;
}

.esim-selector-grid.unlimited-package .esim-quantity-item {
    grid-area: 1 / 2 / 2 / 3;
}

.esim-selector-item {
    display: flex;
    flex-direction: row;
    width: 100%;
}


/* Custom Quantity Input */
.esim-quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #38BDF8;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.06);
    height: 40px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.esim-quantity-wrapper:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.esim-quantity-wrapper #esim-quantity {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    background: transparent;
    padding: 0;
    height: 100%;
    -moz-appearance: textfield;
}

/* Hide number input spinners */
.esim-quantity-wrapper #esim-quantity::-webkit-outer-spin-button,
.esim-quantity-wrapper #esim-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.esim-quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #38BDF8;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.esim-quantity-btn:hover:not(:disabled) {
    background: #f3f4f6;
    color: #374151;
}

.esim-quantity-btn:active:not(:disabled) {
    background: #e5e7eb;
}

.esim-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.esim-quantity-minus {
    /*border-right: 1px solid #e5e7eb;*/
}

.esim-quantity-plus {
    /*border-left: 1px solid #e5e7eb;*/
}

/* Focus state for quantity input */
.esim-quantity-wrapper #esim-quantity:focus {
    outline: none;
}
/* Hide native select but keep it accessible */
.esim-custom-select .esim-select {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Custom Select Container */
.esim-custom-select {
    position: relative;
    width: 100%;
}

/* Custom Select Display */
.esim-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    height: 48px;
    transition: all 0.2s ease;
    user-select: none;
}

.esim-custom-select.disabled .esim-select-display {
    background: #f9fafb;
    cursor: not-allowed;
}

.esim-custom-select.disabled .esim-select-value {
    color: #9ca3af;
}

.esim-select-display:hover:not(.disabled) {
    border-color: #007cba;
}

.esim-custom-select.active .esim-select-display {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.esim-select-value {
    font-size: 14px;
    color: #374151;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esim-select-arrow {
    transition: transform 0.2s ease;
    color: #6b7280;
    flex-shrink: 0;
}

.esim-custom-select.active .esim-select-arrow {
    transform: rotate(180deg);
}

/* Custom Dropdown */
.esim-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
    max-height: 240px;
    overflow: hidden;
}

.esim-custom-select.active .esim-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.esim-select-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}
/* Quantity buttons mobile */
.esim-quantity-btn {
    width: 40px;
}
.esim-quantity-wrapper #esim-quantity {
    font-size: 15px;
}
/* Custom scrollbar */
.esim-select-options::-webkit-scrollbar {
    width: 6px;
}

.esim-select-options::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.esim-select-options::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.esim-select-options::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Option Items */
.esim-select-option {
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.esim-select-option:hover {
    background: #f3f4f6;
}

.esim-select-option.selected {
    background: #eff6ff;
    color: #007cba;
    font-weight: 500;
}

.esim-select-option.selected::after {
    content: '✓';
    color: #007cba;
    font-weight: bold;
}

/* Ensure dropdown is above other elements */
.esim-selector-item {
    position: relative;
    z-index: 1;
}

.esim-selector-item:has(.esim-custom-select.active) {
    z-index: 10;
}
.esim-select,
#esim-quantity {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 48px;
    box-sizing: border-box;
    font-family: inherit;
}

.esim-select:focus,
#esim-quantity:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.esim-select:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}
/* Option with price display */
.esim-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #374151;
}

.esim-select-option .option-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.esim-select-option .option-text {
    flex-shrink: 0;
}

.esim-select-option .option-price {
    font-weight: 600;
    color: #F97316;
    margin-left: auto;
    white-space: nowrap;
    font-size: 13px;
}
/* Option with product index */
.esim-select-option .option-index {
    font-size: 11px;
    color: #9CA3AF;
    margin-left: 4px;
}
.esim-select-option .best-seller-icon {
    flex-shrink: 0;
    color: #FF6B6B;
    width: 16px;
    height: 16px;
    margin-left: 8px;
}

/* Mobile responsive for price options */
@media (max-width: 480px) {
    .esim-select-option .option-price {
        font-size: 12px;
    }
    
    .esim-select-option {
        padding: 8px 10px;
    }
    
    .esim-select-option .best-seller-icon {
        width: 14px;
        height: 14px;
    }
}
/* Price Display */
.esim-price-display {
    border-radius: 12px;
}

.esim-total-price {
    display: flex;
    align-items: flex-start; /* THAY ĐỔI từ center thành flex-start */
    justify-content: space-between;
    gap: 18px;
    font-size: 18px;
    margin-bottom: 0px;
    flex-wrap: wrap; /* THÊM DÒNG NÀY */
}
/* Phần tên sản phẩm bên trái */
.esim-product-name {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* THAY ĐỔI từ nowrap thành normal */
    line-height: 1.3; /* THÊM DÒNG NÀY */
    word-break: break-word; /* THÊM DÒNG NÀY */
}
/* Price Breakdown */


.esim-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Price Labels */
.price-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.price-label.total-label {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* Price Values */
.price-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.original-price-strike {
    color: #999 !important;
    text-decoration: line-through;
}

.discount-amount {
    color: #24b459;
}

.savings-badge {
    background: #ffeaa7;
    color: #d63031;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #007cba;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-price-wrapper {
        padding: 16px;
        margin: 16px 0;
    }
    .esim-selector-item label {
        margin-bottom:18px;
    }
    .price-row {
        padding: 6px 0;
    }
    
    .total-amount {
        font-size: 20px;
    }
    
    .savings-badge {
        padding: 3px 8px;
        font-size: 12px;
    }
}

.price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #1E3A8A;
    text-align: right;
}

/* Ẩn price-note nếu có */
.price-note {
    display: none;
}

/* Action Buttons - Updated 2 columns layout */
.esim-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.esim-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

/* Icon styling */
.esim-action-button svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.esim-action-button span {
    line-height: 1.2;
}

/* Buy Now Button */
.esim-buy-now {
    background: #EA580C;
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    /* KHÔNG có grid-column: 1 / -1 */
}

.esim-buy-now:hover:not(:disabled) {
    background: #C2410C;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.esim-buy-now:hover:not(:disabled) svg {
    transform: scale(1.1);
}

/* Add to Cart Button */
.esim-add-to-cart {
    background: #3B82F6;
    color: #fff;
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.esim-add-to-cart:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.2);
}

.esim-add-to-cart:hover:not(:disabled) svg {
    transform: scale(1.1);
}

/* Disabled state */
.esim-action-button:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.esim-action-button:disabled svg {
    opacity: 0.6;
}

/* Active/Click effect */
.esim-action-button:active:not(:disabled) {
    transform: translateY(0);
}

/* Loading Indicator - Hidden */
.esim-loading {
    display: none !important;
}

/* Modal Styles */
.esim-modal {
    display: flex; /* ← quan trọng */
    align-items: center; /* căn giữa theo chiều dọc */
    justify-content: center; /* căn giữa theo chiều ngang */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
.esim-modal-content.esim-calculator-content .esim-modal-body {
    display: block;
}
.esim-modal-content {
    background-color: #fff;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
    margin: 0; /* ← bỏ margin cũ để không đẩy modal lên */
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.esim-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
   /* border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);*/
}

.esim-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.esim-modal-close {
    font-size: 24px;
    z-index: 99999;
    font-weight: bold;
    color: #adb5bd;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.esim-modal-close:hover {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
}

.esim-modal-body {
    padding: 24px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* Product Attributes */
.product-attributes {
    display: grid;
    gap: 0px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0px 10px 0px;
    align-items: flex-start;
    border-bottom: 1px solid #3333330d;
}

.attribute-label {
    font-weight: 600;
    color: #374151;
    flex: 0 0 25%;
}

.attribute-value {
    color: #6c757d;
    text-align: right;
    flex: 1;
}

.product-pricing {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
}

.price-item .price-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.price-item .price-value {
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
}

/* Notifications */
.esim-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.esim-notification-success {
    background: #d4edda;
    display: none!important;
    color: #155724;
    border-left: 4px solid #28a745;
}

.esim-notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Ẩn text gốc */
    .esim-tab-button[data-package="Không giới hạn"]::after {
        content: "K. Giới hạn";
    }
    
    /* Thay bằng text ngắn hơn */
    .esim-tab-button[data-package="Không giới hạn"] {
        font-size: 0; /* Hide original text */
    }
    
    .esim-tab-button[data-package="Không giới hạn"]::after {
        font-size: 13px; /* Restore font size */
    }
    .esim-product-selector {
        margin: 0px;
    }
    .esim-coupons-display.show {
    margin-bottom: 14px;
}
.esim-calculator-wrapper {
    margin-bottom:15px!important;
}
    .esim-price-display {
        padding: 0px;
    }
    /* TẤT CẢ các grid đều thành 1 cột trên mobile */
    .esim-selector-grid,
    .esim-selector-grid.unlimited-package {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* Reset grid positioning cho mobile */
    .esim-selector-grid.unlimited-package .esim-days-item,
    .esim-selector-grid.unlimited-package .esim-quantity-item {
        grid-area: auto !important;
    }
    
    .esim-package-tabs {
        /* Allow horizontal scroll only if needed */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar Firefox */
        -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
        
        /* Ensure tabs stay centered when not scrolling */
        justify-content: flex-start;
        padding: 4px 8px; /* More horizontal padding on mobile */
    }
    
    .esim-tab-button {
        padding: 14px 16px;
    }
    
    .esim-action-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    
    .price-amount {
        font-size: 24px;
    }
    
    .esim-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .esim-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .attribute-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
        font-size: 14px;
    }
    
    .attribute-value {
        text-align: left;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .esim-selector-grid,
    .esim-selector-grid.unlimited-package {
        gap: 15px !important;
    }
    .esim-action-buttons {
        gap: 8px;
        /* Giữ 2 cột trên mobile nhỏ */
        grid-template-columns: 1fr 1fr;
        /* XÓA dòng grid-template-columns: 1fr; nếu có */
    }
    
    .esim-action-button {
        padding: 10px 8px;
        font-size: 12px;
        gap: 6px;
        min-height: 40px;
    }
    
    .esim-action-button svg {
        width: 14px;
        height: 14px;
    }
    .esim-tab-button {
        font-size: 13px;
        padding: 5px 10px;
        line-height: 1.5;
        min-height: 48px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .esim-modal-body {
        padding: 16px;
    }
}


/* Coupons Display - COLLAPSIBLE VERSION */
.esim-coupons-display {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: none;
}

/* Collapsible Header - Clickable */
.esim-coupons-header {
    display: flex;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0;
    position: relative;
    align-items: center;
    align-content: flex-start;
    justify-content: space-between;
}


.esim-coupons-header.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    /*background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);*/
    color: white;
}

.esim-coupons-header.expanded:hover {
    /*background: linear-gradient(135deg, #0056b3 0%, #004494 100%);*/
}

/* Header Content */
.esim-coupons-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.esim-coupons-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #007cba;
    transition: color 0.3s ease;
}

.esim-coupons-header.expanded .esim-coupons-icon {
    /*color: white;*/
}

.esim-coupons-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: color 0.3s ease;
}

.esim-coupons-header.expanded .esim-coupons-title {
    /*color: white;*/
}

/* Preview Badges Container */
.esim-coupons-preview {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
    flex-direction: row;
}

.esim-coupons-header.expanded .esim-coupons-preview {
    display: flex; /* Giữ preview hiển thị khi mở rộng */
    opacity: 0.7; /* Làm mờ một chút để phân biệt */
}

/* Preview Badge */
.esim-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(14, 165, 233, 0.1);
    color: #0EA5E9;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(25, 118, 210, 0.3);
    transition: all 0.2s ease;
    line-height: 1.5;
}

.esim-preview-badge:hover {
    background: #bbdefb;
}

/* More indicator */
.esim-preview-more {
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

/* Expand/Collapse Arrow */
.esim-coupons-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #666;
}

.esim-coupons-header.expanded .esim-coupons-arrow {
    transform: rotate(180deg);
    /*color: white;*/
}

/* Collapsible Content */
.esim-coupons-content {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    will-change: transform, opacity;
    overflow: hidden;
    background: white;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    /* Thêm để tránh flicker */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.esim-coupons-display.expanded .esim-coupons-content {
    opacity: 1;
    transform: scaleY(1);
}

/* Coupons List - Giữ nguyên layout 3 cột */
.esim-coupons-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

/* Giữ nguyên toàn bộ CSS layout 3 cột coupons đã có */
.esim-coupon-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    min-height: 50px;
    align-items: stretch;
}


/* Mobile responsive */
@media (max-width: 768px) {
    .esim-coupons-header {
        padding: 0px 0px;
    }
    .esim-selector-grid {
    padding: 10px 8px;
    margin-top:15px!important;
}
    .esim-coupons-preview {
        max-width: 40%;
        gap: 6px;
    }
    
    .esim-preview-badge {
        padding: 0px 6px;
        font-size: 10px;
        line-height: 2;
    }
    
    .esim-coupons-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .esim-coupons-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .esim-coupons-preview {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .esim-coupons-arrow {
        position: absolute;
        top: 0px;
        right: 12px;
    }
}


/* Body modal open state */
body.modal-open {
    overflow: hidden;
}

/* Focus states for accessibility */
.esim-select:focus,
#esim-quantity:focus,
.esim-action-button:focus {
    outline: 1px solid #007cba;
}

/*.esim-tab-button:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}*/
.esim-custom-select:focus-within .esim-select-display {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}
/* ============================================================================
   PROCESSING OVERLAY FOR ESIM SELECTOR
   ============================================================================ */

.esim-processing-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;  /* Thay 100% bằng 100vw */
    height: 100vh !important; /* Thay 100% bằng 100vh */
    background-color: rgba(0, 0, 0, 0.85) !important;
    display: none;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Thêm các dòng sau để đảm bảo không bị ảnh hưởng bởi parent */
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}
/* Đảm bảo overlay không bị contained */
body > .esim-processing-overlay {
    position: fixed !important;
}
/* Elementor editor mode compatibility */
.elementor-editor-active .esim-processing-overlay {
    z-index: 9999999 !important; /* Higher than Elementor panels */
}
.esim-processing-overlay.show {
    display: flex !important;
    animation: esimFadeIn 0.3s ease-out;
}

@keyframes esimFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.esim-processing-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    animation: esimScaleIn 0.3s ease-out forwards;
}

@keyframes esimScaleIn {
    to {
        transform: scale(1);
    }
}

.esim-processing-icon {
    margin-bottom: 24px;
}

.esim-processing-icon .spinner {
    width: 60px;
    height: 60px;
    animation: esimRotate 2s linear infinite;
    margin: 0 auto;
}

@keyframes esimRotate {
    100% {
        transform: rotate(360deg);
    }
}

.esim-processing-icon .spinner .path {
    stroke: #28a745;
    stroke-linecap: round;
    animation: esimDash 1.5s ease-in-out infinite;
}

@keyframes esimDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.esim-processing-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.esim-processing-subtext {
    font-size: 14px;
    color: #666;
}

/* Success state */
.esim-processing-icon.success .checkmark {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: esimStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: esimStroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes esimStroke {
    100% {
        stroke-dashoffset: 0;
    }
}


/* Mobile responsive */
@media (max-width: 480px) {
    .esim-processing-content {
        padding: 30px 20px;
    }
    
    .esim-processing-icon .spinner,
    .esim-processing-icon.success .checkmark {
        width: 50px;
        height: 50px;
    }
    
    .esim-processing-text {
        font-size: 18px;
    }
    
    .esim-processing-subtext {
        font-size: 13px;
    }
}

/* Prevent body scroll when overlay is active */
body.esim-overlay-active {
    overflow: hidden !important;
}

/* Features Icons Container */
.esim-features-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    
    /* ← THÊM CÁC DÒNG NÀY */
    max-width: 100%;
    width: 100%;
    min-width: 0;
    position: relative;
    contain: none; /* Reset containment */
    
    /* Existing styles... */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Container parent cần có overflow hidden */
.esim-product-info-left .left-card {
    overflow: hidden; /* Ẩn phần tràn */
    position: relative;
}

/* Feature Item - Căn chỉnh các phần tử */
.esim-feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: max-content;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #282a2d;
    border-radius: 8px;
    border: 1px solid rgba(243, 227, 227, 0.24);
    transition: all 0.3s ease;
}

.esim-feature-value {
    font-weight: 500;
    font-size: 13px;
    color: #374151;
    flex-shrink: 0;
    line-height: 1.2;
}

.esim-feature-item > span:not(.esim-feature-check) {
    line-height: 1;
    display: flex;
    align-items: center;
    min-width: max-content;
    font-weight: 500;
    font-size: 13px;
    flex-shrink: 0;
}

/* Feature Item - Căn chỉnh các phần tử */
.esim-feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: max-content;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #282a2d;
    border-radius: 8px;
    border: 1px solid rgba(243, 227, 227, 0.24);
    transition: all 0.3s ease;
}

/* Feature Check - Căn chỉnh dấu tick */
.esim-feature-check {
    display: flex;
    align-items: center;
    margin-left: 2px;
    line-height: 1;
}

.esim-feature-check svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}
.esim-feature-item[data-feature="tiktok"] svg {
    color: #000000; /* TikTok black */
}
/* Responsive adjustments */
@media (max-width: 480px) {
    .esim-feature-check svg {
        width: 14px;
        height: 14px;
    }
}

/* Icon SVG */
.esim-feature-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.esim-feature-value {
    font-weight: 500;
    font-size: 13px;
    color: #374151;
    flex-shrink: 0;
    line-height: 1.2;
}
/* Text span */
.esim-feature-item > span:not(.esim-feature-check) {
    line-height: 1;
    display: flex;
    align-items: center;
    min-width: max-content; /* THÊM DÒNG NÀY */
    font-weight: 500;
    font-size: 13px;
}
.esim-feature-text {
    font-weight: 500;
    font-size: 13px;
    color: #374151;
    display: none; /* Hide label, only show value */
}
.esim-feature-item span {
    font-weight: 400;
    font-size: 14px;
    flex-shrink: 0; /* THÊM DÒNG NÀY */
    display: none;
}




/* Specific colors cho từng feature */
.esim-feature-item[data-feature="facebook"] svg {
    color: #1877f2;
}
/* Override để đảm bảo product name hiển thị đúng */
.esim-total-price .esim-product-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    flex-wrap: wrap !important;
    max-width: none !important;
    min-width: auto !important;
}
/* Mobile responsive */
@media (max-width: 480px) {
    .esim-features-icons {
        gap: 6px;
        /* Scrollbar mỏng hơn trên mobile */
        scrollbar-width: thin;
    }
    
    .esim-feature-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .esim-feature-item svg {
        width: 14px;
        height: 14px;
    }
    
    .esim-feature-value {
        font-size: 11px;
    }
    
    .esim-feature-item span {
        font-size: 12px; /* THÊM DÒNG NÀY */
    }
    
.esim-product-name {
    font-size: 14px;
    width: 100%;
    white-space: normal; /* THÊM DÒNG NÀY */
    overflow: visible; /* THÊM DÒNG NÀY */
    text-overflow: initial; /* THÊM DÒNG NÀY */
    line-height: 1.2; /* THÊM DÒNG NÀY */
}
    
    .esim-price-wrapper {
        width: 100%;
    }
    
    .price-label {
        font-size: 14px;
    }
    
    .price-amount {
        font-size: 20px;
    }
}
/* Reset icon trong custom select - Positioned on left of arrow */
.esim-select-reset {
    position: absolute;
    right: 28px; /* Positioned to the left of arrow icon */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none !important; /* Force hide by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 1;
    background: #fff; /* Add background to prevent text overlap */
    border-radius: 50%;
}

.esim-select-reset:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

/* Only show when has value */
.esim-custom-select.has-value .esim-select-reset {
    display: flex !important;
}

/* Ensure arrow stays in place */
.esim-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    color: #38BDF8;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esim-custom-select.active .esim-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Adjust padding based on reset icon visibility */
.esim-select-display {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px 12px 16px; /* Default padding with space for arrow only */
    border-radius: 8px;
    cursor: pointer;
    height: 48px;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid #38BDF8;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.06);
}

/* Add extra padding when reset icon is visible */
.esim-custom-select.has-value .esim-select-display {
    padding-right: 50px; /* More space for both icons */
}

/* Animation cho reset */
@keyframes resetRotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(180deg); }
}

.esim-select-reset:active {
    animation: resetRotate 0.3s ease;
}

/* Prevent text from overlapping with icons */
.esim-select-value {
    font-size: 14px;
    color: #374151;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px; /* Add some spacing from icons */
    line-height: 1.2; /* Ensure proper line height */
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    justify-content: flex-end;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .esim-select-reset {
        right: 26px;
        width: 18px;
        height: 18px;
        top: 50%;
        transform: translateY(-50%);
    }
    .esim-selector-item {
        flex-direction: column;
    }
    .esim-select-arrow {
        right: 10px;
        width: 14px;
        height: 14px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .esim-custom-select.active .esim-select-arrow {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .esim-custom-select.has-value .esim-select-display {
        padding-right: 46px;
    }
    
    .esim-select-display {
        height: 44px; /* Slightly smaller on mobile */
        padding: 10px 36px 10px 14px;
    }
    
    .esim-select-value {
        font-size: 13px;
        line-height: 1.3;
    }
    .esim-features-icons {
        gap: 8px;
        padding: 12px 0 12px 0;
        margin-bottom: 0px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: calc(100vw - 80px); /* ← THÊM: Limit width trên mobile */
    }
    
    .left-card {
        overflow-x: visible; /* ← THÊM: Đảm bảo visible trên mobile */
    }
    
    .esim-feature-item {
        padding: 4px 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .esim-feature-item svg {
        width: 16px;
        height: 16px;
    }
    
    .esim-feature-value {
        font-size: 12px;
    }
    .esim-select-reset {
        right: 26px;
        width: 18px;
        height: 18px;
    }
    
    .esim-select-arrow {
        right: 10px;
    }
    
    .esim-custom-select.has-value .esim-select-display {
        padding-right: 46px;
    }
    /* Simplify coupon item visuals */
    .esim-coupon-item {
        /* Replace gradient with solid color */
        background: #e3f2fd !important;
        /* Simplify shadow */
        box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
        /* Remove transitions on mobile */
        transition: none !important;
    }
    
    /* Remove decorative circles */
    .esim-discount-column::after,
    .esim-coupon-info::before {
        display: none !important;
    }
    
    /* Disable hover effects on mobile */
    .esim-coupon-item:hover {
        transform: none !important;
    }
    
    /* Optimize coupons list container */
    .esim-coupons-list {
        /* Enable GPU acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* Contain paint operations */
        contain: layout style paint;
    }
    
    /* Reduce animation duration on mobile */
    .esim-coupons-content {
        transition-duration: 0.2s !important;
    }
    
    /* Disable complex animations */
    .esim-coupon-item.becoming-applicable {
        animation: none !important;
    }
}
/* Extra small devices */
@media (max-width: 480px) {
    /* Further simplifications */
    .esim-coupon-item {
        border-radius: 6px !important;
    }
    
    .esim-coupons-content {
        /* Faster animation on very small devices */
        transition-duration: 0.15s !important;
    }
}
/* Minimal loading state - chỉ ẩn reset button */
.esim-custom-select.loading .esim-select-reset {
    display: none !important;
}
/* THAY THẾ đoạn CSS grid layout coupons cũ bằng cái này */

/* Grid layout cho coupons list - 2 cột compact */
.esim-coupons-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 12px;
    position: relative;
    min-height: 70px;
}

/* Tablet và Mobile nhỏ */
@media (max-width: 768px) {
    .esim-coupons-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
/* CSS MỚI cho layout 3 cột coupon */

/* Base coupon item - 3 cột layout */
.esim-coupon-item {
    display: grid;
    grid-template-columns: 120px 1fr; /* Cột 1: 120px, Cột 2: flex, Cột 3: 100px */
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    min-height: 50px;
    align-items: stretch;
}

/* APPLICABLE COUPONS */
.esim-coupon-item.applicable {
    opacity: 1;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #3B82F6;
    transform: none;
}

/* NOT APPLICABLE COUPONS */
.esim-coupon-item.not-applicable {
    opacity: 0.5;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-color: #9e9e9e;
    transform: none;
}

/* Animation khi chuyển state */
.esim-coupon-item.not-applicable.becoming-applicable {
    animation: couponActivate 0.5s ease forwards;
}

@keyframes couponActivate {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* CỘT 1: Discount Amount */
.esim-discount-column {
    display: flex;
    flex-direction: row; /* Ngang: "Giảm" và số trên cùng 1 hàng */
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: #3B82F6;
    color: white;
    position: relative;
    gap: 4px;
}

.esim-coupon-item.not-applicable .esim-discount-column {
    background: #9e9e9e;
}

/* Circle trang trí bên phải cột 1 */
.esim-discount-column::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px currentColor;
}

.esim-discount-text {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
}

.esim-discount-amount {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* CỘT 2: Coupon Info */
.esim-coupon-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    background: white;
    position: relative;
    gap: 4px;
}

/* Circle trang trí bên trái cột 2 
.esim-coupon-info::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px #3B82F6;
}*/

.esim-coupon-item.not-applicable .esim-coupon-info::before {
    box-shadow: inset 0 0 0 2px #9e9e9e;
}

.esim-coupon-name {
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    line-height: 1.2;
    margin: 0;
}

.esim-coupon-item.not-applicable .esim-coupon-name {
    color: #757575;
}

.esim-coupon-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    margin: 0;
}

.esim-coupon-item.not-applicable .esim-coupon-description {
    color: #9e9e9e;
}

/* CỘT 3: Expiry Date */
.esim-expiry-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 8px;
    background: white;
    text-align: center;
    gap: 2px;
}

.esim-expiry-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esim-expiry-date {
    font-size: 11px;
    color: #333;
    font-weight: 500;
    line-height: 1.2;
}

.esim-coupon-item.not-applicable .esim-expiry-label,
.esim-coupon-item.not-applicable .esim-expiry-date {
    color: #9e9e9e;
}

/* Restriction reason - hiển thị dưới cột 2 */
.esim-coupon-restriction {
    grid-column: 2 / 3; /* Chỉ hiển thị ở cột 2 */
    font-size: 10px;
    color: #f44336;
    font-weight: 500;
    margin-top: 4px;
    padding: 3px 6px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 4px;
    border-left: 3px solid #f44336;
    transition: all 0.3s ease;
    display: none;
}

/* Tablet responsive */
@media (max-width: 1024px) {
    .esim-coupon-item {
        grid-template-columns: 100px 1fr;
        min-height: 45px;
    }
    
    .esim-discount-column {
        padding: 12px 8px;
    }
    
    .esim-discount-amount {
        font-size: 16px;
    }
    
    .esim-discount-text {
        font-size: 10px;
    }
    
    .esim-coupon-name {
        font-size: 13px;
    }
    
    .esim-coupon-description {
        font-size: 11px;
    }
    
    .esim-expiry-label,
    .esim-expiry-date {
        font-size: 10px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-coupon-item {
        grid-template-columns: 90px 1fr;
        min-height: 45px;
    }
    
    .esim-discount-column {
        padding: 10px 6px;
        gap: 2px;
    }
    
    .esim-discount-amount {
        font-size: 14px;
    }
    
    .esim-discount-text {
        font-size: 9px;
    }
    
    .esim-coupon-info {
        padding: 8px 12px;
        gap: 2px;
    }
    
    .esim-coupon-name {
        font-size: 12px;
    }
    
    .esim-coupon-description {
        font-size: 10px;
    }
    
    .esim-expiry-column {
        padding: 8px 4px;
    }
    
    .esim-expiry-label,
    .esim-expiry-date {
        font-size: 9px;
    }
    
    .esim-coupon-restriction {
        font-size: 9px;
        padding: 2px 4px;
        line-height: 1.2;
    }
}


/* Ensure modal backdrop covers entire viewport */
.esim-modal {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Modal content should be positioned independently */
.esim-modal-content {
    position: relative !important;
    margin: 20px auto !important;
    transform: none !important;
    /* Keep the visual styles */
    background-color: #f7f7f7;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
/* Fix modal z-index and positioning */
#esim-product-modal.esim-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important; /* Max z-index value */
    margin: 0 !important;
    padding: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: none; /* Hidden by default */
}

#esim-product-modal.esim-modal[style*="display: flex"] {
    display: flex !important;
}

/* Remove any transform or position from ancestors */
.elementor-widget-container:has(.esim-product-selector) {
    transform: none !important;
    position: static !important;
}

.esim-product-selector {
    transform: none !important;
    position: relative !important;
    z-index: 1 !important;
}
/* Product info container - holds product name and view details */
.esim-product-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* Update product name styling */
.esim-product-name {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
}


/* Update total price container */
.esim-total-price {
    display: block;
    margin-bottom: 16px;
}

/* Price wrapper moved below */
.esim-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 10px;
    background: #F4FCFF;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #cfe9f3;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .esim-view-details-inline {
        align-self: flex-start;
        font-size: 12px;
        padding: 0px 5px;
    }
    
    .esim-price-wrapper {
        padding: 12px 8px;
    }
}
/* Icon trong label */


.esim-label-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.esim-label-icon svg {
    width: 100%;
    height: 100%;
    fill: #1E3A8A; /* Màu cam chủ đạo */
    transition: all 0.3s ease;
}

/* Hover effect cho toàn bộ selector item */
.esim-selector-item:hover .esim-label-icon svg {
    fill: #EA580C; /* Màu cam đậm hơn */
    transform: scale(1.1);
}

/* Focus state */
.esim-selector-item:focus-within .esim-label-icon svg {
    fill: #DC2626;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .esim-label-icon {
        width: 18px;
        height: 18px;
    }
    
    .esim-selector-item label {
        gap: 6px;
        font-size: 14px;
    }
}

/* Pulse animation cho icon */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.esim-label-icon svg.pulse {
    animation: pulse 0.6s ease-out;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .esim-label-icon svg {
        fill: #1E3A8A; /* Lighter orange for dark mode */
    }
    
    .esim-selector-item:hover .esim-label-icon svg {
        fill: #F97316;
    }
}
/* Tab visibility styling */
.esim-tab-button.tab-hidden {
    display: none !important;
}

/* Adjust tab container based on visible tabs count */
.esim-package-tabs[data-visible-tabs="1"] {
    grid-template-columns: 1fr;
}

.esim-package-tabs[data-visible-tabs="2"] {
    grid-template-columns: repeat(2, 1fr);
}

/* Ensure visible tabs take full width */
.esim-package-tabs[data-visible-tabs="1"] .esim-tab-button,
.esim-package-tabs[data-visible-tabs="2"] .esim-tab-button {
    width: 100%;
}

/* Message when no products available */
.esim-no-products-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Smooth transition for tab visibility changes */
.esim-tab-button {
    transition: opacity 0.8s ease, transform 0.3s ease;
}

.esim-tab-button.tab-hiding {
    opacity: 0;
    transform: scale(0.95);
}
/* Hide tabs by default until we know which ones to show */
.esim-package-tabs.tabs-loading .esim-tab-button {
    display: none !important;
}

/* Ensure minimum height for tabs container */
.esim-package-tabs.tabs-loading {
    min-height: 48px;
}

/* Smooth transition when tabs appear */
.esim-tab-button {
    animation: fadeInTab 0.3s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Thêm vào file selector.css */

/* Fix tabs jumping - Initial state */
.esim-package-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #F3F4F6;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    min-height: 52px; /* Fixed height to prevent jumping */
    position: relative;
    transition: opacity 0.3s ease;
}

/* Loading state - tabs invisible but maintain space */
.esim-package-tabs.tabs-loading {
    opacity: 0;
    pointer-events: none; /* Prevent clicks during loading */
}

/* Ready state - smooth fade in */
.esim-package-tabs.tabs-ready {
    opacity: 1;
    pointer-events: auto;
}

/* Hide tabs initially until we know which to show */
.esim-package-tabs.tabs-loading .esim-tab-button {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

/* Show tabs when ready */
.esim-package-tabs.tabs-ready .esim-tab-button {
    visibility: visible;
    position: static;
    pointer-events: auto;
    animation: tabFadeIn 0.2s ease-out;
}

/* Smooth fade in animation for individual tabs */
@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure smooth width transition when tabs change */
.esim-tab-button {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: #ffffff;
    color: #6c757d;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid #ffffff00;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading placeholder - optional subtle background animation */
.esim-package-tabs.tabs-loading::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmerSubtle 2s infinite;
    border-radius: 4px;
    pointer-events: none;
}

@keyframes shimmerSubtle {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Remove the old animation styles */
.esim-tab-button.tab-hidden {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-package-tabs {
        min-height: 56px; /* Slightly taller on mobile */
    }
}
/* Optional: Thêm loading dots animation */
.esim-package-tabs.tabs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 10px;
}

.esim-package-tabs.tabs-loading::after {
    content: '•••';
    color: #999;
    font-size: 24px;
    letter-spacing: 8px;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        color: rgba(153, 153, 153, 0.2);
        text-shadow: 
            0.25em 0 rgba(153, 153, 153, 0.2),
            0.5em 0 rgba(153, 153, 153, 0.2);
    }
    40% {
        color: #999;
        text-shadow: 
            0.25em 0 rgba(153, 153, 153, 0.2),
            0.5em 0 rgba(153, 153, 153, 0.2);
    }
    60% {
        text-shadow: 
            0.25em 0 #999,
            0.5em 0 rgba(153, 153, 153, 0.2);
    }
    80%, 100% {
        text-shadow: 
            0.25em 0 #999,
            0.5em 0 #999;
    }
}
/* Update CSS cho product note - sync với overall animation */
.esim-product-note {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #F97316;
    /* REMOVE animation riêng */
    /* animation: noteSlideIn 0.3s ease-out; */
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-bottom: 10px;
}

/* State khi ẩn */
.esim-product-note[style*="display: none"] {
    opacity: 0;
    transform: translateY(-5px);
}

/* Thêm class cho animation sync */
.esim-price-display {
    /* existing styles... */
    transition: opacity 0.3s ease;
}

/* Animation cho toàn bộ product info group */
.esim-product-info-group {
    transition: all 0.3s ease;
}

/* Loading state cho product info */
.esim-product-updating .esim-total-price,
.esim-product-updating .esim-features-icons,
.esim-product-updating .esim-price-wrapper {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
@media (min-width: 769px) {
    .esim-selector-grid.unlimited-package .esim-premium-checkbox {
        grid-column: 1;
        grid-row: 2;
        margin-left: 3px;
        margin-top: 8px;
        justify-self: start;
    }
    
    .esim-selector-grid.unlimited-package .esim-days-item {
        grid-row: 1;
    }
    
    .esim-selector-grid.unlimited-package .esim-quantity-item {
        grid-row: 1;
    }
    .esim-selector-grid {
    row-gap: 0px!important;
}
}
/* Responsive */
@media (max-width: 768px) {
    .esim-product-note {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .esim-product-note::before {
        font-size: 14px;
        margin-right: 4px;
    }
}
/* Premium checkbox styling */
.esim-premium-checkbox {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    gap: 6px;
}

.esim-premium-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #F97316;
}

.esim-premium-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    margin-bottom: 0;
}

/* Best seller tag in dropdown */
.esim-best-seller-tag {
    background: #FF6B6B;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 600;
    flex-shrink: 0;
}

/* Update option styling to accommodate tag */
.esim-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.esim-select-option-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Show checkbox only for unlimited package */
.unlimited-package .esim-premium-checkbox {
    display: inline-flex !important;
}

/* Responsive */
@media (max-width: 768px) {
    .esim-premium-checkbox {
        margin-left: 0px;
    }
    
    .esim-best-seller-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
}
/* Update trong selector.css */
.esim-select-option {
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px; /* Ensure minimum height */
}

.esim-best-seller-tag {
    background: #FF6B6B;
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}
/* Or more specific */
.esim-price-display:not(.esim-product-updating) .esim-features-icons {
    opacity: 1 !important;
}
/* Premium option styling */
.esim-select-option.premium {
    color: #FB923C !important;
    background: linear-gradient(135deg, #1F2937 0%, #374151 50%, #1F2937 100%) !important;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.esim-select-option.premium:hover {
    background: linear-gradient(135deg, #374151 0%, #4B5563 50%, #374151 100%) !important;
    border-color: rgba(251, 146, 60, 0.5);
}

.esim-select-option.premium.selected {
    background: linear-gradient(135deg, #1F2937 0%, #374151 50%, #1F2937 100%) !important;
    border-color: #FB923C;
}

.esim-select-option.premium .option-price {
    color: #FCD34D; /* Màu vàng cho giá của premium */
}
/* Scrollable tabs cho mobile */
@media (max-width: 768px) {
    .esim-package-tabs {
        display: flex !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        gap: 16px;
        padding: 4px 4px 4px 4px;
        /* Remove fixed grid behavior */
        grid-template-columns: none !important;
        justify-content: center;
    }
    
    /* Hide scrollbar */
    .esim-package-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .esim-tab-button {
        /* Smaller padding on mobile but still flexible width */
        padding: 8px 12px;
        font-size: 13px;
        
        /* Ensure minimum touch target size */
        min-height: 44px;
    }
    /* Khi có overflow thì align về trái */
    .esim-package-tabs.has-overflow {
        justify-content: flex-start;
    }
    /* Đảm bảo text không bị cắt */
    .esim-tab-button span {
        display: inline;
        white-space: nowrap;
    }
    
    /* Add scroll indicator hint 
    .esim-package-tabs::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(243, 244, 246, 0.8));
        pointer-events: none;
        border-radius: 0 8px 8px 0;
    }*/
    
    /* Hide scroll indicator when scrolled to end */
    .esim-package-tabs.scrolled-end::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .esim-tab-button {
        padding: 8px 12px;
        font-size: 12px;
    }
}
/* Small screens - stack tabs if needed */
@media (max-width: 480px) {
    .esim-package-tabs {
        /* Keep horizontal layout but allow scroll if needed */
        gap: 3px;
        padding: 3px 5px;
    }
    
    .esim-tab-button {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Ensure hidden tabs stay hidden */
.esim-tab-button.tab-hidden {
    display: none !important;
}

/* Loading and ready states */
.esim-package-tabs.tabs-loading {
    opacity: 0;
    pointer-events: none;
}

.esim-package-tabs.tabs-ready {
    opacity: 1;
    pointer-events: auto;
}

/* Visual indicator for scrollable content (optional) */
@media (max-width: 768px) {
    .esim-package-tabs.has-scroll {
        position: relative;
    }
    .modal-product-subtitle {
        display: flex;
        flex-direction: column;
    }
    /* Gradient fade indicators */
    .esim-package-tabs.has-scroll::before,
    .esim-package-tabs.has-scroll::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 1;
    }
    
    .esim-package-tabs.has-scroll::before {
        left: 0;
        background: linear-gradient(to right, #F3F4F6 0%, transparent 100%);
    }
    
    .esim-package-tabs.has-scroll::after {
        right: 0;
        background: linear-gradient(to left, #F3F4F6 0%, transparent 100%);
    }
}

/* Alternative approach - Wrap tabs on very small screens */
@media (max-width: 360px) {
    .esim-package-tabs {
        flex-wrap: wrap; /* Allow wrapping on very small screens */
        justify-content: center;
        gap: 4px;
    }
    
    .esim-tab-button {
        flex: 0 0 calc(50% - 4px); /* 2 columns on very small screens */
        min-width: 0;
    }
}
/* Modal Product Details - New Layout */
.esim-modal-content {
    width: 75%;
}


.modal-product-header {
    margin-bottom: 20px;
}

.modal-product-title {
    display:none;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.modal-product-subtitle {
    display: flex;
    gap: 12px;
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-product-subtitle span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Chi tiết gói */


.modal-detail-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.modal-detail-list {
    display: grid;
    gap: 12px;
}


.modal-detail-label {
    font-weight: 500;
    color: #555;
    text-align: left;
}

.modal-detail-value {
    color: #333;
    text-align: right;
    font-weight: 600;
}

/* Lưu ý box */
.modal-notice-box {
    background: #FFF3CD;
    border: 1px solid #FFE69C;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.modal-notice-box h4 {
    color: #E07C24;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-notice-content {
    color: #664D03;
    font-size: 14px;
    line-height: 1.6;
}

.modal-notice-content p {
    margin-bottom: 10px;
}

.modal-notice-content strong {
    font-weight: 600;
    color: #E07C24;
}

/* Action buttons */
.modal-info-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-info-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.modal-info-button.primary {
    background: #F97316;
    color: white;
}

.modal-info-button.primary:hover {
    background: #EA580C;
}

.modal-info-button.secondary {
    background: #E5E7EB;
    color: #374151;
}

.modal-info-button.secondary:hover {
    background: #D1D5DB;
}


/* Category Header */
.modal-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.modal-category-thumb {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
}

.modal-category-thumb-placeholder {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
}

.modal-category-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Product Details */


.modal-detail-row:last-child {
    margin-bottom: 0;
}
/* Modal quantity controls - compact version */
.modal-detail-row .modal-quantity-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #38BDF8;
    height: 32px;
}

.modal-detail-row .modal-quantity-btn {
    width: 32px!important;
    height: 32px!important;
    border: none;
    background: transparent;
    color: #0EA5E9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-detail-row .modal-quantity-btn:hover:not(:disabled) {
    background: #F3F4F6;
}

.modal-detail-row .modal-quantity-input {
    width: 40px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
}
/* Modal Action Buttons - New Layout */
.modal-action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.modal-buy-now {
    flex: 1;
    background: #EA580C;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    height: 45px;
}

.modal-buy-now:hover:not(:disabled) {
    background: #DC2626;
}

.modal-add-to-cart {
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 106px;
    height: 45px;
}

.modal-add-to-cart:hover:not(:disabled) {
    background: #1D4ED8;
}

.modal-buy-now:disabled,
.modal-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.modal-detail-label {
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.modal-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
}

/* Quantity selector in modal */
.modal-quantity-section {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
        padding: 8px 0px;
    margin-bottom: 20px;
    display: flex
;
    flex-direction: row;
    align-items: center;
    align-content: center;
    gap: 15px;
}

.modal-quantity-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
    width: 50%;
    justify-content: center;
}

.modal-quantity-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    height: 40px;
    box-shadow: 0px 0px 2px rgba(38, 193, 231, 0.5);
}

.modal-quantity-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #0EA5E9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-quantity-btn:hover:not(:disabled) {
    background: #F3F4F6;
}

.modal-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-quantity-input {
    flex: 1;
    border: none !important;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
    width: 100%;
    background: none !important;
}

.modal-quantity-input::-webkit-outer-spin-button,
.modal-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Modal action buttons */
.modal-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
}

.modal-action-button {
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-buy-now {
    background: #EA580C;
    color: white;
}

.modal-add-to-cart {
    background: #3B82F6;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
   
    .esim-modal-body {
        flex-direction: column;
        padding: 12px;
    }
    .modal-price-amount {
        font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    }

    .modal-left-content {
        max-height: none;
        padding-right: 0;
    }
    
    .modal-right-sidebar {
        width: 100%;
        position: relative;
        order: -1;
    }
    .modal-product-title{
        font-size: 20px;
    }
    .modal-notice-box {
        padding: 12px;
            margin: 24px 0;
    }
    .modal-info-buttons {
        flex-direction: column;
    }
    
    .modal-detail-item {
        gap: 5px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .modal-detail-label {
        min-width: auto;
        font-weight: 600;
    }
}

/* Modal Features Icons */
.modal-features-icons {
    display: none;
    align-items: center;
    gap: 12px;
    margin: 0px 0px 32px 0px;
    flex-wrap: wrap;
}

.modal-features-icons .esim-feature-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #333;
    padding: 3px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    border: 1px solid rgb(243 227 227 / 24%);
}

.modal-features-icons .esim-feature-item svg {
    width: 20px;
    height: 20px;
}

.modal-features-icons .esim-feature-check svg {
    width: 16px;
    height: 16px;
}
/* Thêm vào cuối file selector.css */

/* Total Products Count */
.esim-total-products {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    border: 1px solid #e9ecef;
}

.esim-total-products.loading {
    opacity: 0.6;
}

.esim-total-products-icon {
    width: 20px;
    height: 20px;
    color: #F97316;
}

.esim-total-products-count {
    font-weight: 600;
    color: #F97316;
    font-size: 16px;
}

/* Help text cho calculator button */
.esim-calculator-help {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-left: 12px;
}
.esim-calculator-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    border: 1px solid #33333305;
    border-radius: 16px;
    background: #f3f4f6;
}

@media (max-width: 768px) {
    .esim-calculator-wrapper {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        padding: 10px 8px;
    }
    .esim-total-products {
        padding: 5px 10px;
        font-size: 12px;
    }
    .esim-calculator-help {
        margin-left: 0;
        display:none;
    }
}



/* ===== RIPPLE DOT INDICATOR ===== */
.esim-ripple-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: #0EA5E9;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.esim-ripple-dot.show {
    opacity: 1;
    transform: scale(1);
}

.esim-ripple-dot:before,
.esim-ripple-dot:after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border: solid 2px #0EA5E9;
    border-radius: 50%;
}

.esim-ripple-dot:before {
    animation: ripple 2s linear infinite;
}

.esim-ripple-dot:after {
    animation: ripple 2s 1s linear infinite;
}

@keyframes ripple {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* Fade out animation */
.esim-ripple-dot.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .esim-ripple-dot {
        top: -3px;
        right: -3px;
        width: 10px;
        height: 10px;
    }
    
    .esim-ripple-dot:before,
    .esim-ripple-dot:after {
        border-width: 1.5px;
    }
}
/* ===== END RIPPLE DOT ===== */
/* Ẩn hoàn toàn tab-related elements */
.esim-package-tabs,
.esim-premium-checkbox,
.tab-hidden,
.tabs-loading,
.tabs-ready {
    display: none !important;
}

/* Adjust layout khi không có tabs */
.esim-selector-grid {
    margin-top: 15px; /* Thay vì margin-top từ tabs */
    margin-bottom: 15px;
    background-size: cover;
}
/* Products List Styles */
.esim-selection-header {
    margin: 10px 0 10px 0;
    padding: 0px 10px;
    border-radius: 8px;
}

.esim-selection-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0px;
    color: #1a1a1a;
}

.esim-selection-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.esim-products-list {
    display: grid;
    gap: 25px;
    margin: 0px 0;
}
.esim-product-group {
    border-radius: 16px;
    box-shadow: 1px 0px 4px 0px #3333331a;
    padding: 20px 15px;
    background: #E2F6FC;
}
p.esim-product-group-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
/* Layout 2 cột cho desktop, 1 cột cho mobile */
.esim-product-group-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cột trên desktop */
    gap: 15px;
}

/* Mobile: giữ 1 cột */
@media (max-width: 768px) {
    .esim-product-group-items {
        grid-template-columns: 1fr; /* 1 cột trên mobile */
        gap: 10px;
    }
}
.esim-product-item {
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #ffffff;
    border-radius: 16px 16px 16px 16px;
    border: 1px solid transparent;
}

.esim-product-item:hover {
    border-color: #b4e0ed;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    
}

.esim-product-item.selected {
    border-color: #007cba;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.esim-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.esim-product-specs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.spec-item {
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 13px;
    color: #1565c0;
}

.spec-item.package-type {
    background: #f3e5f5;
    color: #7b1fa2;
}

.esim-product-price {
    margin-right: 15px;
}

.esim-product-price .price,
.esim-product-price .sale-price {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
}

.esim-product-price .original-price {
    display: block;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
    text-align: right;
}

.esim-select-product-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.esim-select-product-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.esim-selected-product {
    display: none;
    transition: opacity 0.18s ease-out;
}
.esim-selected-product[style*="display: none"],
.esim-selected-product.accordion-hidden {
    transition: none;
}
/* Responsive */
@media (max-width: 768px) {
    .esim-product-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .esim-product-group {
        padding: 20px 8px;
    }
    .esim-product-price {
        margin-right: 0;
    }
    
    .esim-product-specs {
        justify-content: center;
    }
}

/* Product Badges in List */
.esim-product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 45px;
}

.esim-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 4px;
    background: #f5f5f5;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
}

.esim-badge-icon svg {
    width: 16px;
    height: 16px;
}


/* Tooltip on hover */
.esim-badge-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 4px;
    z-index: 10;
}

/* Arrow for tooltip */
.esim-badge-icon[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #333;
    margin-bottom: 0;
}

/* Special styling for specific badges */
.esim-badge-icon[data-feature="tiktok"] {
    background: #0000001c;
    padding: 2px;
}

.esim-badge-icon[data-feature="facebook"] {
    background: #e8f0fe;
}

.esim-badge-icon[data-feature="zalo"] {
    background: #e3f2fd;
}

.esim-badge-icon[data-feature="sms"] {
    background: #e8f5e9;
}

.esim-badge-icon[data-feature="goi_dien"] {
    background: #e8f5e9;
}
span.att-val {
    font-size: 10px;
    margin-left: 5px;
    line-height: 1;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .esim-product-badges {
        gap: 6px;
        padding-left: 35px;
    }
    
    .esim-badge-icon {
        height: 20px;
    }
    
    .esim-badge-icon svg {
        width: 14px;
        height: 14px;
    }
}
/* CẬP NHẬT CSS trong selector.css - THÊM VÀO CUỐI FILE */

/* ===== PRODUCT RADIO SELECTION STYLES ===== */

/* Cập nhật grid layout cho 3 cột */
.esim-product-content {
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 16px 14px;
    border-radius: 16px;
}

/* Row 1: Radio + Main info */
.esim-product-row-1 {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Row 2: Price */
.esim-product-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cột 1: Radio Button */
.esim-product-radio {
    display: flex;
    align-items: center;        /* Căn giữa theo chiều dọc */
    justify-content: center;    /* Căn giữa theo chiều ngang */
    min-width: 30px;
    height: 100%;              /* THÊM: Chiếm full height của card */
}

/* Hide native radio input */
.esim-product-radio input[type="radio"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Custom radio label */
.esim-product-radio label {
    position: relative;
    padding: 10px;
    cursor: pointer;
    line-height: 20px;
    display: inline-block;
    margin: 0;
}

/* Radio button circle (unchecked state) */
.esim-product-radio input[type="radio"] + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #007cba;
    border-radius: 100%;
    background: #fff;
    transition: all 0.2s ease;
}

/* Radio button inner dot (checked state) */
.esim-product-radio input[type="radio"] + label:after {
    content: '';
    width: 12px;
    height: 12px;
    background: #007cba;
    position: absolute;
    top: 4px;
    left: 4px;
    border-radius: 100%;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0);
}

/* Checked state */
.esim-product-radio input[type="radio"]:checked + label:after {
    opacity: 1;
    transform: scale(1);
}

/* Hover effects */
.esim-product-radio input[type="radio"] + label:hover:before {
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Focus state for accessibility */
.esim-product-radio input[type="radio"]:focus + label:before {
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

/* Package type styling (thay thế product title) */
.spec-item.package-type {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

/* Update product main content */
.esim-product-main {
    flex: 1;
    min-width: 0; /* Allow content to shrink if needed */
}

/* Update product specs layout */
.esim-product-specs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0px;
}

/* Card hover state - highlight when radio is hovered */
.esim-product-item:hover {
    border-color: #b4e0ed;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    
}

/* Selected state - when radio is checked */
.esim-product-item:has(input[type="radio"]:checked) {
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
    padding-bottom: 10px;
}

/* Fallback for browsers that don't support :has() */
.esim-product-item.selected {
    border-color: #007cba;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-product-content {
        grid-template-columns: auto 1fr auto;
        gap: 0px;
        padding: 12px 15px;
    }
    
    .esim-product-radio input[type="radio"] + label:before {
        width: 18px;
        height: 18px;
    }
    
    .esim-product-radio input[type="radio"] + label:after {
        width: 10px;
        height: 10px;
        top: 4px;
        left: 4px;
    }
    
    .spec-item.package-type {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .esim-product-specs {
        justify-content: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .esim-product-content {
        gap: 0px;
        padding: 12px 8px;
    }
    
    .esim-product-radio {
        min-width: 15px;
    }
    
    .spec-item.package-type {
        font-size: 12px;
        padding: 3px 6px;
        margin-bottom: 6px;
    }
}

/* Animation for selection */
@keyframes radioSelect {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.esim-product-radio input[type="radio"]:checked + label:after {
    animation: radioSelect 0.3s ease-out;
}
/* Category info styling */


.esim-category-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* ✅ Tròn hoàn toàn thay vì 8px */
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e5e7eb; /* Thêm viền để đẹp hơn */
}

.esim-category-thumb-placeholder {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
}

.esim-category-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.esim-product-group-description {
    font-size: 14px;
    color: #666;
    margin: 8px 0 16px 0;
    line-height: 1.4;
    display: none;
}
.sale-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.discount-badge {
    background: #f29d9d38;
    color: #e32323;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

.sale-price {
    font-size: 18px;
    font-weight: 700;
    color: #007cba;
}
.price-breakdown {
    text-align: right;
}

.original-total {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.sale-total-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.discount-badge-main {
    background: #FF4444;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.2;
}

.sale-total {
    font-size: 28px;
    font-weight: 700;
    color: #1E3A8A;
}
/* Premium badge trong category info */
.esim-premium-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: linear-gradient(135deg, #371c13, #653b09);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .esim-premium-badge {
        font-size: 9px;
        padding: 1px 6px;
        margin-left: 4px;
    }
}
/* Thêm vào selector.css */

/* Base button styles với explicit dimensions */
.esim-quantity-btn,
.esim-sticky-quantity-btn,
.modal-quantity-btn {
    /* Reset iOS default button styles */
    -webkit-appearance: none;
    appearance: none;
    
    /* Explicit dimensions */
    min-width: 36px !important; /* iOS touch target minimum */
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
    
    /* Ensure padding doesn't collapse */
    padding: 0 !important;
    
    /* Flex properties */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    /* Prevent text size adjust */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* SVG inside buttons */
.esim-quantity-btn svg,
.esim-sticky-quantity-btn svg,
.modal-quantity-btn svg {
    /* Fixed dimensions */
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    
    /* Prevent shrinking */
    flex-shrink: 0;
    
    /* Display block to avoid inline spacing issues */
    display: block;
}

/* Specific fixes for sticky bar buttons */
.esim-sticky-quantity-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

/* Modal buttons specific size */
.modal-quantity-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
}

/* iOS specific media query */
@supports (-webkit-touch-callout: none) {
    /* iOS only styles */
    .esim-quantity-btn,
    .esim-sticky-quantity-btn,
    .modal-quantity-btn {
        /* Force layout recalculation */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        
        /* Ensure touch target */
        position: relative;
    }
    
    /* Create larger touch target */
    .esim-quantity-btn::before,
    .esim-sticky-quantity-btn::before,
    .modal-quantity-btn::before {
        content: '';
        position: absolute;
        top: -4px;
        right: -4px;
        bottom: -4px;
        left: -4px;
    }
}

/* High pixel density screens */
@media only screen and (-webkit-min-device-pixel-ratio: 3) {
    .esim-quantity-btn svg,
    .esim-sticky-quantity-btn svg,
    .modal-quantity-btn svg {
        /* Ensure sharp rendering */
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
}
/* ===== SELECTED PRODUCT - 2 COLUMN LAYOUT ===== */

/* Grid container cho 2 cột */
.esim-selected-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 16px;
    align-items: start;
}

/* Cột trái - Product Info */


/* Category Header */
.esim-product-category-header {
    display: flex;
    align-items: flex-start; /* Đổi thành flex-start */
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.esim-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3; /* Thêm line-height */
    flex: 1; /* Cho phép text chiếm hết không gian */
}

.esim-category-thumb-wrapper {
    width: 36px;
    height: 36px; /* Đổi thành 36px để tròn hoàn hảo */
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    flex-shrink: 0; /* Không cho phép co lại */
}

.esim-category-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esim-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

/* Product Details List */
.esim-product-details-list {
    margin-bottom: 10px;
}

.esim-product-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 16px;
}

.esim-product-detail-item:last-child {
    border-bottom: none;
}

.esim-detail-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    flex: 0 0 40%; /* Cố định width 40% cho label */
    min-width: 100px; /* Width tối thiểu nhỏ hơn cho mobile */
    line-height: 1.4;
}

.esim-detail-value {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    text-align: right;
    flex: 1; /* Chiếm phần còn lại */
    line-height: 1.4;
    word-wrap: break-word; /* Xuống dòng nếu quá dài */
}

/* View Details Button in Left Column */
.esim-product-info-left .esim-view-details-inline {
    width: 100%;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
}

/* Cột phải - Existing Content */
.esim-product-info-right {
    overflow: visible; /* Cho phép scrollbar hiển thị */
    min-width: 0; /* Cho phép flex shrink */
    padding: 12px 30px;
}
.esim-product-info-left {
    overflow: visible; /* ← THÊM */
    min-width: 0;     /* ← THÊM */
    padding: 12px 30px;
}
/* Responsive - Mobile: 1 cột */
@media (max-width: 768px) {
    .esim-selected-product-grid {
        gap: 0px;
    }
    .esim-product-info-left {
        padding: 5px 14px;
    }
    .esim-product-info-right {
        padding: 5px 14px;
    }
    .price-amount .original-price-strike {
        font-size: 16px!important;
        margin-bottom: 0px!important;
    }
    .price-amount .savings-label {
        font-size: 16px!important;
        margin-top: 0px!important;
    }
    .esim-product-category-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .esim-category-thumb-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .esim-category-name {
        font-size: 15px;
        line-height: 1.2;
    }
    
    .esim-product-detail-item {
        padding: 16px 0;
        gap: 12px;
    }
    
    .esim-detail-label,
    .esim-detail-value {
        font-size: 13px;
    }
    .esim-detail-label {
        font-size: 13px;
        min-width: 80px; /* Nhỏ hơn trên mobile */
        flex: 0 0 35%; /* Giảm xuống 35% trên mobile */
    }
    
    .esim-detail-value {
        font-size: 13px;
    }
}
/* Force center alignment for icons */
.esim-select-reset,
.esim-select-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.esim-select-reset {
    right: 28px !important;
}

.esim-select-arrow {
    right: 12px !important;
}

/* Active state for arrow */
.esim-custom-select.active .esim-select-arrow {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* Ensure reset icon shows properly */
.esim-custom-select.has-value .esim-select-reset {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Fix any line-height issues */
.esim-select-display {
    line-height: 1 !important;
}


/* Force reset icon visibility logic */
.esim-select-reset {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.esim-custom-select.has-value .esim-select-reset {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure proper state management */
.esim-custom-select:not(.has-value) .esim-select-reset {
    display: none !important;
}
.left-card {
    border-radius: 12px;
    overflow: visible; /* ← THÊM DÒNG NÀY */
}
/* Product selection loading states - IMPROVED */
.esim-product-item.selecting {
    opacity: 0.8;
    pointer-events: none;
    position: relative;
}

.esim-product-item.selecting::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: productSelectionSpin 0.8s linear infinite;
    z-index: 10;
}

@keyframes productSelectionSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Selected product - hidden during loading */
.esim-selected-product.loading {
    display: none !important;
}

/* Smooth reveal when ready */
.esim-selected-product.revealing {
    animation: smoothReveal 0.5s ease-out;
}

@keyframes smoothReveal {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Coupon selection states */
.esim-coupon-item.applicable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.esim-coupon-item.applicable.selected {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #1d4ed8;
}

.esim-coupon-item.applicable.selected .esim-discount-column {
    background: #1d4ed8;
}

/* Selected coupon indicator */
.esim-coupon-item.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
}

/* Price display with discount */
.price-amount.discounted {
    position: relative;
}

.price-amount .original-price-strike {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 22px;
    display: block;
    margin-bottom: 6px;
}

.price-amount .discounted-price {
    color: #1E3A8A;
    font-weight: 700;
}

.price-amount .savings-label {
    font-size: 22px;
    color: #10b981;
    margin-top: 6px;
    display: block;
}
/* Icon styling for detail labels */
.esim-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

.esim-detail-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #1E3A8A;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-detail-icon {
        width: 14px;
        height: 14px;
    }
    
    .esim-detail-label {
        gap: 6px;
    }
}
/* Action Buttons - Updated 3 columns layout với quantity */
.esim-action-buttons {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

/* Cart icon only button */
.esim-add-to-cart.esim-cart-icon-only {
    width: 48px;
    height: 48px;
    padding: 12px;
    justify-content: center;
}

.esim-add-to-cart.esim-cart-icon-only span {
    display: none;
}

/* Quantity wrapper trong action buttons */
.esim-action-buttons .esim-quantity-wrapper {
    width: auto;
    min-width: 100px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-action-buttons {
        grid-template-columns: 40% 1fr auto;
        gap: 8px;
    }
    
    .esim-add-to-cart.esim-cart-icon-only {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    
    .esim-action-buttons .esim-quantity-wrapper {
        min-width: 100px;
    }
}


/* Complete Loading Strategy Styles */
.esim-product-item.selecting {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.esim-product-item.selecting::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: completeLoadingSpin 0.8s linear infinite;
    z-index: 10;
}

@keyframes completeLoadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Simple connection - không dùng animations phức tạp */
.esim-product-item.selected {
    margin-bottom: 0 !important;
    position: relative;
    z-index: 2;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .esim-selected-product {
        /* Reduce complexity on mobile */
        will-change: opacity, transform;
        transform: translateZ(0); /* Force GPU layer */
    }
    
    /* Simpler shadows on mobile */
    .esim-product-item.selected {
        box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
    }

}
/* ===== NEW DESIGN: Label inside selector ===== */

/* Remove old label styles */
.esim-selector-item {
    display: block;
    width: 100%;
}

/* Custom select display with label inside */
.esim-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    height: 48px;
    transition: all 0.2s ease;
    user-select: none;
    gap: 12px;
}

/* Label wrapper bên trái */
.esim-select-label-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Icon trong label */
.esim-select-label-wrapper .esim-label-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.esim-select-label-wrapper .esim-label-icon svg {
    width: 100%;
    height: 100%;
    fill: #1E3A8A;
    transition: all 0.3s ease;
}

/* Text label */
.esim-select-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

/* Value bên phải */
.esim-select-value {
    font-size: 14px;
    color: #1E3A8A;
    font-weight: 600;
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

/* Arrow */
.esim-select-arrow {
    transition: transform 0.2s ease;
    color: #6b7280;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Hover states */
.esim-select-display:hover:not(.disabled) {
    border-color: #007cba;
}

.esim-custom-select.active .esim-select-display {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.esim-custom-select.active .esim-select-arrow {
    transform: rotate(180deg);
}

/* Disabled state */
.esim-custom-select.disabled .esim-select-display {
    background: #f9fafb;
    cursor: not-allowed;
}

.esim-custom-select.disabled .esim-select-value {
    color: #9ca3af;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-select-label {
        font-size: 0px;
    }
    .esim-select-label::before {
        content: attr(data-mobile-text);
        font-size: 13px;
        font-weight: 600;
        color: #374151;
    }
    .esim-select-value {
        font-size: 13px;
    }
    
    .esim-select-label-wrapper .esim-label-icon {
        width: 18px;
        height: 18px;
    }
}
/* ===== QUICK SELECT DAYS BUTTONS ===== */

.esim-quick-days-wrapper {
    margin-top: 12px;
}

.esim-quick-days-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.esim-quick-days-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.esim-quick-day-btn {
    padding: 8px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}
/* Phone filter button với icon */
.esim-phone-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.esim-phone-filter-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Active state - icon màu trắng khi active */
.esim-phone-filter-btn.active svg {
    stroke: #ffffff;
}
.esim-quick-day-btn:hover {
    border-color: #3c82f6;
    background: #f0f9ff;
    color: #1E3A8A;
}

.esim-quick-day-btn.active {
    border-color: #3c82f6;
    background: #3c82f6;
    color: #fff;
}

.esim-quick-day-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .esim-quick-days-label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .esim-quick-day-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    .esim-phone-filter-btn svg {
        width: 12px;
        height: 12px;
    }
}
/* Quick days wrapper - có thể ẩn khi không có buttons */
.esim-quick-days-wrapper {
    margin-top: 12px;
    transition: opacity 0.3s ease;
}

.esim-quick-days-wrapper:empty,
.esim-quick-days-wrapper[style*="display: none"] {
    margin: 0;
    height: 0;
    overflow: hidden;
}
/* Badge BÁN CHẠY */
.esim-buy-button.best-seller-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.esim-buy-button.best-seller-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Tiêu đề "Nổi bật" */
#esim-selection-title {
    display: none;
    font-size: 18px;
    font-weight: 700;
    color: #FF6B35;
    margin-bottom: 8px;
}
/* Best Seller Badge */
.esim-product-badge.best-seller-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    z-index: 2;
}

.esim-product-item.best-seller {
    position: relative;
}
/* ===== BỘ LỌC SẢN PHẨM ===== */
.esim-filter-wrapper {
    margin: 15px 0;
    position: relative;
}

.esim-filter-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
}

.esim-filter-btn,
.esim-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.esim-filter-btn:hover {
    background: #f5f5f5;
    border-color: #2C84E2;
}

.esim-filter-clear {
    background: #fee;
    border-color: #fcc;
    color: #d63638;
}

.esim-filter-clear:hover {
    background: #fdd;
}

/* Filter Panel - Desktop */
.esim-filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 360px;
    max-width: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.esim-filter-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.esim-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.esim-filter-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.esim-filter-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    display: none; /* Ẩn trên desktop */
}

.esim-filter-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.esim-filter-group {
    margin-bottom: 20px;
}

.esim-filter-group:last-child {
    margin-bottom: 0;
}

.esim-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.esim-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esim-filter-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.esim-filter-option:hover {
    border-color: #2C84E2;
    background: #f0f7ff;
}

.esim-filter-option.active {
    background: #2C84E2;
    color: white;
    border-color: #2C84E2;
}

.esim-filter-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.esim-filter-apply {
    width: 100%;
    padding: 12px;
    background: #2C84E2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.esim-filter-apply:hover {
    background: #1a6ec9;
}

/* Backdrop - ẩn trên desktop */
.esim-filter-backdrop {
    display: none;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .esim-filter-panel {
        position: fixed;
        top: 0;
        left: -10px;
        right: 20%;
        bottom: 0;
        width: 80%;
        max-width: 80%;
        margin: 0;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        opacity: 1;
        visibility: visible;
        z-index: 9999;
    }
    
    .esim-filter-panel.active {
        transform: translateX(0);
    }
    
    .esim-filter-close {
        display: block; /* Hiện nút đóng trên mobile */
    }
    
    .esim-filter-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .esim-filter-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    
    .esim-filter-content {
        max-height: calc(100vh - 140px);
    }
}
/* Chi tiết button in product card */
.esim-view-details {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(165deg, #0EA5E9 0%, #1E3A8A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.esim-view-details:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.esim-view-details-btn svg {
    width: 14px;
    height: 14px;
}
/* ============================================
   MODAL - 1 COLUMN LAYOUT + STICKY BOTTOM BAR
   ============================================ */

/* Modal Body - Single Column */
.esim-modal-body {
    display: block;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Main Content - Full Width, Scrollable */
.modal-main-content {
    width: 100%;
    overflow-y: auto;
    max-height: calc(80vh - 60px); /* Trừ đi chiều cao header */
    padding: 0px 30px;
    padding-bottom: 140px; /* Space for sticky bar */
}

/* Category Header */
.modal-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-top: 16px;
}

.modal-category-thumb {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
}

.modal-category-thumb-placeholder {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
}

.modal-category-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Product Header */
.modal-product-header {
    margin-bottom: 20px;
}

.modal-product-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* Detail Section */
.modal-detail-section {
    margin-bottom: 30px;
}

.modal-detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 16px 18px;
    align-items: start;
    border-radius: 12px;
    background: #fff;
}

.modal-detail-label {
    font-weight: 500;
    color: #555;
    text-align: left;
}

.modal-detail-value {
    color: #333;
    text-align: right;
    font-weight: 600;
}

/* Notice Box */
.modal-notice-box {
    background: #FFF3CD;
    border: 1px solid #FFE69C;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.modal-notice-box h4 {
    color: #E07C24;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-notice-content {
    color: #664D03;
    font-size: 14px;
    line-height: 1.6;
}

.modal-notice-content p {
    margin-bottom: 10px;
}

/* Info Buttons */
.modal-info-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-info-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.modal-info-button.primary {
    background: #F97316;
    color: white;
}

.modal-info-button.primary:hover {
    background: #EA580C;
}

.modal-info-button.secondary {
    background: #E5E7EB;
    color: #374151;
}

.modal-info-button.secondary:hover {
    background: #D1D5DB;
}

/* =====================================
   STICKY BOTTOM BAR
   ===================================== */

.modal-sticky-bottom {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
    padding: 16px 30px;
}

.modal-sticky-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 100%;
}

/* Quantity Controls in Sticky Bar */
.modal-sticky-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-sticky-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.modal-quantity-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #38BDF8;
    height: 40px;
}

.modal-quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #0EA5E9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-quantity-btn:hover:not(:disabled) {
    background: #F3F4F6;
}

.modal-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-quantity-input {
    width: 50px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
}

/* Action Buttons in Sticky Bar */
.modal-sticky-actions {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.modal-buy-now {
    flex: 1;
    max-width: 200px;
    background: #EA580C;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    height: 48px;
}

.modal-buy-now:hover:not(:disabled) {
    background: #DC2626;
}

.modal-add-to-cart {
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.modal-add-to-cart:hover:not(:disabled) {
    background: #1D4ED8;
}

.modal-buy-now:disabled,
.modal-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================
   RESPONSIVE - MOBILE
   ===================================== */


@media (max-width: 768px) {
    /* Modal content - Full screen */
    .esim-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        border-radius: 24px;
    }
    
    /* Modal header - nếu có */
    .esim-modal-header {
        flex-shrink: 0;
    }
    
    /* Modal body - Full height */
    .esim-modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: 100%;
        padding: 0;
    }
    
    /* Main content - Scrollable */
    .modal-main-content {
        flex: 1;
        height: 100%;
        overflow-y: auto;
        padding: 20px;
        padding-bottom: 100px; /* Space for sticky bar */
    }
    
    .modal-product-title {
        font-size: 20px;
    }
    
    .modal-notice-box {
        padding: 12px;
        margin: 24px 0;
    }
    
    .modal-info-buttons {
        flex-direction: column;
    }
    
    .modal-detail-item {
        gap: 5px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .modal-detail-label {
        min-width: auto;
        font-weight: 600;
    }
    
    /* Sticky Bar Mobile - COMPACT VERSION */
    .modal-sticky-bottom {
        flex-shrink: 0;
        padding: 10px 12px;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .modal-sticky-content {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .modal-sticky-quantity {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-start;
    }
    
    .modal-sticky-label {
        display: none; /* Ẩn text "Số lượng:" */
    }
    
    .modal-quantity-wrapper {
        height: 36px;
    }
    
    .modal-quantity-btn {
        width: 36px;
        height: 36px;
    }
    
    .modal-quantity-input {
        width: 40px;
        font-size: 13px;
    }
    
    .modal-sticky-actions {
        flex: 1;
        width: auto;
        gap: 6px;
    }
    
    .modal-buy-now {
        max-width: none;
        height: 42px;
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .modal-add-to-cart {
        width: 42px;
        height: 42px;
        padding: 8px;
    }
    
    .modal-add-to-cart svg {
        width: 18px;
        height: 18px;
    }
}
/* Ultra-smooth animation for selected product */
#esim-selected-product {
    display: none;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

#esim-selected-product.accordion-visible {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    padding: 5px;
}

/* Smooth buttons appearance */
.esim-action-buttons {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease 0.15s, 
                transform 0.3s ease 0.15s;
}

#esim-selected-product.accordion-visible .esim-action-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover effects */
.esim-action-button {
    transition: all 0.2s ease;
}

.esim-action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.esim-action-button:active:not(:disabled) {
    transform: translateY(0);
}
/* ============================================
   NEW 3-ROW PRODUCT CARD LAYOUT
   ============================================ */

.esim-product-row-1 {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
}

.esim-product-header {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.esim-category-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.esim-category-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* ✅ Tròn hoàn toàn */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}
.esim-product-header .esim-category-thumb {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}
.esim-category-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.esim-product-badges-inline {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.esim-badge-bestseller,
.esim-badge-premium {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.esim-badge-bestseller {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    line-height: 1;
}

.esim-badge-premium {
    background: linear-gradient(135deg, #ffd93d 0%, #f6c445 100%);
    color: #333;
    line-height: 1;
}

.esim-product-row-2 {
    padding: 8px 0;
}

.esim-product-specs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}
/* ROW 2.5: Phone Number Feature */
.esim-product-row-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.esim-product-row-phone svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.esim-product-row-phone .phone-text {
    font-size: 14px;
    font-weight: 500;
    color: #047857;
}
.spec-data {
    font-weight: 600;
    color: #08496d;
    font-size: 14px;
    padding: 5px 8px;
    background-color: #cbeef9;
    border-radius: 12px;
}

.spec-separator {
    color: #d1d5db;
}

.spec-days {
    font-weight: 500;
    font-size: 14px;
}

.esim-product-row-3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.esim-product-price {
    display: flex;
    align-items: center;
    gap: 2px;
}


.price-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-sale {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
}

.esim-view-details-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: linear-gradient(96deg, #40d9fecf 5.65%, #07b0fac4 94.35%);
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s 
ease;
}

.esim-view-details-inline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.esim-view-details-inline svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .esim-product-row-1 {
        flex-wrap: wrap;
        padding-bottom: 5px;
    }
    .esim-product-row-3 {
        padding-left: 32px;
    }
    .esim-product-row-2 {
        padding-left: 32px!important;
        line-height: 1;
        padding-bottom: 5px;
    }
    .esim-product-row-phone {
        padding-left: 32px;
    }
    .esim-product-badges-inline {
        order: 3;
        margin-left: 0;
    }
    #esim-selected-product.accordion-visible {
        padding: 0px 5px;
    }
}
/* ============================================
   SELECTED PRODUCT INSIDE CARD (OUTSIDE CONTENT)
   ============================================ */


/* Animation khi xuất hiện */

.esim-product-item > .esim-selected-product.accordion-hidden {
    display: none;
}


/* ===== FIXED ANIMATION - No opacity conflict ===== */
.esim-product-item > .esim-selected-product.accordion-visible {
    display: block;
    animation: instantSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes instantSlide {
    from {
        transform: translateY(4px); /* ← Chỉ transform, BỎ opacity */
    }
    to {
        transform: translateY(0);
    }
}

/* Mobile: Siêu nhanh */
@media (max-width: 768px) {
    .esim-product-item > .esim-selected-product.accordion-visible {
        animation-duration: 0.12s; /* 120ms */
    }
    
    /* GPU acceleration */
    .esim-selected-product {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}

/* Ensure smooth composite */
.esim-selected-product.accordion-visible {
    will-change: auto; /* Reset sau animation */
}

/* Mobile: CỰC NHANH */
@media (max-width: 768px) {
    .esim-product-item > .esim-selected-product.accordion-visible {
        animation-duration: 0.15s; /* ← Từ 0.25s xuống 0.15s = tức thì */
        animation-timing-function: ease-out;
    }
    
    /* GPU acceleration */
    .esim-selected-product {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Action buttons layout trong card */
.esim-product-item > .esim-selected-product .esim-action-buttons {
    display: grid;
    grid-template-columns: auto 1fr 25%;
    gap: 8px;
    align-items: center;
}

/* Quantity wrapper */
.esim-product-item > .esim-selected-product .esim-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons responsive trong card */
@media (max-width: 768px) {
    .esim-product-item > .esim-selected-product {
        padding: 0px 4px;
    }
    
    .esim-product-item > .esim-selected-product .esim-action-buttons {
        gap: 8px;
    }
    
    .esim-product-item > .esim-selected-product .esim-quantity-wrapper {
        justify-content: center;
    }
}
/* ============================================
   FIX: Grid không kéo dài card
   ============================================ */

/* Áp dụng cho container chứa các cards */
.esim-product-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    align-items: start; /* ← KEY: Card không kéo theo nhau */
}

/* Đảm bảo card có chiều cao tự nhiên */
.esim-product-item {
    height: auto;
    align-self: start;
    box-shadow: 2.985px 7.464px 11.942px 0px rgba(24, 24, 24, 0.04);
}
/* Product Price Section */

.price-current {
    font-size: 22px;
    font-weight: 800;
    color: #000000CC;
}

/* 🆕 THÊM CSS CHO GIÁ GỐC */
.price-original {
    font-size: 16px;           /* Nhỏ hơn price-current (22px → 16px) */
    font-weight: 400;          /* Nhẹ hơn */
    color: #9CA3AF;            /* Màu xám nhạt */
    text-decoration: line-through;  /* Gạch ngang */
    opacity: 0.8;              /* Mờ hơn một chút */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .price-current {
        font-size: 20px;
    }
    
    .price-original {
        font-size: 14px;  /* Nhỏ hơn trên mobile */
    }
}

/* Selected product vẫn nằm trong flow bình thường */
.esim-product-item > .esim-selected-product {
    width: 100%;
}

.esim-product-item > .esim-selected-product.accordion-visible {
    animation: fastSlide 0.18s ease-out;
}

@keyframes fastSlide {
    from { transform: translateY(5px); }
    to { transform: translateY(0); }
}

@media (max-width: 768px) {
    .esim-product-item > .esim-selected-product.accordion-visible {
        animation-duration: 0.14s;
    }
    .esim-selected-product {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}
/* Prevent flash during visibility change */
.esim-selected-product[style*="visibility: hidden"] {
    opacity: 0 !important;
}

.esim-selected-product[style*="visibility: visible"] {
    opacity: 1;
}
/* ===== MOBILE PERFORMANCE OPTIMIZATION ===== */
@media (max-width: 768px) {
    /* Reduce paint complexity */
    .esim-selected-product {
        contain: layout style;
        will-change: auto; /* Reset sau animation */
    }
    
    /* Simplify transitions */
    .esim-product-item.selected {
        transition: border-color 0.2s ease;
    }
    
    /* Remove expensive properties during animation */
    @keyframes slideDownOptimized {
        from {
            opacity: 0;
            transform: translateY(8px); /* Giảm từ 10px */
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
/* Modal Category Note - hiển thị dưới category name */
.modal-category-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FFF3E0;
    border-left: 3px solid #FF9800;
    margin: 12px 0 16px 0;
    border-radius: 4px;
}

.modal-note-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.modal-note-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-note-text {
    font-size: 14px;
    line-height: 1.6;
    color: #E65100;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-category-note {
        padding: 10px 12px;
        margin: 10px 0 12px 0;
    }
    
    .modal-note-text {
        font-size: 13px;
    }
}
/* Modal Call & SMS Info */
.modal-call-sms-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 12px 0 16px 0;
    border-radius: 4px;
}

/* Khi chỉ có data (không có call/sms) */
.modal-call-sms-info.data-only {
    background: #F3F4F6;
    border-left: 3px solid #9CA3AF;
}

.modal-call-sms-info.data-only .modal-service-text {
    color: #6B7280;
}

/* Khi có service (call hoặc sms) */
.modal-call-sms-info.has-service {
    background: #ECFDF5;
    border-left: 3px solid #10B981;
}

.modal-call-sms-info.has-service .modal-service-text {
    color: #047857;
}

.modal-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.modal-service-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-service-text {
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-call-sms-info {
        padding: 10px 12px;
        margin: 10px 0 12px 0;
    }
    
    .modal-service-text {
        font-size: 13px;
    }
}