/*
Theme Name: eSIM Simple
Theme URI: https://example.com/
Author: Your Name
Version: 3.0.0
Description: Minimal WooCommerce theme for selling eSIM plans. Full Customizer color scheme system with 3 presets (Aurora/Arctic/Jungle), per-section color controls, improved product card grid with list/grid toggle, and empty state design.
Text Domain: esim-simple
License: GPLv2 or later

Fonts
-----
This theme prefers Satoshi-Regular (self-host) or Aptos when available.
To use Satoshi, drop these files into /assets/fonts/ and keep names:
- Satoshi-Regular.woff2
- Satoshi-Bold.woff2

Changelog:
Version 2.0.2 (Current - CRITICAL FIX)
- FIXED: Add to Cart button not showing (added WooCommerce template override)
- FIXED: Improved WooCommerce theme support declaration
- FIXED: Added explicit visibility and display CSS for button
- ADDED: WooCommerce gallery features (zoom, lightbox, slider)
- ADDED: Debug helper for troubleshooting (add ?debug_woo to URL as admin)
- IMPROVED: More robust Add to Cart button styling
- IMPROVED: Better hook priority handling

Version 2.0.1
- FIXED: Add to Cart button now always visible on product pages
- FIXED: Duplicate "Where are you traveling?" section on store page
- IMPROVED: Better Add to Cart button styling in main stylesheet
- IMPROVED: Explicit WooCommerce hook to ensure button displays
- NEW: Auto Product Reviews plugin for building trust

Version 2.0.0
- NEW: Integration with eSIM FAQ Manager plugin
- NEW: Integration with eSIM Finder Content Manager plugin
- IMPROVED: Prominent Add to Cart button with animations
- IMPROVED: Large, bold product pricing (32px)
- IMPROVED: Highlighted product short descriptions
- IMPROVED: Product tags as interactive pills
- IMPROVED: Color-coded stock status badges
- IMPROVED: Better mobile responsiveness across all pages
- IMPROVED: Touch-optimized with 44px tap targets
- FIXED: Country dropdown updates immediately when region changes
- FIXED: Region/country filtering now uses proper taxonomies
- FIXED: All countries showing in dropdown
- FIXED: Products not displaying for selected region
- REMOVED: Related products from product pages
- REMOVED: Additional Information tab
- REMOVED: Product page sidebar clutter
- ENHANCED: Notice box with gradient styling
- ENHANCED: Overall UI/UX polish and professional appearance

Version 1.5.5
- Initial release
*/

/* Self-hosted Satoshi font — drop Satoshi-Regular.woff2 + Satoshi-Bold.woff2 into /assets/fonts/ */
@font-face{
  font-family:"Satoshi";
  src:url("assets/fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"Satoshi";
  src:url("assets/fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

:root{
  --max: 1160px;
  --pad: 18px;

  /* Base tokens – overridden in <head> by Customizer output */
  --bg: #ffffff;
  --surface: rgba(255,255,255,.9);
  --surface-2: rgba(255,255,255,.75);
  --ink: rgba(10,10,12,.92);
  --muted: rgba(10,10,12,.62);
  --accent: #111;

  --border: 1px solid rgba(10,10,12,.10);
  --ring: 0 0 0 4px rgba(0,0,0,.08);
  --radius: 18px;
  --radius-sm: 12px;

  --shadow: 0 10px 35px rgba(0,0,0,.08);
  --shadow-soft: 0 6px 20px rgba(0,0,0,.06);

  /* Per-section tokens set by Customizer */
  --header-bg:   rgba(255,255,255,.78);
  --header-text: rgba(10,10,12,.92);
  --header-blur: 12px;
  --footer-bg:   rgba(255,255,255,.72);
  --footer-text: rgba(10,10,12,.62);
  --footer-blur: 10px;
  --hero-bg:     rgba(255,255,255,.78);
  --hero-border: rgba(10,10,12,.10);
  --logo-bg:     linear-gradient(135deg, rgba(0,0,0,.92), rgba(0,0,0,.55));
  --seg-active:  linear-gradient(90deg, #ff2ea6, #ffb84d);
  --btn-bg:      linear-gradient(90deg, #ff2ea6 0%, #ff7a59 50%, #ffb84d 100%);
  --btn-shadow:  0 14px 30px rgba(255,46,166,.18), 0 10px 22px rgba(0,0,0,.10);
  --btn-color:   #fff;
  --btn-border:  none;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Satoshi-Regular, Satoshi, Aptos, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
  color: var(--ink);
  /* Background is set dynamically via inline <style> in wp_head (functions.php)
     so it responds to the Customizer color scheme and background image settings. */
}
a{ color: inherit; text-decoration: none; }
a:hover{ opacity: .9; }
img{ max-width:100%; height:auto; }

.container{ max-width: var(--max); margin: 0 auto; padding: var(--pad); }

.site-header{
  position: sticky; top:0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(var(--header-blur));
  -webkit-backdrop-filter: blur(var(--header-blur));
  border-bottom: 1px solid var(--header-border, rgba(0,0,0,.10));
  color: var(--header-text);
}
.header-inner{
  display:flex; justify-content:space-between; align-items:center;
  gap:16px; padding: 10px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight: 950;
  letter-spacing: -.2px;
}
.brand-mark{
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--logo-bg, linear-gradient(135deg, rgba(0,0,0,.92), rgba(0,0,0,.55)));
  box-shadow: var(--shadow-soft);
}
.nav ul{ list-style:none; padding:0; margin:0; display:flex; gap: 14px; align-items:center; flex-wrap:wrap; }
.nav a{ font-weight: 700; color: var(--header-text, rgba(0,0,0,.72)); opacity:.82; }
.nav a:hover{ opacity: 1; }

/* Cart menu item (injected via functions.php) */
.nav .menu-item-cart > a{
  display:flex;
  align-items:center;
  gap:8px;
}
.nav .menu-cart-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
}
.nav .menu-cart-count{
  display:inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: var(--border);
  background: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 800;
  align-items:center;
  justify-content:center;
}

/* Product breadcrumbs: hide on single product pages */
.single-product .woocommerce-breadcrumb{ display:none !important; }

/* WooCommerce "Added to cart" notice styling (toast-like, aligned with theme) */
.woocommerce-notices-wrapper{
  position: fixed;
  top: 78px;
  right: 18px;
  z-index: 9999;
  width: min(520px, calc(100vw - 36px));
}
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info{
  margin: 0 0 12px !important;
  padding: 14px 16px !important;
  border: var(--border) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft) !important;
  font-weight: 700;
}
.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-info a{
  font-weight: 900;
}

/* Checkout: waiver checkbox layout */
.esim-row-waiver{ margin: 14px 0 12px; }
.esim-row-waiver .woocommerce-form__label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-weight: 700;
  line-height: 1.35;
}
.esim-row-waiver input[type="checkbox"]{
  width: auto;
  margin-top: 3px;
}

.site-footer{
  margin-top: 52px;
  border-top: 1px solid var(--footer-border, rgba(0,0,0,.10));
  background: var(--footer-bg, rgba(255,255,255,.72));
  backdrop-filter: blur(var(--footer-blur, 10px));
  -webkit-backdrop-filter: blur(var(--footer-blur, 10px));
  color: var(--footer-text, rgba(10,10,12,.62));
}
.footer-inner{ padding: 22px 0; }
.footer-meta{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; justify-content:space-between; }

.card{
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card.slim{ padding: 14px; box-shadow: var(--shadow-soft); }
.notice{
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(250,250,252,.95));
  box-shadow: var(--shadow-soft);
}

.notice > div:first-child {
  font-size: 1.05rem;
}

.notice a {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.notice a:hover {
  opacity: 0.7;
}

.grid{ display:grid; gap: 16px; }
.grid-2{ grid-template-columns: 1fr; }
@media (min-width: 920px){
  .grid-2{ grid-template-columns: 1.15fr .85fr; }
}

h1,h2,h3{ line-height: 1.18; letter-spacing: -.35px; }
h1{ font-size: clamp(30px, 4vw, 46px); margin: 0 0 10px; }
h2{ font-size: clamp(22px, 3vw, 30px); margin: 0 0 10px; }
h3{ font-size: 18px; margin: 0 0 8px; }
p{ margin: 0 0 10px; }
.small{ font-size: .94rem; color: var(--muted); }
.kicker{ font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: rgba(0,0,0,.55); }
hr.sep{ border: none; border-top: 1px solid rgba(0,0,0,.10); margin: 16px 0; }

label{ display:block; font-weight: 800; margin: 10px 0 6px; color: rgba(0,0,0,.75); }
select,input,textarea{
  width: 100%;
  padding: 11px 12px;
  border: var(--border);
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255,255,255,.9);
}
button{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 15px;
}
select:focus,input:focus,textarea:focus{ outline:none; box-shadow: var(--ring); border-color: rgba(0,0,0,.18); }
button{
  cursor:pointer;
  font-weight: 950;
  background: var(--btn-bg);
  color: var(--btn-color, #fff);
  border: var(--btn-border, none);
  box-shadow: var(--btn-shadow);
}
button:hover{ transform: translateY(-1px); }
.btn-secondary{
  background: #fff;
  color: rgba(0,0,0,.86);
}

.hero{
  padding: 22px 0 6px;
}
.hero-wrap{
  border: 1px solid var(--hero-border, rgba(10,10,12,.10));
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(700px 280px at 12% 20%, rgba(0,0,0,.04), transparent 55%),
    radial-gradient(700px 280px at 88% 30%, rgba(0,0,0,.03), transparent 55%),
    var(--hero-bg, rgba(255,255,255,.78));
  box-shadow: var(--shadow);
}

.products{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 920px){
  .products{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.product-tile{
  border: var(--border);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-tile:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.product-tile img{ border-radius: 14px; }
.badges{ display:flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.badge{
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: var(--border);
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.72);
  font-weight: 800;
}


/* FAQ accordion */
.esim-accordion{
  border: var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin: 10px 0;
}
.esim-accordion summary{
  cursor: pointer;
  list-style: none;
  padding: 14px 14px;
  font-weight: 900;
  color: rgba(0,0,0,.82);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.esim-accordion summary::-webkit-details-marker{ display:none; }
.esim-accordion summary:after{
  content: "+";
  font-weight: 900;
  opacity: .65;
}
.esim-accordion[open] summary:after{
  content: "–";
}
.esim-accordion-body{
  padding: 0 14px 14px;
  color: var(--muted);
}
.esim-faq{ margin-top: 8px; }


/* Finder (Airalo-ish) */
.esim-finder-wrap{
  border-radius: 26px;
  padding: 18px;
  background:
    radial-gradient(900px 380px at 30% 10%, rgba(0,0,0,.07), transparent 55%),
    radial-gradient(900px 380px at 80% 10%, rgba(0,0,0,.05), transparent 55%),
    rgba(255,255,255,.78);
  border: var(--border);
  box-shadow: var(--shadow);
}

.esim-segment{
  display:flex;
  gap:0;
  border: var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}

.esim-segment button{
  width:auto;
  border: none;
  background: transparent;
  color: rgba(0,0,0,.70);
  font-weight: 950;
  padding: 12px 16px;
  border-radius: 0;
  box-shadow: none;
}
.esim-segment button:hover{ transform:none; opacity:1; color: rgba(0,0,0,.86); }
.esim-segment button.is-active{
  background: var(--seg-active, linear-gradient(90deg, #ff2ea6 0%, #ff7a59 55%, #ffb84d 100%));
  color:#fff;
}

.esim-search-row{
  display:flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
  flex-wrap: wrap;
}

.esim-input{
  flex: 1 1 420px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}

.esim-input input{
  border:none;
  padding:0;
  background: transparent;
  box-shadow:none;
  outline:none;
  font-weight: 700;
}
.esim-input input:focus{ box-shadow:none; }

.esim-primary-btn{
  flex: 0 0 auto;
  width:auto;
  padding: 12px 18px;
  border-radius: 18px;
}

.esim-filters{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
@media (min-width: 920px){
  .esim-filters{ grid-template-columns: 1fr 1fr 1fr; }
}

/* Make native selects look premium */
.esim-select{ position: relative; }
.esim-select select{
  appearance:none;
  -webkit-appearance:none;
  padding: 13px 42px 13px 14px;
  border-radius: 18px;
  border: var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}
.esim-select:after{
  content: "▾";
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 950;
  opacity: .55;
  pointer-events:none;
}

/* Popular destination tiles */
.esim-tiles{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 920px){
  .esim-tiles{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
.esim-tile{
  position: relative;
  border-radius: 18px;
  overflow:hidden;
  border: var(--border);
  box-shadow: var(--shadow-soft);
  min-height: 120px;
  background: linear-gradient(135deg, rgba(0,0,0,.12), rgba(0,0,0,.02));
}
.esim-tile span{
  position:absolute;
  left: 12px;
  bottom: 10px;
  font-weight: 950;
  color:#fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
}
.esim-tile::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(600px 160px at 20% 20%, rgba(255,255,255,.16), transparent 55%),
              linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.45));
}

/* Destination tiles backgrounds (placeholders) */
.esim-tile.is-italy{ background: url("assets/img/dest-italy.jpg") center/cover no-repeat; }
.esim-tile.is-japan{ background: url("assets/img/dest-japan.jpg") center/cover no-repeat; }
.esim-tile.is-usa{ background: url("assets/img/dest-usa.jpg") center/cover no-repeat; }
.esim-tile.is-thailand{ background: url("assets/img/dest-thailand.jpg") center/cover no-repeat; }

/* ======================================
   WooCommerce Product Page Customizations
   ====================================== */

/* Hide sidebar on product pages */
.single-product .sidebar,
.single-product #secondary,
.single-product .widget-area,
.woocommerce-page .sidebar,
.woocommerce-page #secondary {
  display: none !important;
}

/* Full width product content */
.single-product .content-area,
.single-product #primary,
.woocommerce-page .content-area,
.woocommerce-page #primary {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

/* Hide Additional Information tab */
.woocommerce-tabs .additional_information_tab,
#tab-additional_information {
  display: none !important;
}

/* Related Products - Better formatting */
.related.products {
  margin-top: 60px;
  padding-top: 40px;
  border-top: var(--border);
}

.related.products > h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  font-weight: 700;
}

.related.products ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related.products .product {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all 0.2s ease;
}

.related.products .product:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.related.products .product img {
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  width: 100%;
  height: auto;
}

.related.products .woocommerce-loop-product__title {
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.related.products .price {
  font-weight: 700;
  color: var(--accent);
}

/* Hide poorly formatted elements */
.single-product .widget_pages,
.single-product .widget_archive,
.single-product .widget_categories,
.single-product .widget_recent_entries,
.single-product .widget_meta {
  display: none !important;
}

/* Product summary improvements */
.woocommerce div.product div.summary {
  margin-bottom: 40px;
}

/* Add to Cart Button - Prominent Styling */
.woocommerce div.product form.cart {
  margin-top: 24px !important;
  margin-bottom: 24px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.woocommerce div.product form.cart .button,
.woocommerce div.product .single_add_to_cart_button,
.single_add_to_cart_button {
  background: var(--btn-bg) !important;
  color: var(--btn-color, #fff) !important;
  border: var(--btn-border, none) !important;
  box-shadow: var(--btn-shadow) !important;
  border-radius: 18px !important;
  padding: 16px 32px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: 100% !important;
  max-width: 100% !important;
  transition: all 0.2s ease !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: center !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  position: relative !important;
  z-index: 10 !important;
}

.woocommerce div.product form.cart .button:hover,
.woocommerce div.product .single_add_to_cart_button:hover,
.single_add_to_cart_button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
  opacity: 0.9 !important;
}

.woocommerce div.product form.cart .button:active,
.woocommerce div.product .single_add_to_cart_button:active,
.single_add_to_cart_button:active {
  transform: translateY(0) !important;
}

/* Quantity selector */
.woocommerce div.product form.cart .quantity {
  margin-bottom: 16px;
  display: block;
  width: 100%;
}

.woocommerce div.product form.cart .quantity input {
  width: 80px !important;
  text-align: center;
  font-size: 16px !important;
  font-weight: 600;
  padding: 12px !important;
}

/* Variations form */
.woocommerce div.product form.variations_form .variations {
  margin-bottom: 20px;
}

.woocommerce div.product form.variations_form .variations select {
  width: 100%;
  max-width: 100%;
}

/* Reset variations button */
.woocommerce div.product form.variations_form .reset_variations {
  margin-top: 10px;
  display: inline-block;
}

/* Prominent price styling */
.woocommerce div.product p.price {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin-bottom: 20px !important;
}

/* Product title */
.woocommerce div.product .product_title {
  font-size: 28px !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}

/* Short description */
.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

/* Clean product meta */
.product_meta {
  padding-top: 20px;
  margin-top: 20px;
  border-top: var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.product_meta > span {
  display: block;
  margin-bottom: 8px;
}

/* Product badges/tags */
.product_meta .tagged_as a,
.product_meta .posted_in a {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  font-size: 13px;
  text-decoration: none;
  margin: 4px 4px 4px 0;
  transition: all 0.2s ease;
}

.product_meta .tagged_as a:hover,
.product_meta .posted_in a:hover {
  background: var(--accent);
  color: white;
}

/* Stock status */
.stock {
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 16px;
}

.stock.in-stock {
  background: #d4edda;
  color: #155724;
}

.stock.out-of-stock {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .related.products ul.products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  
  .related.products {
    margin-top: 40px;
    padding-top: 30px;
  }
}

/* ======================================
   Mobile Design Improvements
   ====================================== */

@media (max-width: 768px) {
  /* Reduce padding on mobile */
  body {
    padding: var(--pad) 12px;
  }
  
  /* Finder adjustments */
  .esim-finder-wrap {
    padding: 14px;
    border-radius: 20px;
  }
  
  /* Make grid single column on mobile */
  .grid.grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  /* Segment buttons stack on mobile */
  .esim-segment {
    flex-direction: column;
    gap: 8px;
  }
  
  .esim-segment button {
    width: 100%;
    padding: 14px 16px;
  }
  
  /* Search row adjustments */
  .esim-search-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .esim-input,
  .esim-primary-btn {
    width: 100%;
  }
  
  /* Filters stack on mobile */
  .esim-filters {
    flex-direction: column;
    gap: 12px;
  }
  
  .esim-select {
    width: 100% !important;
  }
  
  /* Tiles grid adjustments */
  .esim-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .esim-tile {
    height: 100px;
    font-size: 0.9rem;
  }
  
  /* Product grid on mobile */
  .esim-products-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  
  /* Card adjustments */
  .card {
    padding: 14px;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 2rem;
    line-height: 1.1;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .kicker {
    font-size: 0.85rem;
  }
  
  /* WooCommerce product page mobile */
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    width: 100%;
    float: none;
    margin-bottom: 20px;
  }
  
  /* Product gallery mobile */
  .woocommerce-product-gallery {
    margin-bottom: 20px;
  }
  
  /* Add to cart button full width on mobile */
  .single_add_to_cart_button {
    width: 100%;
    padding: 16px !important;
  }
  
  /* Product tabs mobile */
  .woocommerce-tabs {
    margin-top: 30px;
  }
  
  .woocommerce-tabs ul.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .woocommerce-tabs ul.tabs li {
    flex: 1 1 auto;
    min-width: 120px;
  }
  
  /* Footer adjustments */
  footer {
    padding: 20px 12px;
  }
  
  footer nav {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Extra small mobile (below 480px) */
@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.35rem;
  }
  
  .esim-tiles {
    grid-template-columns: 1fr;
  }
  
  .esim-tile {
    height: 120px;
  }
  
  /* Single column tiles on very small screens */
  .esim-finder-wrap .grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Segment buttons smaller on tiny screens */
  .esim-segment button {
    font-size: 0.9rem;
    padding: 12px 14px;
  }
}

/* Tablet landscape (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid.grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .esim-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .esim-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  button,
  a,
  select,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better spacing for touch */
  .esim-segment button {
    padding: 16px 20px;
  }
  
  /* Larger select dropdowns */
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 12px;
  }
  
  /* Larger input fields */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 12px;
  }
}

/* =============================================
   PRODUCT CARDS — v3 improved grid
   ============================================= */

/* Results header bar */
.esim-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  gap: 12px;
}
.esim-results-label {
  font-weight: 800;
  font-size: .9rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* View toggle */
.esim-view-toggle {
  display: flex;
  gap: 4px;
  border: var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.esim-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.esim-view-btn.is-active {
  background: var(--accent);
  color: #fff;
}
.esim-view-btn:hover:not(.is-active) {
  background: rgba(0,0,0,.05);
  opacity: 1;
}

/* ---- Grid view ---- */
.esim-products-grid.esim-view-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .esim-products-grid.esim-view-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 920px) {
  .esim-products-grid.esim-view-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
}
@media (min-width: 1100px) {
  .esim-products-grid.esim-view-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
}

/* ---- List view ---- */
.esim-products-grid.esim-view-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Card shell ---- */
.esim-pcard {
  border: var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.esim-pcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Grid card inner layout */
.esim-pcard-inner {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
}
.esim-pcard-img {
  width: 100%;
  height: 100%;
}
.esim-pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.esim-pcard-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.esim-pcard-body {
  display: block;
  padding: 9px 10px 6px;
  flex: 1;
}
.esim-pcard-title {
  font-weight: 800;
  font-size: .82rem;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--ink);
  /* Truncate to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.esim-pcard-price {
  font-weight: 950;
  font-size: .9rem;
  color: var(--accent);
  margin: 3px 0 4px;
}
.esim-pcard-price .woocommerce-Price-amount { font-size: inherit; }
.esim-pcard-specs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.esim-spec-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: .03em;
}
.esim-spec-data { background: rgba(59,130,246,.12); color: #2563eb; }
.esim-spec-days { background: rgba(16,185,129,.12); color: #059669; }

.esim-pcard-cta {
  display: block;
  text-align: center;
  padding: 8px 10px;
  font-size: .78rem;
  font-weight: 900;
  color: var(--accent);
  border-top: var(--border);
  letter-spacing: .02em;
  transition: background .12s, color .12s;
}
.esim-pcard-cta:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

/* ---- List card ---- */
.esim-pcard--list { flex-direction: row; }
.esim-pcard-list-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.esim-pcard-list-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.esim-pcard-list-img img { width: 100%; height: 100%; object-fit: cover; }
.esim-pcard-list-body { flex: 1; min-width: 0; }
.esim-pcard-desc {
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.esim-pcard-list-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.esim-pcard-cta-sm {
  font-size: .75rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

/* ---- Filter footer row ---- */
.esim-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}
.esim-reset-link {
  font-weight: 900;
  color: var(--muted);
  font-size: .85rem;
}
.esim-reset-link:hover { color: var(--accent); opacity: 1; }
.esim-result-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---- Empty / no-results state ---- */
.esim-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 24px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  gap: 10px;
}
.esim-no-results-title {
  font-weight: 800;
  font-size: 1.1rem;
}
.esim-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 20px;
  background: var(--btn-bg);
  color: var(--btn-color, #fff);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: .9rem;
  box-shadow: var(--btn-shadow);
  transition: transform .15s, box-shadow .15s;
}
.esim-reset-btn:hover { transform: translateY(-1px); opacity: 1; }

/* =============================================
   Mobile tweaks for new cards
   ============================================= */
@media (max-width: 640px) {
  .esim-products-grid.esim-view-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .esim-pcard-title { font-size: .78rem; }
  .esim-pcard-price { font-size: .82rem; }
  .esim-pcard-cta { font-size: .72rem; padding: 7px; }
  .esim-pcard-body { padding: 7px 8px 5px; }
  .esim-pcard-list-img { width: 52px; height: 52px; }
  .esim-results-header { flex-direction: column; align-items: flex-start; }
}
