.logo img {
  max-width: 130px;
  max-height: 55px;
  object-fit: contain;
}
.detail-search {
  display: flex;
  padding-bottom: 18px;
  gap: 10px;
}
.detail-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 12px;
}
.product-main {
  padding-top: 23px !important;
  padding-bottom: 40px;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 23px;
  line-height: 1.7;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
  gap: 24px;
}
.product-left {
  min-width: 0;
}
.gallery {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 18px;
}
.gallery-stage {
  height: 450px;
  background: #102224;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.gallery-stage > img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.gallery-arrow {
  position: absolute;
  top: 45%;
  font-size: 37px;
  color: white;
  background: #0f172a77;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  line-height: 1;
}
.gallery-arrow.prev {
  left: 16px;
}
.gallery-arrow.next {
  right: 16px;
}
.photo-count {
  position: absolute;
  bottom: 16px;
  left: 20px;
  background: #0f172a88;
  color: #fff;
  padding: 6px 13px;
  font-size: 13px;
  border-radius: 20px;
}
.gallery-expand {
  position: absolute;
  bottom: 14px;
  right: 15px;
  color: white;
  background: #0f172a88;
  font-size: 22px;
  border-radius: 5px;
  padding: 4px 9px;
}
.thumbnails {
  display: flex;
  gap: 9px;
  padding: 12px;
  overflow: auto;
  background: #f7f9f8;
}
.thumbnails button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  flex-shrink: 0;
}
.thumbnails button.active {
  border-color: var(--ink);
}
.thumbnails img {
  width: 72px;
  height: 57px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}
.product-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 25px;
  margin-bottom: 18px;
  background: #fff;
}
.product-panel h2 {
  font-size: 21px;
  margin: 0 0 20px;
}
.product-panel h3 {
  font-size: 17px;
  margin: 0 0 13px;
}
.product-panel > p {
  font-size: 14px;
  line-height: 1.85;
  color: #35575b;
}
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-line > strong {
  font-size: 34px;
  letter-spacing: -1px;
}
.price-line button {
  font-size: 29px;
  padding: 4px 9px;
}
.price-panel-detail h1 {
  font-size: 23px;
  line-height: 1.5;
  font-weight: 500;
  margin: 14px 0 19px;
  letter-spacing: -0.4px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.badge-tag {
  display: inline-block;
  background: var(--yellow);
  font-size: 10px;
  padding: 5px 8px;
  font-weight: 800;
  border-radius: 3px;
  margin-top: 13px;
}
.attribute-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  gap: 0 25px;
}
.attribute-grid > div {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f0;
  gap: 15px;
  font-size: 13px;
}
.attribute-grid dt {
  color: var(--muted);
}
.attribute-grid dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}
.seller-profile {
  text-align: center;
  padding-top: 28px;
}
.seller-avatar {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #e1f2ed;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 13px;
}
.seller-profile > p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
}
.seller-profile h2 {
  margin: 6px 0;
  font-size: 23px;
}
.seller-profile > a:not(.full) {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 17px 0 24px;
}
.seller-profile .full {
  display: flex;
}
.outline {
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  font-size: 13px;
  font-weight: 700;
}
.safety-panel {
  background: #f7faf9;
}
.safety-panel ul {
  padding-left: 17px;
  font-size: 12px;
  color: #547175;
  line-height: 1.9;
}
.safety-panel li {
  padding-bottom: 7px;
}
.seller-promo {
  background: #fff8df;
}
.seller-promo p {
  font-size: 12px;
}
.location-illustration {
  background: #eaf2eb;
  padding: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 20px;
  background-image:
    linear-gradient(28deg, transparent 43%, #fff9 44%, #fff9 48%, transparent 49%),
    linear-gradient(115deg, transparent 36%, #fff9 37%, #fff9 42%, transparent 43%);
}
.location-illustration > span {
  font-size: 40px;
}
.location-illustration b {
  font-size: 15px;
}
.location-illustration p {
  font-size: 10px;
  color: var(--muted);
}
.product-location > a {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 15px;
}
.ad-reference {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0 20px;
  color: var(--muted);
}
.ad-reference button {
  text-decoration: underline;
}
.related-section {
  padding-top: 30px;
}
.related-section .section-heading > a {
  font-size: 12px;
  font-weight: 700;
}
.simple-footer {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
  font-size: 12px;
}
.simple-footer nav {
  display: flex;
  gap: 25px;
}
.simple-footer small {
  margin: 0;
  width: 100%;
}
#photoDialog {
  width: 1000px;
  background: #102224;
  padding: 15px;
}
#largePhoto {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: auto;
}
.form-page {
  max-width: 850px;
  padding-top: 35px !important;
  padding-bottom: 50px;
}
#postListingForm,
#postAd,
.listing-form,
.sell-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.form-page h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
}
.sell-section {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 18px 0;
}
.sell-section h2 {
  font-size: 20px;
  margin: 0 0 20px;
}
.sell-section > p,
.form-page > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.attribute-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.photo-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
/* Photo upload grid: 1 cover + up to 7 more */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin: 4px 0 12px;
}
.photo-slot {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
  overflow: hidden;
  padding: 0;
}
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-slot.add-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1.5px dashed #b9c6c6;
  background: #fbfdfd;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.photo-slot.add-slot:hover {
  border-color: var(--teal, #00a59c);
  background: #f2faf9;
}
.ps-icon {
  font-size: 22px;
  line-height: 1;
  color: #7d8f8e;
}
.ps-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #667a79;
  line-height: 1.35;
}
.ps-label small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: #9aa9a8;
  font-weight: 400;
}
.ps-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(0, 166, 156, 0.92);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
}
.ps-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
}
/* Keyword chips */
.keyword-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #cddada;
  border-radius: 6px;
  background: #fff;
}
.keyword-box:focus-within {
  border-color: #00a59c;
  outline: 1px solid #00a59c33;
}
.kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef7f6;
  border: 1px solid #bfe2de;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.kw-chip button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #b9d9d5;
  color: #0f3530;
  font-size: 11px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.kw-chip button:hover {
  background: #a4cdc8;
}
#kwInput {
  border: 0 !important;
  outline: none !important;
  flex: 1;
  min-width: 160px;
  padding: 4px 2px;
  margin: 0;
  background: transparent;
}
.kw-count {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 6px;
}
.auth-card {
  max-width: 450px;
  margin: 50px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.auth-card h1 {
  font-size: 28px;
}
.auth-card > p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.notice:not(:empty) {
  background: #fff5d5;
  padding: 15px;
  font-size: 13px;
  margin: 15px 0;
  border-radius: 5px;
  line-height: 1.7;
}
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.package-card {
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 7px;
  position: relative;
  background: #fff;
}
.package-card h3 {
  font-size: 18px;
}
.package-card strong {
  font-size: 26px;
  display: block;
  margin: 18px 0;
}
.package-card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.package-card .badge-tag {
  margin: 0;
}
.category-icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.order-status {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.order-status small {
  text-align: left;
}
.branding-form .form-row {
  flex-wrap: wrap;
}
.branding-form .form-row label {
  min-width: 140px;
}
.audit-row {
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-section-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.admin-section-intro p {
  font-size: 12px;
  color: var(--muted);
}
.category-row img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}
.seller-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 30px 0;
}
.seller-heading .seller-avatar {
  margin: 0;
}
.seller-heading h1 {
  font-size: 29px;
  margin: 0 0 9px;
}
.seller-heading p {
  font-size: 12px;
  color: var(--muted);
}
.profile-stats {
  display: flex;
  gap: 20px;
  font-size: 12px;
  margin-top: 12px;
}
.category-grid {
  grid-template-columns: repeat(8, 1fr);
}
@media (max-width: 900px) {
  .gallery-stage {
    height: 350px;
  }
  .product-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr);
    gap: 16px;
  }
  .product-panel {
    padding: 19px;
  }
  .attribute-grid {
    grid-template-columns: 1fr;
  }
  .price-line > strong {
    font-size: 28px;
  }
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .product-layout {
    display: flex;
    flex-direction: column;
  }
  .gallery-stage {
    height: 320px;
  }
  .product-main {
    padding-top: 17px !important;
  }
  .breadcrumbs {
    font-size: 10px;
    margin-bottom: 15px;
  }
  .price-line > strong {
    font-size: 27px;
  }
  .price-panel-detail h1 {
    font-size: 20px;
  }
  .product-panel h2 {
    font-size: 19px;
  }
  .product-meta {
    font-size: 10px;
  }
  .product-right {
    display: grid;
    grid-template-columns: 1fr;
  }
  .seller-profile {
    text-align: left;
  }
  .seller-avatar {
    margin-left: 0;
  }
  .seller-profile > a:not(.full) {
    margin-top: 13px;
  }
  .related-section {
    padding-top: 18px;
  }
  .product-panel {
    padding: 20px;
  }
  .attribute-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
  }
  .attribute-grid > div {
    font-size: 11px;
  }
  .simple-footer {
    gap: 20px;
    padding: 25px 15px;
  }
  .simple-footer nav {
    gap: 17px;
    font-size: 11px;
  }
  .form-page {
    padding-top: 25px !important;
  }
  .sell-section {
    padding: 18px;
  }
  .form-page .form-row {
    flex-direction: column;
    gap: 0;
  }
  .attribute-inputs {
    grid-template-columns: 1fr;
  }
  .package-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    margin: 25px 16px;
    padding: 25px;
  }
  .seller-heading h1 {
    font-size: 24px;
  }
  .seller-heading {
    gap: 15px;
  }
  .topbar > a:not(.logo) {
    font-size: 10px;
  }
  .product-main .topbar {
    gap: 12px;
  }
}

/* --- City manual typing & suggestion dropdown --- */
.city-input-wrap {
  position: relative !important;
  display: block;
}
.city-type-input {
  display: block;
  width: 100%;
  border: 1px solid var(--border-subtle, #cddada);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg-input, #fff);
  color: var(--text-main, #0f172a);
  box-sizing: border-box;
}
.city-type-input:focus {
  border-color: var(--teal, #0d9488);
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}
.city-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}
[data-theme="dark"] .city-suggestions {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.city-suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease, color 0.15s ease;
}
[data-theme="dark"] .city-suggestion-item {
  color: #f8fafc;
  border-bottom-color: #334155;
}
.city-suggestion-item:last-child {
  border-bottom: none;
}
.city-suggestion-item:hover,
.city-suggestion-item.active {
  background: #f0fdf4;
  color: #0d9488;
}
[data-theme="dark"] .city-suggestion-item:hover,
[data-theme="dark"] .city-suggestion-item.active {
  background: #0f172a;
  color: #2dd4bf;
}
.city-suggestion-item b {
  font-weight: 600;
}
.city-suggestion-item small {
  font-size: 11px;
  color: #64748b;
  margin-left: 8px;
}
[data-theme="dark"] .city-suggestion-item small {
  color: #94a3b8;
}
