/* RoamNex eSIM Theme — product-page.css
 * Layout + styling for the single product. The plugin owns the plan selector,
 * add-to-cart, Buy Now, coverage chips, good-to-know and footer detail. This
 * file only positions and skins them. There is exactly ONE add-to-cart.
 * ------------------------------------------------------------------------- */

.rnx-wc{padding-block:24px 40px}
.rnx-wc__main{min-width:0}

/* Two-column product layout */
.rnx-product__grid{display:grid;grid-template-columns:1fr;gap:24px}
.rnx-product__media{min-width:0}
.rnx-product__media .woocommerce-product-gallery{margin:0}
.rnx-product__media img{border-radius:var(--rnx-r-lg)}
.rnx-product__buy{min-width:0}

/* WooCommerce's own default stylesheet (still enqueued — only its gallery
 * zoom/lightbox/slider CSS is actually wanted here) ships a classic
 * ".woocommerce div.product div.summary{float:right;width:48%}" layout rule.
 * At 4 class-selectors that beats the grid rules above on specificity alone,
 * regardless of source order, and floats the buy box out to the edge of its
 * grid cell instead of filling it. Neutralise float/width explicitly rather
 * than disabling WooCommerce's default styles wholesale, so gallery zoom/
 * lightbox/slider CSS is unaffected. */
.rnx-product .images,
.rnx-product .summary,
.rnx-product .entry-summary,
.rnx-product .woocommerce-product-gallery{
  float:none !important;
  width:auto !important;
}

/* Summary block (plugin content lives here) */
.rnx-product .summary,
.rnx-product .entry-summary{
  background:#fff;
  border:1px solid var(--rnx-border);
  border-radius:var(--rnx-r-xl);
  padding:22px;
  box-shadow:var(--rnx-shadow-2);
}
.rnx-product .product_title{font-size:clamp(22px,3.4vw,30px);margin-bottom:10px}
.rnx-product .price{color:var(--rnx-ink);font-size:24px;font-weight:800}
.rnx-product .price del{color:var(--rnx-muted);font-weight:600;font-size:18px}
.rnx-product .price ins{text-decoration:none;color:var(--rnx-primary-strong)}
.rnx-product .woocommerce-product-rating{margin-bottom:10px}

/* Variations / plan options table */
.rnx-product .variations{width:100%;margin-bottom:14px}
.rnx-product .variations td,
.rnx-product .variations th{padding:8px 0}
.rnx-product .variations label{font-weight:700}
.rnx-product select,
.rnx-product .variations select{
  width:100%;padding:12px 14px;border:1.5px solid var(--rnx-border-strong);
  border-radius:var(--rnx-r-sm);font-size:15px;background:#fff;font-family:inherit;
}
.rnx-product select:focus{outline:0;border-color:var(--rnx-primary);box-shadow:0 0 0 4px rgba(255,120,86,.12)}

/* Quantity */
.rnx-product .quantity .qty{
  width:72px;padding:12px;border:1.5px solid var(--rnx-border-strong);
  border-radius:var(--rnx-r-sm);text-align:center;font-weight:700;
}

/* The ONE add-to-cart + plugin Buy Now button */
.rnx-product .single_add_to_cart_button,
.rnx-product .button.alt,
.rnx-product .esimaccess-buy-now,
.rnx-product .buy-now-button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  width:100%;
  padding:15px 22px;
  border-radius:var(--rnx-r-sm);
  font-weight:800;font-size:16px;line-height:1;
  border:1.5px solid transparent;cursor:pointer;
  transition:transform .12s,box-shadow .2s,background .2s;
  margin-bottom:10px;
}
.rnx-product .single_add_to_cart_button,
.rnx-product .esimaccess-buy-now{
  background:var(--rnx-btn,var(--rnx-primary));color:#fff;
  box-shadow:0 8px 18px rgba(255,120,86,.28);
}
.rnx-product .single_add_to_cart_button:hover,
.rnx-product .esimaccess-buy-now:hover{transform:translateY(-1px);box-shadow:var(--rnx-shadow-hover)}
/* Buy Now as secondary if both present */
.rnx-product .buy-now-button,
.rnx-product form.cart + .esimaccess-buy-now{
  background:#fff;color:var(--rnx-ink);border-color:var(--rnx-border-strong);
}
.rnx-product .buy-now-button:hover{border-color:var(--rnx-primary);color:var(--rnx-primary-strong)}
.rnx-product form.cart{margin-bottom:6px}

/* Coverage chips (plugin) */
.esimaccess-coverage-index,
.esimaccess-coverage-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.esimaccess-coverage-chip,
.esimaccess-coverage-index a,
.esimaccess-coverage-index span[class*="chip"]{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:var(--rnx-r-pill);
  background:var(--rnx-surface);border:1px solid var(--rnx-border);
  font-size:13px;font-weight:600;color:#374151;
}

/* Good-to-know + footer detail (plugin) */
.esimaccess-good-to-know,
.esimaccess-product-detail-footer{margin-top:18px}
.esimaccess-product-detail-footer{
  background:#fff;border:1px solid var(--rnx-border);
  border-radius:var(--rnx-r-xl);padding:24px;margin-top:28px;
}
.esimaccess-product-detail-footer h2,
.esimaccess-product-detail-footer h3{font-family:var(--rnx-display)}

/* Tabs (WooCommerce default, if present) */
.rnx-product .woocommerce-tabs ul.tabs{border:0;padding:0;display:flex;gap:6px;flex-wrap:wrap}
.rnx-product .woocommerce-tabs ul.tabs li{background:var(--rnx-surface);border:1px solid var(--rnx-border);border-radius:var(--rnx-r-pill);margin:0}
.rnx-product .woocommerce-tabs ul.tabs li.active{background:var(--rnx-tint-50);border-color:var(--rnx-tint-100)}
.rnx-product .woocommerce-tabs ul.tabs li a{font-weight:700;color:var(--rnx-ink)}

/* Mobile sticky buy bar (theme adds it; links to the single add-to-cart) */
.rnx-buybar{
  position:fixed;left:0;right:0;bottom:0;z-index:calc(var(--rnx-z-header) + 1);
  display:none;align-items:center;gap:12px;
  background:#fff;border-top:1px solid var(--rnx-border);
  padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow:0 -6px 24px rgba(17,24,39,.1);
}
.rnx-buybar__price{font-weight:800;font-size:18px;white-space:nowrap}
.rnx-buybar__btn{flex:1;display:inline-flex;align-items:center;justify-content:center;padding:14px;border-radius:var(--rnx-r-sm);background:var(--rnx-btn,var(--rnx-primary));color:#fff;font-weight:800;border:0;cursor:pointer}

/* Product extra (theme fallback only, when plugin footer absent) */
.rnx-product-extra{display:grid;gap:26px;margin-top:30px}
.rnx-product-extra__block{background:#fff;border:1px solid var(--rnx-border);border-radius:var(--rnx-r-xl);padding:22px}

/* Desktop: two columns + sticky buy column + bottom bar hidden */
@media (min-width:861px){
  .rnx-product__grid{grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:32px;align-items:start}
  .rnx-product__buy{position:sticky;top:calc(var(--rnx-header-h) + 16px)}
}
@media (max-width:860px){
  .rnx-buybar.is-ready{display:flex}
  body.single-product{padding-bottom:72px}
}

/* The mobile drawer menu (Language/Currency links live near its bottom) must
 * never be covered by the sticky mobile buy bar on product pages. z-index
 * alone should already put the drawer on top (--rnx-z-drawer > --rnx-z-header),
 * but the buy bar is hidden outright while the drawer is open as a robust
 * belt-and-suspenders fix in case of any third-party stacking context. */
body.rnx-drawer-open .rnx-buybar{display:none !important}


/* v1.0.12: prevent plugin fixed eSIM quantity/footer from covering drawers or switcher panels. */
body.rnx-drawer-open .esimaccess-plan-footer,
body.rnx-modal-open .esimaccess-plan-footer,
body.rnx-modal-open .rnx-buybar,
body.rnx-drawer-open .rnx-bottomnav,
body.rnx-modal-open .rnx-bottomnav{
  display:none !important;
}

/* v1.0.18 — Product page visual refresh only.
 * Keep plugin plan logic, packageCode binding, quantity/day controls and bottom buy bar unchanged.
 * These rules only skin the existing plugin markup closer to the BNE-style reference.
 */
body.single-product.esimaccess-product-app-mode .rnx-product .summary,
body.single-product.esimaccess-product-app-mode .rnx-product .entry-summary{
  border-radius:28px!important;
  border:1px solid rgba(229,231,235,.82)!important;
  box-shadow:0 18px 48px rgba(17,24,39,.07)!important;
  background:linear-gradient(180deg,#fff 0%,#fffaf7 100%)!important;
}
body.single-product.esimaccess-product-app-mode .product_title{
  font-size:clamp(24px,6vw,34px)!important;
  line-height:1.16!important;
  letter-spacing:-.02em!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons-title{
  margin:18px 0 10px!important;
  font-size:clamp(18px,5vw,26px)!important;
  font-weight:950!important;
  color:#111827!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons--plan_type .esimaccess-variation-buttons-title{
  margin-top:14px!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons--plan_type .esimaccess-variation-buttons-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  padding:8px!important;
  border-radius:24px!important;
  background:#f5f6f9!important;
  border:0!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons--plan_type .esimaccess-variation-button{
  min-height:58px!important;
  border:0!important;
  border-radius:18px!important;
  background:transparent!important;
  color:#222936!important;
  font-size:clamp(17px,4.5vw,22px)!important;
  font-weight:900!important;
  box-shadow:none!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons--plan_type .esimaccess-variation-button.is-selected{
  color:#fff!important;
  background:linear-gradient(135deg,#ff967b 0%,#ff7654 65%,#ef5f3f 100%)!important;
  box-shadow:0 10px 24px rgba(255,118,84,.28)!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card{
  border-radius:24px!important;
  border:1.5px solid #e5e7eb!important;
  box-shadow:0 10px 26px rgba(17,24,39,.045)!important;
  background:#fff!important;
  overflow:hidden!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card.is-selected{
  border-color:#ff7654!important;
  background:#fff7f3!important;
  box-shadow:0 0 0 2px rgba(255,118,84,.12) inset,0 14px 34px rgba(255,118,84,.14)!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-main{
  min-height:82px!important;
  padding:18px 18px!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-radio{
  width:34px!important;height:34px!important;flex-basis:34px!important;
  border-width:3px!important;
  border-color:#d1d5db!important;
  background:#eef0f4!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card.is-selected > .esimaccess-plan-card-main .esimaccess-radio,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option.is-selected .esimaccess-radio{
  border-color:#ff7654!important;
  background:#ff7654!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text strong{
  font-size:clamp(21px,5.5vw,28px)!important;
  letter-spacing:-.02em!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text small,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text span{
  color:#6b7280!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-price strong,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-price .amount,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option strong,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option strong .amount{
  color:#ff7654!important;
  font-weight:950!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option{
  min-height:72px!important;
  padding:17px 18px!important;
  border-bottom:1px solid #edf0f4!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-footer{
  border-radius:28px!important;
  border:1px solid rgba(229,231,235,.86)!important;
  box-shadow:0 16px 42px rgba(17,24,39,.09)!important;
}
@media(max-width:768px){
  body.single-product.esimaccess-product-app-mode .rnx-product .summary,
  body.single-product.esimaccess-product-app-mode .rnx-product .entry-summary{
    padding:18px!important;
    border-radius:24px!important;
  }
}


/* v1.0.19: Softer BNE-like typography. Avoid heavy Heiti/black weights on mobile UI. */
:root{
  --rnx-font:-apple-system,BlinkMacSystemFont,"PingFang SC","PingFang TC","Noto Sans SC","Noto Sans TC","Microsoft YaHei","Microsoft JhengHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --rnx-display:-apple-system,BlinkMacSystemFont,"PingFang SC","PingFang TC","Noto Sans SC","Noto Sans TC","Microsoft YaHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
html,body,.rnx-site,.rnx-main,.rnx-header,.rnx-bottomnav,.esimaccess-destination-hub,
.woocommerce,.woocommerce-page{font-family:var(--rnx-font)!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
h1,h2,h3,h4,.rnx-pagehero__title,.rnx-shead__title,.rnx-destination-title,
.esimaccess-exact-destination-title,.esimaccess-destination-title{font-family:var(--rnx-display)!important;font-weight:700!important;letter-spacing:-.015em!important;}
.rnx-brand{font-weight:700!important;letter-spacing:-.015em!important;}
.rnx-menu li a,.rnx-drawer__menu li a,.rnx-drawer__item,.rnx-drawer__switch,.rnx-bottomnav__item{font-weight:500!important;}
.rnx-btn,.rnx-chip-btn,.rnx-opt,.button,.woocommerce a.button,.woocommerce button.button{font-weight:600!important;}
@media(max-width:768px){
  h1,.rnx-pagehero__title,.esimaccess-exact-destination-title,.esimaccess-destination-title{font-weight:700!important;}
  h2,h3,.rnx-shead__title{font-weight:650!important;}
}

/* v1.0.20: Product UI cleanup only; do not alter plugin variation/packageCode logic. */
body.single-product .rnx-bottomnav{display:none!important;}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-type-heading,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-title{
  display:none!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-type-tabs{margin-top:4px!important;margin-bottom:18px!important;}
body.single-product.esimaccess-product-app-mode .product_title,
body.single-product.esimaccess-product-app-mode .rnx-product h1,
body.single-product.esimaccess-product-app-mode .summary h1,
body.single-product.esimaccess-product-app-mode .entry-summary h1{
  font-weight:600!important;
  letter-spacing:-.01em!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-variation-buttons-title,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-type-tabs button,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text strong,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-price strong,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-price .amount,
body.single-product.esimaccess-product-app-mode .esimaccess-day-group h3,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option strong,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option strong .amount{
  font-weight:600!important;
}
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text small,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-card-text span,
body.single-product.esimaccess-product-app-mode .esimaccess-plan-option span{
  font-weight:400!important;
}
@media(max-width:768px){
  body.single-product{padding-bottom:150px!important;}
  body.single-product.esimaccess-product-app-mode .esimaccess-app-plan-selector{margin-bottom:150px!important;}
  body.single-product.esimaccess-product-app-mode .esimaccess-plan-footer{
    bottom:0!important;
    padding-bottom:calc(10px + env(safe-area-inset-bottom))!important;
    z-index:10020!important;
  }
}
