/* =========================================================
   bowrex — GLOBAL SYSTEM (single source of truth)
   File: pb-global.css
   ========================================================= */

/* 0) Design tokens */
:root{
  --bg:#050814;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.10);
  --border:rgba(255,255,255,.12);
  --text:rgba(255,255,255,.88);
  --muted:rgba(255,255,255,.62);
  --accent:#ffd24a;
  --link:#8cc8ff;

  --max:1000px;
  --gutter:16px;

  --r-sm:12px;
  --r-md:18px;
  --r-lg:22px;

  --shadow:0 12px 24px rgba(0,0,0,.28);
}

/* 1) Base + horizontal overflow safety (GLOBAL) */
*{ box-sizing:border-box; }

html, body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  background:var(--bg);
}

body{
  color:var(--text);
  margin:0;
}

/* 100vw inline styles often cause mobile horizontal scroll */
*[style*="100vw"]{
  width:100% !important;
  max-width:100% !important;
}

/* 2) Media safety */
img, svg, video, iframe{
  max-width:100%;
  height:auto;
  display:block;
}
iframe{ border:0; }

/* 3) Text overflow safety */
h1,h2,h3,h4,h5,h6,p,li,a,td,th,code{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* 4) Flex/Grid overflow safety */
.pb-row, .pb-grid, .pb-card, .pb-wrap,
.elementor-section, .elementor-container, .elementor-column, .elementor-widget-wrap{
  min-width:0;
}

button, input, select, textarea{
  max-width:100%;
}

/* 5) Links */
a{ color:var(--link); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* 6) Universal container */
.pb-wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:16px var(--gutter) 72px;
}

/* Custom template wrappers */
.p-wrap,
.home-wrap,
.how-wrap,
.u-wrap,
.fs-wrap,
.ab-wrap,
.m-wrap{
  max-width:var(--max);
  margin:0 auto;
  padding-left:var(--gutter);
  padding-right:var(--gutter);
  overflow-x:hidden;
}

/* Theme spacing tweak */
.site-main{ margin-top:0; }

/* 7) Card system */
.pb-card{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:var(--r-md);
  box-shadow:var(--shadow);
  padding:20px;
}
.pb-card-tight{ padding:14px; }

.pb-card, .pb-stage{ overflow:hidden; }

/* 8) Grid system */
.pb-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}
@media (min-width: 900px){
  .pb-grid{ grid-template-columns:1fr 1fr; }
}

/* 9) Image stage */
.pb-stage{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--r-lg);
  padding:14px;
}

/* 10) Rounding utilities */
.pb-rounded-sm{ border-radius:var(--r-sm); }
.pb-rounded-md{ border-radius:var(--r-md); }
.pb-rounded-lg{ border-radius:var(--r-lg); }

/* Global image rounding */
img{ border-radius:var(--r-lg); }
figure, picture{
  border-radius:var(--r-lg);
  overflow:hidden;
}

/* 11) Divider */
.pb-hr{
  height:1px;
  background:var(--border);
  margin:22px 0;
}

/* 12) Woo common */
.woocommerce a.button,
.woocommerce button,
.woocommerce input.button{
  border-radius:12px;
}

/* Footer safety */
footer{ max-width:100%; overflow-x:hidden; }


/* =========================================================
   HivePress — Modal input text invisible (login/register)
   ========================================================= */

.hp-modal,
.hp-modal *{
  -webkit-text-fill-color: unset;
}

.hp-modal input[type="text"],
.hp-modal input[type="email"],
.hp-modal input[type="password"],
.hp-modal input[type="tel"],
.hp-modal textarea,
.hp-modal select{
  color:#111 !important;
  background:#fff !important;
  border:1px solid rgba(0,0,0,.25) !important;
}

.hp-modal input::placeholder,
.hp-modal textarea::placeholder{
  color:rgba(0,0,0,.55) !important;
  opacity:1 !important;
}

.hp-modal label,
.hp-modal .hp-field__label,
.hp-modal .hp-form__label,
.hp-modal .hp-form__description,
.hp-modal .hp-form__message,
.hp-modal .hp-link{
  color:#111 !important;
}

.hp-modal .hp-button,
.hp-modal button,
.hp-modal input[type="submit"]{
  color:#111 !important;
}

.hp-modal .hp-field input,
.hp-modal .hp-field textarea,
.hp-modal .hp-field select{
  color:#111 !important;
}

/* =========================================================
   (Optional minimal safety)
   Some Windows/Chrome cases apply white text to <option>.
   We only fix the option list itself — not the closed select UI.
   ========================================================= */
.hp-form select option,
.hp-form select optgroup,
.hp-page select option,
.hp-page select optgroup{
  color:#111 !important;
  background:#fff !important;
}
/* =========================================
   HARD FIX — Force native select readable
   ========================================= */

/* closed select */
.hp-form select{
  background:#ffffff !important;
  color:#111111 !important;
  -webkit-text-fill-color:#111111 !important;
  text-shadow:none !important;
}

/* dropdown options (Windows/Chrome fix) */
.hp-form select option{
  background:#ffffff !important;
  color:#111111 !important;
}

/* make sure disabled / selected aren't transparent */
.hp-form select option:checked,
.hp-form select option:selected{
  background:#ffffff !important;
  color:#111111 !important;
}
/* =========================================================
   HARD FIX v2 — Select2 text always visible (HivePress)
   ========================================================= */

/* Select2 전체(컨테이너 내부 모든 텍스트) 강제 */
.select2-container,
.select2-container *{
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  text-shadow:none !important;
}

/* 닫힌 상태(선택된 값 표시 영역) */
.select2-container--default .select2-selection--single{
  background:#fff !important;
  border:1px solid rgba(0,0,0,.25) !important;
  border-radius:12px !important;
  min-height:44px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  line-height:44px !important;
}

/* 펼쳐진 드롭다운 */
.select2-dropdown,
.select2-results,
.select2-results__options{
  background:#fff !important;
  color:#111 !important;
}

/* 옵션 항목 */
.select2-container--default .select2-results__option{
  background:#fff !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
}

/* hover/선택 강조 */
.select2-container--default .select2-results__option--highlighted[aria-selected]{
  background:rgba(0,0,0,.08) !important;
  color:#111 !important;
}
.select2-container--default .select2-results__option[aria-selected="true"]{
  background:rgba(0,0,0,.06) !important;
  color:#111 !important;
}
/* =========================================================
   HivePress Listing Filter sidebar button text invisible FIX
   Target: /motors/ filter widget submit button
   ========================================================= */

.hp-widget--listing-filter .hp-form__button[type="submit"],
.hp-widget--listing-filter button.hp-form__button[type="submit"]{
  background: rgba(214,51,108,.95) !important;   /* 버튼 배경 */
  border-color: rgba(214,51,108,1) !important;
  color:#fff !important;                          /* 글자색 */
  -webkit-text-fill-color:#fff !important;        /* 크롬 텍스트 채움 */
  text-shadow:none !important;
}

/* hover */
.hp-widget--listing-filter .hp-form__button[type="submit"]:hover{
  background: rgba(255,79,139,.98) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}
/* ================================================
   bowrex — Hide HivePress Filter Button only
   ================================================ */

/* Filter submit button */
.hp-widget--listing-filter .hp-form__footer,
.hp-widget--listing-filter .hp-form__button,
.hp-page__sidebar .hp-form__footer{
  display:none !important;
}

/* =========================================================
   bowrex — Motors listings: Desktop 4 columns (HivePress)
   Targets: .hp-grid__item.hp-col-sm-6 (50%) -> 25%
========================================================= */
@media (min-width: 1024px){

  /* 4 columns */
  .hp-listings.hp-block.hp-grid > .hp-row{
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .hp-listings.hp-block.hp-grid > .hp-row > .hp-grid__item.hp-col-sm-6{
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}
/* bowrex Motors — PC only: remove left sidebar & center listings */
@media (min-width: 1024px) {

  .hp-page__sidebar {
    display: none !important;
  }

  .hp-page__content {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

}
/* ================================================
   bowrex — Fix invisible text in HivePress modals
   (global body text color inheritance -> white on white)
   ================================================ */

/* 1) 모달 내부 기본 글자색을 강제로 어둡게 */
.hp-modal,
.hp-modal *{
  color:#111 !important;
}

/* 2) HivePress 메시지(에러/성공/알림) 텍스트 확실히 보이게 */
.hp-modal .hp-message,
.hp-modal .hp-message__text,
.hp-modal .hp-notice,
.hp-modal .hp-notice__text{
  color:#111 !important;
}

/* 3) placeholder도 흐려서 안 보일 수 있으니 고정 */
.hp-modal input::placeholder,
.hp-modal textarea::placeholder{
  color:#666 !important;
  opacity:1 !important;
}

/* 4) (중요) Select2 드롭다운/선택값 글자도 같이 고정 */
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-results__option{
  color:#111 !important;
}
