/* ===== Page layout ===== */
.page-main { padding: 40px 0 72px; min-height: 50vh; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.page-head p { color: #555; font-size: 15px; }
.page-grid { display: grid; gap: 24px; }
.page-two-col { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

/* ===== Forms ===== */
.form-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.form-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.form-grid { display: grid; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 48px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.field textarea { height: auto; min-height: 96px; padding: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, #ff6a5f, var(--red)); color: #fff;
  font-weight: 700; cursor: pointer; width: 100%;
}
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border: 1px solid #ddd; border-radius: 999px;
  background: #fff; color: #111; font-weight: 700; cursor: pointer;
}
.btn-link { background: none; border: 0; color: var(--red-2); font-weight: 700; cursor: pointer; }
.form-error {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: #fff0f0; color: #c62828; font-size: 14px;
}
.form-tip { margin-top: 16px; font-size: 14px; color: #666; text-align: center; }
.form-tip a { color: var(--red-2); font-weight: 700; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 16px 0; }
.captcha-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: end; }
.captcha-img { height: 48px; border-radius: 8px; border: 1px solid #eee; object-fit: contain; background: #f8f8f8; }

/* ===== Auth split layout ===== */
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 48px 0 72px;
}
.auth-hero h1 { font-size: 42px; font-weight: 900; margin-bottom: 12px; }
.auth-hero p { color: #555; line-height: 1.8; }

/* ===== Cards & lists ===== */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card, .car-card, .list-card {
  border: 1px solid #eee; border-radius: 14px; overflow: hidden; background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover, .car-card:hover, .list-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px);
}
.product-card img, .car-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; }
.product-card .body, .car-card .body, .list-card .body { padding: 14px; }
.product-card h3, .car-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.price { color: var(--red-2); font-weight: 800; font-size: 18px; }
.muted { color: #777; font-size: 13px; }

.side-nav { list-style: none; display: grid; gap: 4px; }
.side-nav a {
  display: block; padding: 12px 14px; border-radius: 10px; font-weight: 700; color: #333;
}
.side-nav a:hover, .side-nav a.active { background: #fff0f0; color: var(--red-2); }

.tabs-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.tabs-bar button {
  border: 1px solid #eee; background: #fff; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; cursor: pointer;
}
.tabs-bar button.active { background: var(--red); color: #fff; border-color: var(--red); }

.empty-state, .loading-state {
  text-align: center; padding: 48px 20px; color: #666; background: #fafafa; border-radius: 12px;
}

.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.detail-gallery img { width: 100%; border-radius: 16px; background: #f4f4f4; }
.detail-info h1 { font-size: 28px; font-weight: 900; margin-bottom: 12px; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.table-list { width: 100%; border-collapse: collapse; }
.table-list th, .table-list td {
  border-bottom: 1px solid #eee; padding: 14px 10px; text-align: left; font-size: 14px;
}
.table-list th { font-weight: 700; color: #333; background: #fafafa; }
.status-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: #f0f0f0; font-size: 12px; font-weight: 700;
}

.rich-content { line-height: 1.9; color: #333; }
.rich-content img { max-width: 100%; height: auto; margin: 12px 0; }

.pc-bank-card {
  max-width: 640px;
  margin: 40px auto;
}
.pc-bank-card h1 {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 12px;
}
.pc-bank-summary {
  color: #555;
  line-height: 1.8;
  margin: 0 0 24px;
}
.pc-bank-amount-label {
  font-size: 13px;
  color: #777;
  margin-bottom: 6px;
}
.pc-bank-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--red-2, #d45a34);
  margin-bottom: 12px;
}
.pc-bank-notice {
  font-size: 14px;
  line-height: 1.8;
  color: #5e5147;
  margin: 16px 0 28px;
}
.pc-bank-actions {
  display: grid;
  gap: 12px;
}
.pc-bank-actions .btn-secondary {
  width: 100%;
  text-decoration: none;
}

.pc-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.pc-fav-btn svg {
  width: 17px;
  height: 16px;
  flex-shrink: 0;
}
.pc-fav-btn.is-on svg path {
  fill: currentColor;
}
.pc-fav-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Confirm dialog — visual aligned with .uc-modal-card */
.pc-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.pc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.pc-modal-card {
  position: relative;
  z-index: 1;
  width: 550px;
  max-width: calc(100% - 32px);
  margin: 8vh auto 0;
  padding: 28px 40px 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 1px 2px 11px 1px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.pc-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pc-modal-close::before,
.pc-modal-close::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  width: 16px;
  height: 2px;
  background: #888;
}

.pc-modal-close::before {
  transform: rotate(45deg);
}

.pc-modal-close::after {
  transform: rotate(-45deg);
}

.pc-modal-card h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: #111;
  line-height: 1.4;
}

.pc-modal-card > p {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.7;
  color: #666;
}

.pc-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pc-modal-dismiss,
.pc-modal-confirm {
  width: 240px;
  max-width: calc(50% - 8px);
  height: 50px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.pc-modal-dismiss {
  background: #fff;
  border: 0;
  color: #aeaeae;
  box-shadow: 0 12px 0 0 rgba(0, 0, 0, 0.42);
}

.pc-modal-confirm {
  background: linear-gradient(-12deg, #ff413d, #f86864);
  border: 2px solid #fff;
  color: #fff;
  box-shadow: 6px 7px 0 0 rgba(0, 0, 0, 0.24);
}

.pc-modal-confirm:disabled,
.pc-modal-dismiss:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pc-modal-actions.is-single {
  justify-content: center;
}

.pc-modal-actions.is-single .pc-modal-confirm {
  width: 240px;
  max-width: 100%;
}

.pc-modal-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 28px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  background: #fafafa;
}

.pc-modal-input:focus {
  outline: none;
  border-color: #ff6a66;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 65, 61, 0.12);
}

/* Cart added success modal */
.pc-cart-added {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pc-cart-added-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.42);
  animation: pc-cart-added-fade 0.2s ease;
}

.pc-cart-added-card {
  position: relative;
  z-index: 1;
  width: 440px;
  max-width: calc(100% - 32px);
  padding: 36px 36px 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
  text-align: center;
  animation: pc-cart-added-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pc-cart-added-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pc-cart-added-close::before,
.pc-cart-added-close::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  width: 16px;
  height: 2px;
  background: #999;
}

.pc-cart-added-close::before {
  transform: rotate(45deg);
}

.pc-cart-added-close::after {
  transform: rotate(-45deg);
}

.pc-cart-added-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff6a66, #ff413d);
  box-shadow: 0 10px 24px rgba(255, 65, 61, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pc-cart-added-bounce 0.45s ease;
}

.pc-cart-added-icon svg {
  width: 34px;
  height: 34px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: pc-cart-added-check 0.45s 0.18s ease forwards;
}

.pc-cart-added-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #111;
  line-height: 1.4;
}

.pc-cart-added-card > p {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #777;
}

.pc-cart-added-product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin: 0 0 24px;
  border-radius: 12px;
  background: #f7f7f8;
  text-align: left;
}

.pc-cart-added-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
}

.pc-cart-added-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pc-cart-added-copy {
  min-width: 0;
  flex: 1;
}

.pc-cart-added-copy h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-cart-added-copy span {
  display: block;
  font-size: 13px;
  color: #888;
}

.pc-cart-added-actions {
  display: flex;
  gap: 12px;
}

.pc-cart-added-continue,
.pc-cart-added-cart {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.pc-cart-added-continue {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

.pc-cart-added-continue:hover {
  border-color: #bbb;
  color: #333;
}

.pc-cart-added-cart {
  background: linear-gradient(-12deg, #ff413d, #f86864);
  border: 2px solid #fff;
  color: #fff;
  box-shadow: 4px 5px 0 0 rgba(0, 0, 0, 0.18);
}

.pc-cart-added-cart:hover {
  filter: brightness(1.03);
}

@keyframes pc-cart-added-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pc-cart-added-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pc-cart-added-bounce {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes pc-cart-added-check {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .page-two-col, .auth-split, .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ===== Pretty select ===== */
.pretty-select {
  position: relative;
  width: 100%;
}

.pretty-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  background: none !important;
}

.pretty-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  color: #111;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.search-card .field .pretty-select-trigger,
.mall-search-card .field .pretty-select-trigger,
.home-search-fields .field .pretty-select-trigger,
.mall-search-fields .field .pretty-select-trigger {
  height: 44px;
}

.pretty-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pretty-select.is-placeholder .pretty-select-value {
  color: #9a9a9a;
}

.pretty-select-caret {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease, border-color .18s ease;
}

.pretty-select-trigger:hover {
  border-color: #b5b5b5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pretty-select.is-open .pretty-select-trigger,
.pretty-select-trigger:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 65, 61, 0.14);
}

.pretty-select.is-open .pretty-select-caret {
  border-color: var(--red);
  transform: rotate(225deg) translateY(-1px);
}

.pretty-select.is-disabled .pretty-select-trigger {
  background: #f4f4f4;
  color: #999;
  border-color: #e2e2e2;
  cursor: not-allowed;
  box-shadow: none;
}

.pretty-select-panel {
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.12);
  animation: prettySelectIn .16s ease;
}

.pretty-select.is-drop-up .pretty-select-panel {
  animation: prettySelectInUp .16s ease;
}

.pretty-select-panel[hidden] {
  display: none !important;
}

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

@keyframes prettySelectInUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pretty-select-search {
  padding: 10px 10px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.pretty-select-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
}

.pretty-select-search-input:focus {
  outline: none;
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 65, 61, 0.1);
}

.pretty-select-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow: auto;
  flex: 1;
}

.pretty-select-option {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #222;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.pretty-select-option span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pretty-select-option:hover,
.pretty-select-option.is-active {
  background: #fff5f4;
  color: #111;
}

.pretty-select-option.is-selected {
  background: linear-gradient(90deg, rgba(255, 106, 95, 0.12), rgba(255, 65, 61, 0.08));
  color: var(--red);
  font-weight: 700;
}

.pretty-select-option.is-disabled {
  color: #bbb;
  cursor: not-allowed;
}

.pretty-select-empty {
  padding: 18px 12px;
  color: #999;
  font-size: 13px;
  text-align: center;
}
