/* ===== CGOO buy layout (esimcard-style) v1.0.0 ===== */

/* Flag always sits right next to the country name. */
.cgoo-cat-head {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: .5rem;
}

/* Two-column below banner+name: guide left, plans right */
.cgoo-buy {
  display: grid;
  grid-template-columns: 38fr 62fr;
  gap: 2rem;
  align-items: start;
  margin: 0 0 2.5rem;
}

/* Layout A: hide the theme's term title + description (replaced by side panel). */
body.cgoo-layout-a .wp-block-query-title,
body.cgoo-layout-a .wp-block-term-description {
  display: none !important;
}

/* Left image panel with country name + flag overlaid (esimcard style). */
.cgoo-side {
  border-radius: 16px;
  overflow: hidden;
  height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0f766e;
  display: flex;
  align-items: flex-end;
  position: sticky;
  top: 1rem;
}
.cgoo-side-overlay {
  width: 100%;
  padding: 3.5rem 1.5rem 1.4rem;
  background: linear-gradient(to top, rgba(2, 32, 28, .72), rgba(2, 32, 28, 0));
}
.cgoo-side-top {
  position: absolute;
  top: 1.4rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.cgoo-side-plane { margin-right: .35rem; }
.cgoo-side-overlay { background: linear-gradient(to top, rgba(2, 32, 28, .78), rgba(2, 32, 28, .25) 55%, rgba(2, 32, 28, 0)); }
.cgoo-side-name {
  display: flex;
  align-items: center;
  gap: .9rem;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  margin-bottom: .8rem;
}
.cgoo-side-badge {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.cgoo-side-desc {
  color: rgba(255,255,255,.92);
  font-size: .98rem;
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

/* Left guide column (moved .cgoo-cat-info) */
.cgoo-guide-col {
  background: #f8fafc;
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
}
.cgoo-guide-col h3 { font-size: 1.02rem; margin: 1.15rem 0 .45rem; }
.cgoo-guide-col h3:first-child { margin-top: 0; }
.cgoo-guide-col ul { margin: 0 0 1rem 1.25rem; padding: 0; }
.cgoo-guide-col li { margin-bottom: .35rem; }
.cgoo-guide-col p { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.65; }

/* Right plans column */
.cgoo-plans-col { min-width: 0; }
.cgoo-buy-heading { font-size: 1.35rem; font-weight: 800; margin: 0 0 1rem; }

/* Tabs + filter row */
.cgoo-buy-tools {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.cgoo-tabs {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
}
.cgoo-tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: .6rem 1.3rem;
  font-size: .95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.cgoo-tab.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 0 0 1.5px #14B8A6, 0 2px 8px rgba(0,0,0,.08);
}
.cgoo-tool-btn {
  border: 1.5px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-size: .92rem;
  font-weight: 600;
  color: #0f766e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.cgoo-tool-btn:hover { border-color: #14B8A6; }
.cgoo-buy-tools .cgoo-tool-spacer { flex: 1; }

/* Plan grid + cards */
ul.cgoo-plan-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
ul.cgoo-plan-grid > li.cgoo-plan {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  position: relative;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.2rem 1.2rem 1.1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
ul.cgoo-plan-grid > li.cgoo-plan:hover { border-color: #99f6e4; }
ul.cgoo-plan-grid > li.cgoo-plan.selected {
  border-color: #14B8A6;
  box-shadow: 0 0 0 1px #14B8A6;
}
.cgoo-plan-radio {
  position: absolute;
  top: 1.05rem;
  right: 1.05rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  flex: none;
}
li.cgoo-plan.selected .cgoo-plan-radio {
  border-color: #14B8A6;
  background: #14B8A6;
  box-shadow: inset 0 0 0 4px #fff;
}
.cgoo-plan-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  padding: .15rem .6rem;
  margin-bottom: .45rem;
}
.cgoo-plan-name {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.45;
  padding-right: 2rem;
  margin-bottom: .3rem;
}
.cgoo-plan-meta { font-size: .85rem; color: #64748b; margin-bottom: .2rem; }
.cgoo-plan-price { font-size: 1.3rem; font-weight: 800; color: #0f766e; }
.cgoo-plan-add {
  display: inline-block;
  margin-top: .8rem;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  background: #14B8A6;
  color: #fff !important;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
}
.cgoo-plan-add:hover { background: #0f766e; color: #fff !important; }
li.cgoo-plan.hidden-by-filter { display: none; }
.cgoo-no-result {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  padding: 2rem 1rem;
  border: 1.5px dashed #e5e7eb;
  border-radius: 16px;
}

/* Sticky buy bar */
.cgoo-buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -6px 24px rgba(0,0,0,.08);
  padding: .8rem 1.25rem;
}
.cgoo-buybar.show { display: flex; }
.cgoo-buybar-info { flex: 1; min-width: 0; }
.cgoo-buybar-name {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cgoo-buybar-price { color: #0f766e; font-weight: 800; }
.cgoo-buybar-btn {
  padding: .7rem 2rem;
  border-radius: 999px;
  background: #14B8A6;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}
.cgoo-buybar-btn:hover { background: #0f766e; }
body.cgoo-has-buybar { padding-bottom: 76px; }

/* Modal (filter / device) */
.cgoo-modal-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, .45);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.cgoo-modal-back.open { display: flex; }
.cgoo-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 1.4rem 1.4rem 1.8rem;
}
@media (min-width: 700px) {
  .cgoo-modal-back { align-items: center; padding: 1rem; }
  .cgoo-modal { border-radius: 20px; }
}
.cgoo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cgoo-modal-head h3 { font-size: 1.25rem; margin: 0; font-weight: 800; }
.cgoo-modal-x {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #14B8A6;
  background: #fff;
  color: #0f766e;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.cgoo-filter-group { margin-bottom: 1.2rem; }
.cgoo-filter-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #64748b;
  margin-bottom: .6rem;
}
.cgoo-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.cgoo-chip {
  border: 0;
  background: #f1f5f9;
  border-radius: 999px;
  padding: .6rem 1.3rem;
  font-size: .95rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}
.cgoo-chip.active { background: #14B8A6; color: #fff; }
.cgoo-reset {
  width: 100%;
  border: 0;
  background: #f1f5f9;
  border-radius: 999px;
  padding: .8rem;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  margin-top: .4rem;
}
.cgoo-reset:hover { background: #e2e8f0; }
.cgoo-device-row { display: flex; gap: .6rem; margin-bottom: 1rem; }
.cgoo-device-row select {
  flex: 1;
  padding: .7rem .8rem;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  font-size: .95rem;
  background: #fff;
}
.cgoo-device-result {
  border-radius: 14px;
  padding: 1rem 1.2rem;
  font-size: .95rem;
  line-height: 1.6;
  display: none;
}
.cgoo-device-result.ok { display: block; background: #ecfdf5; border: 1px solid #a7f3d0; }
.cgoo-device-result.no { display: block; background: #fef2f2; border: 1px solid #fecaca; }
.cgoo-device-result.maybe { display: block; background: #fffbeb; border: 1px solid #fde68a; }

/* Mobile */
@media (max-width: 900px) {
  .cgoo-buy { grid-template-columns: 1fr; gap: 1.25rem; }
  .cgoo-guide-col { display: none; }
  .cgoo-side { height: 200px; position: relative; top: 0; }
  .cgoo-side-name { font-size: 1.6rem; }
  .cgoo-side-badge { width: 48px; height: 48px; font-size: 1.5rem; }
  .cgoo-side-name { font-size: 1.6rem; }
  ul.cgoo-plan-grid { grid-template-columns: 1fr; }
  .cgoo-buybar { padding: .7rem .9rem; }
  .cgoo-buybar-btn { padding: .65rem 1.4rem; }
}

/* CGOO: widen storefront content (owner: layout felt too concentrated). */
.wp-site-blocks .alignwide {
  max-width: min(1760px, 96vw) !important;
}

.cgoo-plan-days {
  width: 100%;
  margin: .55rem 0 .6rem;
  padding: .5rem .6rem;
  border: 1.5px solid #d7e3e0;
  border-radius: 10px;
  background: #f4f8f7;
  font-size: .95rem;
  font-weight: 600;
  color: #134e4a;
  cursor: pointer;
}

/* CGOO: store pages are storefronts, not articles — let page content breathe. */
body.page .wp-block-post-content.is-layout-constrained > :not(.alignfull) {
  max-width: min(1760px, 96vw) !important;
}
/* Full-bleed bands (e.g. the homepage hero) must never be capped or they
   sit off-center with a white strip on one side. */
.wp-site-blocks .alignfull {
  max-width: none !important;
}
