:root {
  color-scheme: light;
  --ink: #111111;
  --charcoal: #242424;
  --dark: #171717;
  --muted: #696969;
  --line: #dedede;
  --soft: #f5f5f3;
  --paper: #ffffff;
  --yellow: #f5c400;
  --yellow-strong: #d9aa00;
  --warning: #b66a00;
  --danger: #9f2d20;
  --success: #207a3a;
  --shadow: 0 18px 48px rgba(17, 17, 17, 0.16);
  --radius: 8px;
}

/* Sales, customer reviews, and store settings */
.sale-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 1;
  border-radius: 2px;
  background: #d9342b;
  color: white;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 900;
}

.market-price del {
  color: var(--muted);
  font-size: 11px;
}

.product-card-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: #a87800;
  font-size: 11px;
  font-weight: 800;
}

.product-card-rating small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-price-grid del,
.detail-price-grid em {
  display: inline-block;
  margin: 6px 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-price-grid em {
  color: #b42318;
  font-style: normal;
  font-weight: 900;
}

.product-reviews-section {
  border-top: 1px solid var(--line);
  padding: 20px 22px 22px;
}

.product-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.product-review-list,
.product-review-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.customer-review,
.product-review-form,
.review-admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 14px;
}

.customer-review > div,
.review-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-review span,
.review-admin-head span {
  color: #b18400;
}

.customer-review p,
.review-admin-card p {
  margin: 9px 0;
  line-height: 1.55;
}

.customer-review small,
.review-admin-card small,
.review-form-status {
  color: var(--muted);
}

.product-review-form label {
  display: grid;
  gap: 6px;
}

.product-review-form input,
.product-review-form select,
.product-review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.review-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.review-admin-head em {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eee;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.review-admin-head em.approved {
  background: #dcfce7;
  color: var(--success);
}

.review-admin-head em.pending {
  background: #fff5cc;
  color: #7a5700;
}

.review-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-settings-form {
  max-width: 900px;
}

@media (max-width: 980px) {
  .product-review-layout {
    grid-template-columns: 1fr;
  }
}

/* House plans and project estimator */
.page-header.house-plans-header {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.96), rgba(10, 10, 10, 0.62)),
    url("./assets/house-bungalow-60sqm-perspective.png") center 52%/cover;
}

.page-header.house-plans-header p {
  color: #eeeeea;
}

.page-header.construction-cost-header {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.96), rgba(10, 10, 10, 0.58)),
    url("./assets/hardware-hero.png") center/cover;
}

.page-header.construction-cost-header p {
  color: #eeeeea;
}

.construction-calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.construction-calculator-controls {
  display: grid;
  gap: 18px;
}

.control-label,
.construction-calculator-controls label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sqm-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  max-width: 360px;
}

.sqm-input input {
  min-height: 52px;
  border-radius: 4px 0 0 4px;
  font-size: 24px;
  font-weight: 900;
}

.sqm-input strong {
  display: grid;
  place-items: center;
  border-radius: 0 4px 4px 0;
  background: var(--ink);
  color: white;
}

.construction-finish-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.construction-finish-options button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f7f5;
  padding: 10px;
  text-align: left;
}

.construction-finish-options button.active {
  border-color: var(--ink);
  background: var(--yellow);
}

.construction-finish-options span {
  font-size: 11px;
  font-weight: 800;
}

.construction-finish-options small {
  color: var(--muted);
  font-size: 10px;
}

.construction-cost-result {
  display: grid;
  align-content: center;
  gap: 8px;
  border-left: 5px solid var(--yellow);
  background: #fff9df;
  padding: 22px;
}

.construction-cost-result p,
.construction-cost-result span,
.construction-cost-result small {
  margin: 0;
  color: var(--muted);
}

.construction-cost-result strong {
  font-size: 30px;
  line-height: 1.15;
}

.construction-cost-result .calculator-design-name {
  width: fit-content;
  border-radius: 3px;
  background: var(--ink);
  padding: 5px 8px;
  color: white;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.construction-cost-result small {
  line-height: 1.5;
}

.construction-cost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.construction-cost-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.construction-cost-guide article {
  border-top: 4px solid var(--yellow);
  background: white;
  padding: 14px;
}

.construction-cost-guide article.active {
  outline: 2px solid var(--ink);
  background: #fffbed;
}

.construction-cost-guide article header {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.construction-cost-guide article header span {
  color: #8a6a00;
  font-size: 11px;
  font-weight: 900;
}

.construction-cost-guide article h3 {
  margin: 12px 0 5px;
  font-size: 11px;
  text-transform: uppercase;
}

.construction-cost-guide article ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.construction-cost-guide p,
.construction-cost-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.construction-cost-note {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 18px;
}

.construction-cost-note h2 {
  margin: 0;
  font-size: 18px;
}

.house-plan-category-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.house-plan-category-strip button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
}

.house-plan-category-strip button.active {
  border-color: var(--yellow);
  background: var(--yellow);
}

.house-plan-category-strip button:disabled {
  color: #8a8a8a;
  cursor: default;
}

.house-design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.house-design-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: white;
}

.house-design-card.selected,
.house-design-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 205, 0, 0.18);
}

.house-design-card-open {
  display: grid;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.house-design-card-open > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eeeeeb;
}

.house-design-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.house-design-card-body strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.house-design-card-body > span:last-child,
.house-design-card-category {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.house-design-card-category {
  color: #8a6a00;
  font-weight: 900;
  text-transform: uppercase;
}

.house-design-empty {
  grid-column: 1 / -1;
}

.house-plan-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.house-plan-gallery {
  min-width: 0;
}

.house-plan-main-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eee;
}

.house-plan-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 150px));
  gap: 8px;
  margin-top: 10px;
}

.house-plan-thumbs button {
  display: block;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #f2f2ef;
  padding: 5px;
}

.house-plan-thumbs button.active {
  border-color: var(--yellow);
}

.house-plan-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.house-plan-info h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.house-plan-info > p:not(.eyebrow, .house-disclaimer) {
  color: var(--muted);
  line-height: 1.6;
}

.design-professional-credit {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--yellow);
  background: #fafafa;
  padding: 11px;
}

.design-professional-credit > svg {
  color: #8a6a00;
}

.design-professional-credit > div {
  display: grid;
  gap: 2px;
}

.design-professional-credit span,
.design-professional-credit small {
  color: var(--muted);
  font-size: 11px;
}

.design-professional-credit span {
  font-weight: 900;
  text-transform: uppercase;
}

.house-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.house-spec-grid.house-spec-single {
  grid-template-columns: minmax(0, 320px);
}

.house-spec-grid div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.house-spec-grid span {
  color: var(--muted);
  font-size: 12px;
}

.house-disclaimer {
  color: #6d5a18;
  font-size: 11px;
  line-height: 1.5;
}

.house-price-preview {
  display: grid;
  gap: 8px;
  border-left: 4px solid var(--yellow);
  background: #fff9df;
  padding: 13px;
}

.finish-level-picker {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px !important;
}

.finish-level-picker button {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #d8c675;
  border-radius: 4px;
  background: white;
  padding: 8px;
  text-align: left;
}

.finish-level-picker button.active {
  border-color: var(--ink);
  background: var(--yellow);
}

.finish-level-picker button span {
  font-size: 10px;
}

.selected-finish-summary {
  display: grid !important;
  gap: 5px !important;
  border-top: 1px solid #dfcc7a;
  padding-top: 10px;
}

.selected-finish-summary strong {
  font-size: 20px;
}

.selected-finish-summary small,
.house-cost-explainer p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.house-cost-explainer {
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 12px;
}

.house-cost-explainer p {
  margin: 5px 0 0;
}

.finish-rate-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  padding: 12px;
}

.finish-rate-editor > strong {
  grid-column: 1 / -1;
}

.house-price-preview div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.house-price-preview span {
  color: var(--muted);
  font-size: 12px;
}

.house-price-preview .house-budget-total {
  border-top: 1px solid #dfcc7a;
  padding-top: 8px;
}

.house-price-preview .house-budget-total strong {
  font-size: 17px;
}

.house-image-upload small,
.upload-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.house-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.house-request-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.house-request-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.house-request-heading h2 {
  margin: 2px 0 6px;
}

.house-request-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.house-request-form {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.attachment-note {
  width: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.project-document-panel {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  background: #fffdf3;
  padding: 14px;
}

.project-document-upload,
.project-document-ready {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.project-document-upload input {
  min-width: 220px;
  flex: 1;
}

.project-document-ready {
  border-left: 4px solid #26a269;
  background: white;
  padding: 10px;
}

.project-document-ready > div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 180px;
}

.project-document-ready span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .construction-calculator {
    grid-template-columns: 1fr;
  }

  .construction-cost-actions {
    grid-column: auto;
  }

  .construction-cost-guide {
    grid-template-columns: 1fr 1fr;
  }

  .house-design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-plan-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .construction-finish-options,
  .construction-cost-guide {
    grid-template-columns: 1fr 1fr;
  }

  .construction-calculator {
    padding: 12px;
  }

  .construction-cost-result strong {
    font-size: 23px;
  }

  .finish-level-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-design-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .house-design-card-body {
    padding: 9px;
  }

  .house-plan-detail,
  .house-request-panel {
    padding: 12px;
  }

  .house-spec-grid {
    grid-template-columns: 1fr;
  }

  .house-plan-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eeeeeb;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.store-welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: #050505;
  color: white;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-pending body {
  background: #050505;
}

.welcome-pending body > :not(.store-welcome-screen) {
  visibility: hidden;
}

.welcome-pending .store-welcome-screen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.store-welcome-screen.show {
  visibility: visible;
  animation: welcome-screen-exit 5.5s ease both;
}

.store-welcome-screen img {
  position: relative;
  z-index: 1;
  width: min(340px, 74vw);
  border-radius: 22%;
  opacity: 0;
  transform: scale(.84);
  animation: welcome-logo-enter 2.2s cubic-bezier(.2,.8,.2,1) .18s both;
}

.store-welcome-screen p,
.store-welcome-screen > span {
  position: relative;
  z-index: 1;
  margin: 0;
  opacity: 0;
  text-align: center;
  animation: welcome-copy-enter .9s ease 1.35s both;
}

.store-welcome-screen p {
  color: #efc54a;
  font-size: clamp(10px, 2.5vw, 13px);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.store-welcome-screen > span {
  color: #d7d7d0;
  font-size: 11px;
}

.store-welcome-glow {
  position: absolute;
  width: min(480px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,159,27,.2), transparent 68%);
  animation: welcome-glow 3.8s ease both;
}

@keyframes welcome-logo-enter {
  0% { opacity: 0; transform: scale(.84); filter: blur(8px); }
  65% { opacity: 1; transform: scale(1.03); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes welcome-copy-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-glow {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes welcome-screen-exit {
  0%, 84% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .store-welcome-screen.show {
    animation-duration: .7s;
  }

  .store-welcome-screen img,
  .store-welcome-screen p,
  .store-welcome-screen > span,
  .store-welcome-glow {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Cart quantity and verified Sarangani location fields */
.product-card-quantity {
  display: grid;
  grid-template-columns: auto minmax(58px, 76px);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  margin: 2px 0 9px;
}

.product-card-quantity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-card-quantity input {
  width: 100%;
  height: 34px;
  border: 1px solid #bdbdb8;
  border-radius: 3px;
  background: #fff;
  padding: 0 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.product-card-quantity input:focus {
  border-color: var(--yellow-strong);
  outline: 2px solid rgba(255, 199, 0, 0.24);
  outline-offset: 1px;
}

.location-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
  padding: 14px;
}

.location-picker legend {
  padding: 0 7px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 900;
}

.location-picker label {
  min-width: 0;
}

.location-picker label:last-of-type {
  grid-column: 1 / -1;
}

.location-picker select,
.location-picker input {
  width: 100%;
}

.location-picker > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .location-picker {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .location-picker > small {
    grid-column: 1;
  }

  .location-picker label:last-of-type {
    grid-column: 1;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 38px;
  padding: 7px 16px;
  background: var(--dark);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.announcement-bar a,
.footer-grid a,
.footer-grid span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.announcement-bar a {
  color: var(--yellow);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 38px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand-mark {
  display: block;
  width: 58px;
  height: 48px;
  flex: 0 0 58px;
  overflow: hidden;
  border: 1px solid #3f3300;
  border-radius: var(--radius);
  background: #050505;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text strong,
.brand-text small {
  display: block;
  max-width: min(42vw, 430px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.view-tabs,
.settings-actions,
.hero-actions,
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-button,
.settings-nav-button,
.icon-action,
.primary-action,
.secondary-action,
.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.tab-button {
  position: relative;
  padding: 0 13px;
  background: transparent;
  color: var(--charcoal);
  font-weight: 800;
}

.tab-button b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 12px;
}

.tab-button.active,
.settings-nav-button.active {
  background: #111;
  color: white;
  border-color: #111;
}

.tab-button.active b {
  background: white;
}

.tab-button:hover,
.settings-nav-button:hover,
.secondary-action:hover,
.icon-action:hover {
  border-color: #9e9e9e;
}

i[data-lucide] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 430px);
  gap: 20px;
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(9, 9, 9, 0.94) 0%, rgba(17, 17, 17, 0.82) 42%, rgba(17, 17, 17, 0.28) 100%),
    url("./assets/hardware-hero.png") center/cover;
  color: white;
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
  padding: clamp(26px, 5vw, 58px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-header h1,
.settings-header h1 {
  margin: 0;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 800px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-action {
  padding: 0 16px;
  border-color: var(--yellow);
  background: var(--yellow);
  color: #111;
  font-weight: 900;
}

.primary-action:hover {
  background: var(--yellow-strong);
  border-color: var(--yellow-strong);
}

.secondary-action,
.icon-action {
  padding: 0 14px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 800;
}

.danger-action {
  padding: 0 14px;
  border-color: #efc6bd;
  background: #fff3ef;
  color: var(--danger);
  font-weight: 800;
}

.compact-action {
  min-height: 38px;
  padding: 0 13px;
}

.hero-panel {
  display: grid;
  align-content: end;
  gap: 12px;
  padding: clamp(18px, 3vw, 32px);
}

.hero-panel div {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.54);
  padding: 17px;
  backdrop-filter: blur(12px);
}

.hero-panel span,
.summary-grid span,
.data-item span,
.contact-grid span,
.quote-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-panel span {
  color: var(--yellow);
}

.hero-panel strong {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

.service-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.service-band div,
.summary-grid div,
.delivery-info,
.catalog-panel,
.quote-panel,
.inquiry-panel,
.gcash-panel,
.contact-grid > * {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.service-band div {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.service-band i {
  color: var(--yellow-strong);
}

.service-band span,
.delivery-info p,
.page-header p,
.settings-header p:last-child,
.product-body p,
.gcash-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.diy-home-feature {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 20px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid #3d3000;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101010, #24200f);
  color: white;
  box-shadow: var(--shadow);
}

.diy-home-feature.showcase-enter.showcase-fade > img,
.diy-home-feature.showcase-enter.showcase-fade > div {
  animation: showcase-fade-in 480ms ease both;
}

.diy-home-feature.showcase-enter.showcase-fade > div,
.diy-home-feature.showcase-enter.showcase-slide > div,
.diy-home-feature.showcase-enter.showcase-zoom > div {
  animation-delay: 70ms;
}

.diy-home-feature.showcase-enter.showcase-slide > img,
.diy-home-feature.showcase-enter.showcase-slide > div {
  animation: showcase-slide-in 520ms cubic-bezier(.22, .8, .3, 1) both;
}

.diy-home-feature.showcase-enter.showcase-zoom > img,
.diy-home-feature.showcase-enter.showcase-zoom > div {
  animation: showcase-zoom-in 520ms ease both;
}

@keyframes showcase-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes showcase-slide-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes showcase-zoom-in {
  from {
    opacity: 0;
    transform: scale(.965);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.diy-home-feature > img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
}

.diy-home-feature > div {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 24px 24px 24px 4px;
}

.diy-home-feature h2,
.diy-home-feature p {
  margin: 0;
}

.diy-home-feature h2 {
  font-size: clamp(25px, 4vw, 42px);
}

.diy-home-feature > div > p:not(.eyebrow) {
  color: #d6d3c6;
  line-height: 1.6;
}

.diy-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diy-home-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #5c4d16;
  border-radius: 999px;
  background: #17160f;
  padding: 7px 10px;
  color: #f2cf55;
  font-size: 11px;
  font-weight: 800;
}

.showcase-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.showcase-dots button {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border: 0;
  border-radius: 999px;
  background: #655d38;
  padding: 0;
}

.showcase-dots button.active {
  width: 23px;
  background: var(--yellow);
}

@media (prefers-reduced-motion: reduce) {
  .diy-home-feature.showcase-enter > img,
  .diy-home-feature.showcase-enter > div {
    animation: none;
  }
}

.diy-project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 20px;
  align-items: start;
}

.diy-project-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.diy-project-selector button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px;
  text-align: left;
}

.diy-project-selector button.active,
.diy-project-selector button:hover {
  border-color: var(--yellow-strong);
  background: #fff9df;
}

.diy-project-selector img {
  width: 64px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
}

.diy-project-selector span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.diy-project-selector small {
  color: var(--muted);
}

.diy-gallery,
.diy-project-info {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
}

.diy-gallery {
  position: sticky;
  top: 94px;
}

.diy-gallery-main {
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.diy-gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.diy-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.diy-gallery-thumbs button {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #eee;
  padding: 0;
}

.diy-gallery-thumbs button.active {
  border-color: var(--yellow-strong);
}

.diy-gallery-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.diy-project-info {
  display: grid;
  gap: 14px;
}

.diy-project-info h2,
.diy-project-info h3,
.diy-project-info p {
  margin: 0;
}

.diy-project-info h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.diy-project-lead {
  color: var(--muted);
  line-height: 1.6;
}

.diy-project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diy-project-badges span {
  border-radius: 999px;
  background: #111;
  padding: 6px 9px;
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.diy-price-card {
  display: grid;
  gap: 4px;
  border-left: 5px solid var(--yellow-strong);
  background: #fff8d7;
  padding: 12px 14px;
}

.diy-price-card span,
.diy-price-card small {
  color: var(--muted);
}

.diy-price-card strong {
  font-size: 26px;
}

.diy-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.diy-spec-grid div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafaf7;
  padding: 9px;
}

.diy-spec-grid span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.diy-detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.diy-detail-columns section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.diy-detail-columns ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.diy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diy-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 8px;
  background: #fff3ee;
  padding: 10px;
  color: #7d2c1d;
  font-size: 11px;
  line-height: 1.5;
}

.diy-safety-note i {
  flex: 0 0 auto;
}

.catalog-panel,
.quote-panel,
.inquiry-panel,
.gcash-panel {
  padding: 18px;
}

.section-heading,
.settings-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.delivery-info h2,
.inquiry-panel h2,
.quote-panel h2,
.gcash-panel h2 {
  margin: 0;
}

.toolbar-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px 170px;
  gap: 12px;
  margin-top: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0 14px;
}

.search-box:focus-within {
  border-color: var(--yellow-strong);
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.22);
}

.search-box input,
.toolbar-band select,
label input,
label select,
label textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 0 12px;
}

label input:disabled,
label select:disabled,
label textarea:disabled {
  background: #eeeeeb;
  color: var(--muted);
  cursor: not-allowed;
}

.search-box input {
  border: 0;
  padding: 0;
  outline: 0;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.category-strip {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-pill {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
}

.category-pill.active {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-grid div {
  padding: 16px;
}

.summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  flex-direction: column;
}

.product-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  background: #e4e4e0;
  padding: 0;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stock-badge,
.featured-badge {
  position: absolute;
  top: 10px;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.stock-badge {
  left: 10px;
}

.stock-badge.in-stock {
  color: var(--success);
}

.stock-badge.low-stock {
  color: var(--warning);
}

.stock-badge.pre-order {
  color: #665000;
}

.stock-badge.not-available {
  color: #9f1d1d;
  background: #fff1f1;
}

.featured-badge {
  right: 10px;
  background: var(--yellow);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-body h3 {
  min-height: 48px;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.product-body p {
  min-height: 44px;
  margin: 10px 0;
}

.variant-picker {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.variant-picker span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.variant-picker select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 0 10px;
}

.price-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.price-box {
  border: 1px solid #ece2b1;
  border-radius: var(--radius);
  background: #fff9df;
  padding: 9px;
}

.price-box span {
  display: block;
  color: #665000;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-box strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.unit {
  display: block;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-card .primary-action,
.product-card .secondary-action {
  width: 100%;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #a8a8a8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 36px;
  text-align: center;
}

.delivery-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 22px;
  margin-top: 18px;
  padding: 24px;
}

.delivery-info ul,
.gcash-panel ol {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 20px;
}

.delivery-info li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.delivery-info li i {
  color: var(--success);
  margin-top: 2px;
}

.page-header {
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: #111;
  color: white;
  padding: 28px;
}

.page-header h1,
.settings-header h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 18px;
  align-items: start;
}

.checkout-shop-panel,
.checkout-option-card,
.checkout-payment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.checkout-shop-panel {
  overflow: hidden;
}

.checkout-table-head,
.quote-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 92px 130px 42px;
  gap: 12px;
  align-items: center;
}

.checkout-table-head {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #151515;
  color: white;
}

.checkout-table-head span {
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.checkout-table-head .secondary-action {
  min-width: 0;
  color: #181818;
}

.checkout-fulfillment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1e1a0;
  background: #fff8d8;
}

.checkout-fulfillment span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.quote-items {
  display: grid;
}

.quote-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.quote-item strong,
.quote-item small {
  display: block;
}

.quote-item small {
  color: var(--muted);
  margin-top: 3px;
}

.checkout-product-info {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.checkout-product-info img {
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #f5f5f3;
}

.checkout-product-info strong {
  line-height: 1.35;
}

.checkout-unit-price,
.checkout-line-total {
  text-align: center;
  white-space: nowrap;
}

.checkout-line-total {
  color: var(--danger);
}

.quote-item input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  text-align: center;
  font-weight: 900;
}

.quote-item button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--danger);
}

.checkout-shipping-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 14px 16px;
  background: #fafafa;
}

.checkout-shipping-row span {
  color: var(--muted);
  font-weight: 900;
}

.checkout-shipping-row small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.4;
}

.checkout-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.checkout-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px;
}

.checkout-option-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.checkout-payment-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 88px;
}

.payment-method-head h2 {
  margin: 3px 0 0;
}

.payment-method-list {
  display: grid;
  gap: 8px;
}

.payment-method-choice {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f8f6;
  color: #151515;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.payment-method-choice:hover,
.payment-method-choice.active {
  border-color: var(--yellow-strong);
  background: #fff8d8;
  box-shadow: inset 4px 0 0 var(--yellow-strong);
}

.payment-method-choice.active strong::after {
  content: "Selected";
  float: right;
  margin-left: 8px;
  color: var(--success);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-method-list span,
.checkout-payment-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.checkout-summary {
  display: grid;
  gap: 9px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.checkout-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkout-summary strong {
  text-align: right;
}

.checkout-summary .total-payment {
  margin-top: 6px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.checkout-summary .total-payment span {
  color: #111;
  font-size: 15px;
}

.checkout-summary .total-payment strong {
  color: var(--danger);
  font-size: 28px;
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.prepared-message {
  display: none;
  margin-top: 14px;
  border: 1px solid #ead37b;
  border-radius: var(--radius);
  background: #fff8d8;
  padding: 14px;
  overflow: hidden;
  white-space: pre-wrap;
}

.prepared-message pre {
  max-width: 100%;
  margin: 10px 0 0;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.prepared-message.active {
  display: block;
}

.prepared-message.success,
.checkout-status.success {
  border-color: #9ed8ad;
  background: #eaf8ee;
}

.prepared-message.error,
.checkout-status.error {
  border-color: #f0aaa6;
  background: #fff0ef;
}

.checkout-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #ead37b;
  border-radius: var(--radius);
  background: #fff8d8;
  padding: 12px;
}

.checkout-status.warning {
  border-color: var(--line);
  background: #f5f5f3;
}

.checkout-status.sending {
  border-color: #b7c9f5;
  background: #eef4ff;
}

.checkout-status i {
  flex: 0 0 auto;
  color: var(--yellow-strong);
}

.checkout-status.success i {
  color: var(--success);
}

.checkout-status.error i {
  color: var(--danger);
}

.checkout-status strong,
.checkout-status span {
  display: block;
}

.checkout-status span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.primary-action:disabled,
.secondary-action:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.gcash-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 22px;
  margin-top: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-grid > * {
  display: grid;
  gap: 9px;
  min-height: 160px;
  padding: 20px;
  text-decoration: none;
}

.contact-grid i {
  color: var(--yellow-strong);
}

.contact-grid strong {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.settings-header {
  margin-bottom: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.settings-nav-button {
  justify-content: flex-start;
  width: 100%;
  padding: 0 12px;
  border-color: var(--line);
  background: white;
  color: var(--muted);
  font-weight: 900;
}

.settings-content {
  min-width: 0;
}

.settings-section {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 18px;
}

.settings-section.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-submit {
  margin-top: 16px;
}

.inline-form,
.product-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.inline-form {
  grid-template-columns: minmax(160px, 240px) minmax(180px, 280px) minmax(0, 1fr) auto auto;
  align-items: end;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.data-item strong {
  display: block;
  margin-top: 4px;
}

.data-item small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.data-actions {
  display: flex;
  gap: 8px;
}

.data-actions button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.product-data-list .data-item {
  grid-template-columns: 70px minmax(0, 1fr) auto;
}

.data-thumb {
  width: 70px;
  height: 58px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e2e2df;
}

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

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.check-row span {
  margin: 0;
}

.privacy-consent {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid #d7c675;
  border-radius: var(--radius);
  background: #fff9dc;
  padding: 11px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.privacy-consent input {
  width: 17px !important;
  min-height: 17px !important;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--yellow-strong);
}

.privacy-consent span {
  margin: 0;
  font-weight: 700;
}

.privacy-consent a,
.footer-privacy-note a,
.portal-privacy-note a,
.privacy-document a {
  color: #7a5600;
  font-weight: 900;
  text-decoration: underline;
}

.file-action {
  width: 44px;
  height: 42px;
}

.file-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 24px;
  margin-top: 20px;
  background: #111;
  color: white;
  padding: 28px clamp(16px, 3vw, 38px);
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand p {
  color: #c9c9c9;
  margin: 8px 0 0;
}

.footer-grid {
  display: grid;
  gap: 11px;
}

.footer-grid a,
.footer-grid span {
  color: #f3f3f3;
  overflow-wrap: anywhere;
}

.footer-privacy-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #c9c9c9;
  font-size: 11px;
  line-height: 1.5;
}

.footer-privacy-note a {
  color: #f6d55a;
}

.portal-privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.privacy-page {
  min-height: 100vh;
  background: #f3f3ef;
}

.privacy-shell {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 50px;
}

.privacy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.privacy-header h1,
.privacy-header p {
  margin: 0;
}

.privacy-header h1 {
  margin: 4px 0;
  font-size: clamp(30px, 6vw, 50px);
}

.privacy-document {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.privacy-document section {
  background: white;
  padding: clamp(18px, 4vw, 30px);
}

.privacy-document h2 {
  margin: 0 0 9px;
  font-size: 19px;
}

.privacy-document p,
.privacy-document li {
  color: #484843;
  line-height: 1.7;
}

.privacy-document p {
  margin: 0 0 9px;
}

.privacy-document p:last-child {
  margin-bottom: 0;
}

.privacy-document ul {
  margin: 0;
  padding-left: 22px;
}

@media (max-width: 640px) {
  .privacy-header {
    flex-direction: column-reverse;
  }
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
}

.floating-actions a,
.floating-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 12px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 0;
  font: inherit;
}

.float-chat-booth {
  background: #111;
  cursor: pointer;
}

.float-chat-booth strong {
  min-width: 19px;
  border-radius: 10px;
  background: #e53935;
  padding: 1px 5px;
  color: white;
  font-size: 10px;
}

.float-call {
  background: var(--success);
}

.float-messenger {
  background: #0866ff;
}

.float-viber {
  background: #7360f2;
}

.modal-open {
  overflow: hidden;
}

.chat-booth.hidden,
.receiver-chat-drawer.hidden {
  display: none;
}

.chat-booth,
.receiver-chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.chat-booth-backdrop,
.receiver-chat-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.chat-booth-panel {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(360px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 36px));
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12px;
  background: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  pointer-events: auto;
}

.chat-booth-head,
.receiver-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--dark);
  color: white;
  padding: 10px 12px;
}

.chat-booth-head div,
.receiver-chat-head div {
  display: grid;
  gap: 3px;
}

.chat-booth-head span,
.receiver-chat-head span {
  color: #d7d7d0;
  font-size: 10px;
}

.chat-booth-head button,
.receiver-chat-head button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: white;
}

.chat-booth-start,
.chat-booth-conversation {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.chat-booth-start form {
  display: grid;
  gap: 7px;
}

.ai-chat-notice {
  margin: 0 0 9px;
  border: 1px solid #e7cf72;
  border-radius: 9px;
  background: #fff9dc;
  padding: 8px;
  color: #5f4a00;
  font-size: 10px;
  line-height: 1.45;
}

.chat-booth-start label {
  display: grid;
  gap: 3px;
  font-weight: 800;
}

.chat-booth-start input,
.chat-booth-start select,
.chat-booth-start textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 8px;
  font: inherit;
}

.chat-booth-conversation {
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto auto;
  gap: 7px;
}

.chat-booth-topic {
  font-weight: 900;
}

.receiver-chat-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  padding: 0 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.receiver-chat-button strong {
  min-width: 22px;
  border-radius: 12px;
  background: #b42318;
  padding: 2px 6px;
  color: white;
  font-size: 11px;
}

.receiver-chat-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, calc(100vw - 20px));
  height: 100%;
  background: white;
  box-shadow: -18px 0 50px rgba(0,0,0,.2);
  pointer-events: auto;
}

.receiver-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
  min-height: 0;
}

.receiver-chat-list-pane,
.receiver-chat-conversation {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 9px;
  font-size: 12px;
}

.receiver-chat-list-pane {
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
}

.receiver-chat-list {
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
}

.receiver-chat-row {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 7px 8px;
  text-align: left;
}

.receiver-chat-row.active,
.receiver-chat-row:hover {
  border-color: var(--yellow-strong);
  background: #fff9df;
}

.receiver-chat-row span,
.receiver-chat-row small {
  color: var(--muted);
  font-size: 10px;
}

.receiver-chat-row small {
  color: #b42318;
  font-weight: 800;
}

.receiver-chat-row time {
  margin-top: 2px;
  color: #777;
  font-size: 9px;
  font-weight: 700;
}

.receiver-chat-conversation {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.receiver-chat-selected {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.chat-booth .portal-message,
.receiver-chat-drawer .portal-message {
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 11px;
}

.chat-booth .portal-message.ai,
.receiver-chat-drawer .portal-message.ai {
  border: 1px solid #d5a900;
  background: #fff9dc;
}

.chat-booth .portal-message.ai strong,
.receiver-chat-drawer .portal-message.ai strong {
  color: #765b00;
}

.chat-booth .portal-message-list,
.receiver-chat-drawer .portal-message-list {
  gap: 6px;
}

.chat-booth .portal-message p,
.receiver-chat-drawer .portal-message p {
  margin-top: 4px;
}

.chat-booth .portal-message-form,
.receiver-chat-drawer .portal-message-form {
  gap: 6px;
}

.chat-booth .portal-message-form textarea,
.receiver-chat-drawer .portal-message-form textarea {
  padding: 7px 8px;
  font-size: 11px;
}

.chat-booth .primary-action,
.chat-booth .secondary-action,
.receiver-chat-drawer .primary-action,
.receiver-chat-drawer .secondary-action {
  min-height: 34px;
  padding: 0 9px;
  font-size: 10px;
}

.quotation-request-fields {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  padding: 14px;
}

.quotation-request-fields legend {
  padding: 0 6px;
  font-weight: 900;
}

.quotation-request-fields > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.quotation-request-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quotation-request-grid label {
  display: grid;
  gap: 6px;
}

.quotation-file-field small {
  color: var(--muted);
  font-size: 11px;
}

.quotation-file-status {
  min-height: 16px;
  color: #7a5700;
  font-size: 11px;
  font-weight: 800;
}

.upload-warning {
  color: #a13a22;
  font-size: 12px;
}

.quotation-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
  align-items: start;
  gap: 18px;
}

.quotation-return-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid #98cfab;
  border-radius: var(--radius);
  background: #effff4;
  padding: 14px;
}

.quotation-return-card.hidden {
  display: none;
}

.quotation-return-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quotation-return-card > div:first-child > span {
  display: grid;
  gap: 3px;
}

.quotation-return-card small {
  color: var(--muted);
}

.quotation-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quotation-form-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ead27a;
  border-radius: var(--radius);
  background: #fff8d8;
  padding: 12px;
}

.quotation-form-intro i {
  flex: 0 0 auto;
  color: #8a6200;
}

.quotation-form-intro div {
  display: grid;
  gap: 3px;
}

.quotation-form-intro span,
.quotation-selection-panel > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.quotation-selection-panel {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 16px;
}

.quotation-selection-panel h2 {
  margin: 0;
  font-size: 20px;
}

.quotation-selected-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quotation-selected-items article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 62px 30px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.quotation-selected-items img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.quotation-selected-items article div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quotation-selected-items small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quotation-selected-items input {
  width: 62px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}

.quotation-selected-items article button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f3f3ef;
}

@media (max-width: 720px) {
  .receiver-chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, .65fr) minmax(0, 1.35fr);
  }

  .receiver-chat-list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-booth-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
}

.product-modal.hidden {
  display: none;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

.product-modal-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.modal-close {
  position: sticky;
  top: 12px;
  left: calc(100% - 54px);
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  padding: 22px;
}

.detail-media {
  display: grid;
  align-content: start;
  gap: 12px;
}

.detail-main-media {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f0f0ed;
}

.detail-main-media[data-zoom-media] {
  cursor: zoom-in;
}

.detail-main-media.zoomed {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.detail-main-media.zoomed.is-dragging {
  cursor: grabbing;
}

.detail-main-media img,
.detail-main-media video {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.detail-main-media.zoomed img {
  transform: translate(var(--zoom-pan-x, 0px), var(--zoom-pan-y, 0px)) scale(1.55);
}

.detail-main-media img {
  transition: transform 0.18s ease;
}

.detail-main-media.zoomed.is-dragging img {
  transition: none;
}

.zoom-hint {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 12px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.82);
  color: white;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.zoom-hint i {
  width: 14px;
  height: 14px;
}

.detail-main-media.zoomed .zoom-hint {
  opacity: 0;
}

.media-link {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.media-link i {
  color: var(--yellow-strong);
  width: 38px;
  height: 38px;
}

.media-link a {
  color: var(--dark);
  font-weight: 900;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.detail-thumbs button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  overflow: hidden;
  place-items: center;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #f4f4f1;
  color: var(--muted);
  padding: 4px;
  font-size: 11px;
  font-weight: 800;
}

.detail-thumbs button.active {
  border-color: var(--yellow);
  color: var(--ink);
}

.detail-thumbs img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  border-radius: 5px;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-info h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7a5700;
  font-weight: 900;
}

.rating-row span {
  color: #b57c00;
}

.detail-variant {
  display: grid;
  gap: 7px;
}

.detail-variant span,
.detail-price-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-variant select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.detail-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-price-grid div {
  border: 1px solid #ecd77b;
  border-radius: var(--radius);
  background: #fff8d8;
  padding: 14px;
}

.detail-price-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  border-radius: 999px;
  background: #f4f4f1;
  padding: 9px 13px;
  font-weight: 900;
}

.detail-stock.in-stock {
  color: var(--success);
}

.detail-stock.low-stock {
  color: var(--warning);
}

.detail-stock.not-available {
  color: #9f1d1d;
  background: #fff1f1;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-description {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 0 22px 22px;
}

.detail-description div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 16px;
}

.detail-description h3 {
  margin: 0 0 8px;
}

.detail-description p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.related-products {
  border-top: 1px solid var(--line);
  padding: 0 22px 22px;
}

.section-heading.compact {
  margin: 0 0 12px;
}

.section-heading.compact h3 {
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.related-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 9px;
  color: var(--ink);
  text-align: left;
}

.related-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.related-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0ed;
}

.related-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.related-card strong {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.35;
}

.related-card small {
  color: var(--yellow-strong);
  font-weight: 900;
}

.quote-drawer.hidden {
  display: none;
}

.quote-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
}

.quote-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.quote-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, calc(100vw - 24px));
  height: 100%;
  border-left: 1px solid var(--line);
  background: white;
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.quote-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--dark);
  color: white;
  padding: 18px;
}

.quote-drawer-head span {
  display: block;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-drawer-head strong {
  font-size: 22px;
}

.quote-drawer-head button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.quote-drawer-content {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.quote-drawer-empty {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 18px;
  color: var(--muted);
}

.quote-drawer-empty strong {
  color: var(--ink);
}

.quote-drawer-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 8px;
}

.quote-drawer-item img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0ed;
}

.quote-drawer-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
}

.quote-drawer-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quote-drawer-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 2px 0;
  font-weight: 900;
}

.quote-drawer-total span {
  color: var(--muted);
}

.quote-drawer-actions {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 132px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 36px));
  transform: translateY(20px);
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  padding: 13px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 211, 52, 0.16), transparent 32%),
    #eeeeeb;
  font-size: 14px;
}

.admin-shell {
  width: min(100% - 32px, 1360px);
  margin: 0 auto;
  padding: 24px 0;
}

.admin-login-card {
  display: grid;
  gap: 18px;
  width: min(460px, 100%);
  margin: 11vh auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 22px;
  box-shadow: var(--shadow);
}

.admin-brand {
  width: 100%;
  justify-content: flex-start;
}

.admin-login-form {
  display: grid;
  gap: 14px;
}

.admin-login-form label,
.order-detail-head label {
  display: grid;
  gap: 7px;
}

.admin-login-form span,
.order-detail-head label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-login-form input,
.order-detail-head select,
.orders-panel select,
.payment-module select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0 12px;
  font: inherit;
}

.admin-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.receiver-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--dark);
  color: white;
  padding: 12px;
  box-shadow: var(--shadow);
}

.receiver-sidebar-brand {
  color: white;
}

.receiver-sidebar-brand .brand-text small {
  color: #d7d7d0;
}

.receiver-nav {
  display: grid;
  gap: 8px;
}

.receiver-nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 0 12px;
  font-weight: 900;
  text-align: left;
}

.nav-notification-badge {
  min-width: 22px;
  margin-left: auto;
  border-radius: 11px;
  background: #e53935;
  padding: 2px 6px;
  color: white;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.receiver-nav-button.active,
.receiver-nav-button:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

.receiver-sidebar-actions {
  display: grid;
  gap: 10px;
  align-self: end;
}

.receiver-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.38;
}

.receiver-main h1 {
  font-size: clamp(22px, 2.5vw, 30px);
}

.receiver-main h2 {
  font-size: 19px;
}

.receiver-main h3 {
  font-size: 16px;
}

.admin-module {
  display: none;
}

.admin-module.active {
  display: block;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--dark);
  color: white;
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-header h1,
.admin-header p {
  margin: 0;
}

.admin-header h1 {
  margin-top: 4px;
  font-size: clamp(22px, 2.5vw, 30px);
}

.admin-header > div:first-child p:last-child {
  max-width: 720px;
  margin-top: 6px;
  color: #d7d7d0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.receiver-live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 0 10px;
  color: #e5e5df;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.receiver-live-status strong {
  color: white;
}

.live-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35c66b;
  box-shadow: 0 0 0 3px rgba(53, 198, 107, 0.18);
}

.receiver-live-status.has-new {
  border-color: var(--yellow);
  background: rgba(255, 204, 0, 0.12);
}

.receiver-live-status.has-new .live-status-dot {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  box-shadow: var(--shadow);
}

.admin-stats span,
.order-customer-grid span,
.order-total-box span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.48fr) minmax(0, 1.52fr);
  gap: 12px;
  align-items: start;
}

.orders-panel,
.order-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  box-shadow: var(--shadow);
}

.order-detail-panel {
  max-height: 78vh;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

.admin-search-row {
  margin: 10px 0;
}

.compact-search {
  min-height: 40px;
  padding: 0 11px;
}

.compact-search input {
  font-size: 13px;
}

.orders-list {
  display: grid;
  gap: 7px;
  max-height: 64vh;
  overflow: auto;
}

.order-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.order-type-tabs button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.order-type-tabs button.active {
  border-color: var(--yellow);
  background: #fff8d8;
  color: var(--ink);
}

.order-type-tabs strong {
  min-width: 24px;
  border-radius: 12px;
  background: var(--ink);
  padding: 3px 7px;
  color: white;
  font-size: 11px;
  text-align: center;
}

.house-request-pricing-panel {
  margin-top: 14px;
  border: 1px solid #e3bd00;
  border-radius: var(--radius);
  background: #fffbea;
  padding: 12px;
}

.house-request-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.house-request-pricing-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.house-request-pricing-grid label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.house-request-pricing-grid input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
}

.house-request-pricing-grid select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 0 10px;
  font: inherit;
}

.house-proposal-pricing-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.house-proposal-pricing-grid .primary-action {
  align-self: end;
}

.house-project-brief,
.house-reference-files,
.house-activity-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
}

.house-reference-file-list {
  display: grid;
  gap: 8px;
}

.house-reference-file-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.house-reference-file-list article div {
  display: grid;
  gap: 3px;
}

.house-reference-file-list article span {
  color: var(--muted);
  font-size: 12px;
}

.quotation-receiver-files {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf5;
  padding: 14px;
}

.quotation-receiver-files h3 {
  margin: 0;
}

.quotation-file-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.house-reference-file-list .quotation-file-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: initial;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.quotation-file-preview {
  display: grid;
  width: 76px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efefeb;
  color: var(--muted);
}

.quotation-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quotation-file-preview.document i {
  width: 28px;
  height: 28px;
}

.house-activity-list {
  display: grid;
  gap: 0;
}

.house-activity-list article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
}

.house-activity-list article > span {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--yellow-strong);
}

.house-activity-list article div {
  display: grid;
  gap: 2px;
}

.house-activity-list small {
  color: var(--muted);
}

.house-request-file-field small {
  color: var(--muted);
  line-height: 1.4;
}

.house-request-pricing-grid input[readonly] {
  background: #f0f0eb;
  font-weight: 900;
}

@media (max-width: 620px) {
  .order-type-tabs {
    grid-template-columns: 1fr;
  }
}

.order-row,
.payment-row,
.quotation-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  min-width: 0;
}

.order-row.active,
.order-row:hover,
.payment-row.active,
.payment-row:hover,
.quotation-row.active,
.quotation-row:hover {
  border-color: var(--yellow);
  background: #fff8d8;
}

.order-row strong,
.payment-row strong,
.quotation-row strong,
.admin-product-row strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row small,
.order-row em,
.order-row-meta,
.payment-row small,
.payment-row em,
.quotation-row small,
.quotation-row em,
.order-detail-head p,
.order-items-detail span {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status {
  width: fit-content;
  border-radius: 999px;
  background: #ececea;
  color: var(--ink);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-status.new {
  background: #fff1b5;
  color: #795700;
}

.order-status.confirmed,
.order-status.ready {
  background: #d9f7df;
  color: var(--success);
}

.order-status.preparing {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-status.cancelled {
  background: #ffe0e0;
  color: var(--danger);
}

.order-status.payment-pending {
  background: #fff1b5;
  color: #795700;
}

.order-status.paid {
  background: #d9f7df;
  color: var(--success);
}

.order-status.cod {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-status.unpaid {
  background: #ececea;
  color: var(--muted);
}

.order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.order-detail-head h2 {
  margin: 6px 0 3px;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.quick-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quick-status-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f6f4;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.quick-status-button:hover {
  border-color: var(--yellow-strong);
  background: #fff8d8;
}

.quick-status-button:disabled {
  opacity: 0.55;
}

.order-customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 0;
}

.order-customer-grid div,
.order-total-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 10px;
}

.order-customer-grid .wide {
  grid-column: 1 / -1;
}

.order-customer-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.order-items-detail {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.order-items-detail h3 {
  margin: 0;
}

.order-items-detail article {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 9px;
}

.order-items-detail strong,
.order-items-detail span {
  display: block;
}

.order-items-detail em {
  color: var(--yellow-strong);
  font-style: normal;
  font-weight: 900;
}

.order-total-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  margin: 12px 0;
}

.send-back-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #ead37b;
  border-radius: var(--radius);
  background: #fffdf1;
  padding: 16px;
}

.send-back-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 310px;
  padding: 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.send-back-panel .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  align-items: stretch;
  gap: 8px;
}

.reply-send-status {
  min-height: 18px;
  color: #176b3a;
  font-size: 12px;
  font-weight: 800;
}

.send-back-attachment {
  display: grid;
  gap: 6px;
  border: 1px dashed #d1b449;
  border-radius: 10px;
  background: #fff9dd;
  padding: 10px;
}

.send-back-attachment > span {
  font-size: 12px;
  font-weight: 900;
}

.send-back-attachment input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px;
}

.send-back-attachment small {
  color: var(--muted);
  font-size: 10px;
}

.send-back-panel .primary-action,
.send-back-panel .secondary-action {
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.send-back-panel .primary-action span,
.send-back-panel .secondary-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-reply-note {
  color: var(--muted);
  font-weight: 800;
}

.customer-confirmation-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #b7dfc4;
  border-radius: var(--radius);
  background: #f1fff5;
  padding: 14px;
}

.customer-confirmation-panel h3,
.customer-confirmation-panel p {
  margin: 0;
}

.confirmation-body {
  min-height: 100vh;
  background: linear-gradient(145deg, #fff8dc, #f1f3ef 45%, #e8f5ec);
}

.confirmation-shell {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 28px 0;
}

.confirmation-card {
  display: grid;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: clamp(16px, 4vw, 28px);
  box-shadow: var(--shadow);
}

.confirmation-loading,
.confirmation-error,
.confirmation-notice,
.confirmation-result {
  border-radius: var(--radius);
  padding: 14px;
  line-height: 1.5;
}

.confirmation-loading,
.confirmation-notice {
  background: #fff8d6;
}

.confirmation-error {
  border: 1px solid #f3b8b8;
  background: #fff1f1;
  color: #9b1c1c;
  font-weight: 800;
}

.confirmation-content {
  display: grid;
  gap: 18px;
}

.confirmation-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.confirmation-heading h1,
.confirmation-items h2 {
  margin: 0;
}

.confirmation-items {
  display: grid;
  gap: 10px;
}

.confirmation-items article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.confirmation-items article div {
  display: grid;
  gap: 3px;
}

.confirmation-items article span {
  color: var(--muted);
  font-size: 12px;
}

.confirmation-items article em {
  font-style: normal;
  font-weight: 900;
}

.confirmation-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  border-radius: var(--radius);
  background: #f7f7f4;
  padding: 16px;
}

.confirmation-response {
  display: grid;
  gap: 12px;
}

.confirmation-response label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.confirmation-response textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  resize: vertical;
}

.confirmation-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.confirmation-result {
  margin: 0;
  background: #edf8f0;
  font-weight: 800;
}

.portal-conversation {
  display: grid;
  gap: 12px;
  border: 1px solid #b9cee8;
  border-radius: var(--radius);
  background: #f7fbff;
  padding: 14px;
}

.portal-conversation h2,
.portal-conversation h3,
.portal-conversation p {
  margin-top: 0;
}

.portal-message-list {
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}

.portal-message {
  width: min(88%, 560px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 10px 12px;
}

.portal-message.customer {
  justify-self: end;
  border-color: #e6c200;
  background: #fff9dc;
}

.portal-message.staff {
  justify-self: start;
  border-color: #b9cee8;
  background: #eef6ff;
}

.portal-message > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.portal-message small {
  color: var(--muted);
}

.portal-message p {
  margin: 7px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.portal-message-attachment {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #b9cee8;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  text-decoration: none;
}

.portal-message-attachment img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #ececea;
}

.portal-message-attachment span {
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.portal-message-form {
  display: grid;
  gap: 10px;
}

.portal-message-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.portal-message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  resize: vertical;
}

.receiver-reply-attachment {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fffdf5;
  padding: 8px;
}

.receiver-reply-attachment[hidden] {
  display: none;
}

.receiver-reply-attachment small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.order-row-meta b {
  color: #b42318;
}

@media (max-width: 620px) {
  .confirmation-heading {
    display: grid;
  }

  .confirmation-items article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .confirmation-items article em {
    grid-column: 1 / -1;
  }

  .confirmation-actions {
    grid-template-columns: 1fr;
  }

  .portal-message {
    width: 94%;
  }
}

.catalog-admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 16px;
  box-shadow: var(--shadow);
}

.module-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  box-shadow: var(--shadow);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.module-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 11px;
}

.module-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-grid strong {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
  font-size: 13px;
}

.security-health-panel {
  display: grid;
  gap: 16px;
}

.security-health-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid #cfd4d1;
  border-radius: var(--radius);
  background: #f4f6f5;
  padding: 15px;
}

.security-health-banner.is-healthy {
  border-color: #82c99a;
  background: #eaf8ef;
  color: #155e35;
}

.security-health-banner.is-warning {
  border-color: #e8b63b;
  background: #fff7dc;
  color: #765000;
}

.security-health-banner.is-danger {
  border-color: #e78383;
  background: #fff0f0;
  color: #9d2020;
}

.security-health-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: currentColor;
}

.security-health-icon svg {
  width: 23px;
  height: 23px;
  color: white;
}

.security-health-banner > div {
  display: grid;
  gap: 3px;
}

.security-health-banner strong {
  font-size: 17px;
}

.security-health-banner span,
.security-health-banner time {
  font-size: 12px;
  font-weight: 700;
}

.security-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.security-summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 13px;
}

.security-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-summary-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.security-defense-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.security-defense-grid div {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #b8d8c2;
  border-radius: var(--radius);
  background: #eff9f2;
  color: #155e35;
  padding: 10px;
  font-size: 12px;
  font-weight: 900;
}

.security-defense-grid svg {
  width: 17px;
  height: 17px;
}

.security-events-head h3,
.security-events-head p {
  margin: 0;
}

.security-events-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.security-events-list {
  display: grid;
  gap: 7px;
  max-height: 430px;
  overflow: auto;
}

.security-event-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 10px 12px;
}

.security-event-level {
  border-radius: 999px;
  background: #e5e7e6;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.security-event-row[data-severity="medium"] .security-event-level {
  background: #fff0b9;
  color: #795100;
}

.security-event-row[data-severity="high"] .security-event-level,
.security-event-row[data-severity="critical"] .security-event-level {
  background: #ffdada;
  color: #a11c1c;
}

.security-event-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.security-event-copy strong {
  overflow-wrap: anywhere;
}

.security-event-copy span,
.security-event-row time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.analytics-panel {
  display: grid;
  gap: 16px;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.analytics-summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 13px;
}

.analytics-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-summary-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 25px;
}

.analytics-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-columns > section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 13px;
}

.analytics-columns h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.analytics-device-list,
.analytics-ranking-list {
  display: grid;
  gap: 7px;
}

.analytics-device-row,
.analytics-ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  background: white;
  padding: 9px 10px;
  font-size: 12px;
}

.analytics-device-row span,
.analytics-ranking-row span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.analytics-device-row strong,
.analytics-ranking-row strong {
  border-radius: 999px;
  background: #fff0a6;
  padding: 3px 8px;
  font-size: 11px;
}

.analytics-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 800px) {
  .security-summary-grid,
  .security-defense-grid,
  .analytics-summary-grid,
  .analytics-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-health-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .security-health-banner time {
    grid-column: 2;
  }
}

.payment-workspace,
.quotation-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
}

.payments-list,
.quotation-list {
  display: grid;
  gap: 7px;
  max-height: 650px;
  overflow: auto;
}

.payment-order-summary p {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.payment-detail-form,
.quotation-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-height: 76vh;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 12px;
}

.payment-order-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}

.payment-order-summary strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.quotation-message {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  font: inherit;
  font-size: 12px;
  line-height: 1.42;
}

.catalog-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
}

.catalog-admin-list {
  display: grid;
  gap: 12px;
}

.admin-products-list {
  display: grid;
  gap: 9px;
  max-height: 620px;
  overflow: auto;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.admin-product-row > img {
  width: 58px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #eeeeeb;
}

.admin-product-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-product-row.active,
.admin-product-row:hover {
  border-color: var(--yellow);
  background: #fff8d8;
}

.admin-product-row span,
.admin-product-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.admin-product-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  height: min(620px, calc(100vh - 32px));
  max-height: min(620px, calc(100vh - 32px));
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfa;
  padding: 14px;
}

.product-form-actions {
  position: sticky;
  bottom: -14px;
  z-index: 12;
  margin: 0 -14px -14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  padding: 10px 14px 14px;
  box-shadow: 0 -10px 22px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(8px);
}

.product-form-actions .check-row {
  margin-right: auto;
}

.admin-product-form textarea[name="variantsJson"] {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.admin-variant-sheet {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf3;
  padding: 12px;
}

.variant-sheet-head,
.variant-sheet-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.variant-sheet-head div,
.variant-sheet-empty {
  min-width: 0;
}

.variant-sheet-head strong,
.variant-sheet-empty strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.variant-sheet-head span,
.variant-sheet-empty span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.variant-sheet-table {
  display: grid;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.variant-sheet-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.45fr) minmax(88px, .75fr) minmax(88px, .75fr) minmax(130px, 1fr) minmax(74px, .55fr) minmax(130px, .8fr);
  gap: 7px;
  min-width: 780px;
  align-items: center;
}

.variant-sheet-header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.variant-sheet-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 9px;
  font: inherit;
}

.variant-sheet-row.is-unavailable input {
  background: #fff7f7;
  color: #8a1f1f;
  text-decoration: line-through;
}

.variant-sheet-row [data-variant-toggle] {
  min-height: 38px;
  justify-content: center;
  white-space: nowrap;
}

.admin-image-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 96px;
  border: 1px dashed #c8c8c3;
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}

.admin-image-preview figure {
  display: grid;
  gap: 5px;
  margin: 0;
  min-width: 0;
}

.admin-image-preview img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #eeeeeb;
}

.admin-image-preview figcaption,
.admin-image-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-image-empty {
  grid-column: 1 / -1;
  display: grid;
  place-content: center;
  gap: 4px;
  min-height: 74px;
  text-align: center;
}

.prepared-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .topbar,
  .settings-header,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tab-button {
    flex: 1 0 auto;
  }

  .store-hero,
  .service-band,
  .delivery-info,
  .settings-layout,
  .toolbar-band,
  .summary-grid,
  .form-grid,
  .inline-form,
  .checkout-layout,
  .checkout-options-grid,
  .gcash-panel,
  .contact-grid,
  .site-footer,
  .detail-layout,
  .detail-description {
    grid-template-columns: 1fr;
  }

  .checkout-payment-card {
    position: static;
  }

  .checkout-table-head,
  .quote-item {
    grid-template-columns: minmax(0, 1fr) 110px 84px 116px 42px;
    gap: 9px;
  }

  .checkout-product-info {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .checkout-product-info img {
    width: 64px;
    height: 64px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    align-self: end;
  }

  .settings-nav {
    display: flex;
    overflow-x: auto;
  }

  .settings-nav-button {
    width: auto;
    flex: 0 0 auto;
  }

  .admin-header,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .receiver-sidebar {
    position: static;
    min-height: auto;
  }

  .receiver-nav {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .receiver-nav-button {
    justify-content: center;
  }

  .receiver-sidebar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-stats,
  .admin-workspace,
  .catalog-admin-layout,
  .payment-workspace,
  .quotation-workspace,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-form {
    height: auto;
    max-height: none;
  }

  .admin-actions .primary-action,
  .admin-actions .secondary-action,
  .admin-actions .danger-action {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .announcement-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  main {
    width: min(100% - 20px, 1280px);
    padding-top: 12px;
  }

  .brand-text strong,
  .brand-text small {
    max-width: calc(100vw - 106px);
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-actions,
  .form-row,
  .settings-actions,
  .inquiry-form,
  .price-stack,
  .detail-price-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action,
  .danger-action {
    width: 100%;
  }

  .quote-item,
  .product-data-list .data-item,
  .data-item {
    grid-template-columns: 1fr;
  }

  .checkout-table-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .checkout-table-head > span {
    display: none;
  }

  .checkout-table-head .secondary-action {
    width: auto;
  }

  .checkout-fulfillment,
  .checkout-option-card,
  .checkout-summary div {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-item {
    gap: 11px;
    padding: 13px;
  }

  .checkout-product-info {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .checkout-product-info img {
    width: 78px;
    height: 78px;
  }

  .checkout-unit-price,
  .checkout-line-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .checkout-unit-price::before {
    content: "Unit Price";
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
  }

  .checkout-line-total::before {
    content: "Item Subtotal";
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
  }

  .quote-item input {
    max-width: 120px;
    text-align: left;
  }

  .quote-item button {
    justify-self: end;
  }

  .checkout-shipping-row {
    grid-template-columns: 1fr;
  }

  .checkout-shipping-row small {
    grid-column: auto;
  }

  .checkout-summary .total-payment strong {
    font-size: 24px;
  }

  .data-actions {
    justify-content: flex-end;
  }

  .floating-actions {
    right: 10px;
    bottom: 10px;
  }

  .floating-actions a {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .product-modal {
    padding: 8px;
  }

  .product-modal-dialog {
    max-height: 94vh;
  }

  .modal-close {
    top: 8px;
    left: calc(100% - 48px);
  }

  .detail-layout {
    gap: 14px;
    padding: 14px;
  }

  .detail-main-media {
    min-height: 260px;
  }

  .detail-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-description {
    padding: 0 14px 14px;
  }

  .related-products {
    padding: 0 14px 14px;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-drawer-panel {
    width: 100%;
  }

  .receiver-nav {
    grid-template-columns: 1fr;
  }

  .receiver-sidebar-actions {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    width: min(100% - 20px, 1360px);
    padding: 12px 0;
  }

  .admin-login-card,
  .admin-header,
  .orders-panel,
  .order-detail-panel,
  .catalog-admin-panel,
  .payment-detail-form,
  .admin-product-form {
    padding: 14px;
  }

  .product-form-actions {
    bottom: -14px;
    margin: 0 -14px -14px;
    padding: 9px 14px 14px;
  }

  .product-form-actions .check-row {
    flex: 1 0 100%;
  }

  .product-form-actions .primary-action,
  .product-form-actions .secondary-action {
    flex: 1 1 140px;
  }

  .order-detail-head,
  .order-items-detail article {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .order-customer-grid,
  .order-total-box {
    grid-template-columns: 1fr;
  }

  .house-request-pricing-grid {
    grid-template-columns: 1fr;
  }

  .admin-image-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Customer marketplace layout */
.topbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 48px;
  gap: 10px;
  min-width: 0;
  height: 48px;
  border: 2px solid var(--yellow);
  background: white;
  padding: 0 0 0 14px;
}

.header-search > button {
  display: grid;
  width: 48px;
  height: 44px;
  place-items: center;
  border: 0;
  background: var(--yellow);
  color: #111;
}

.header-search > button i {
  width: 20px;
  height: 20px;
}

.marketplace-hero {
  min-height: 350px;
  box-shadow: none;
}

.marketplace-hero .hero-copy {
  max-width: 760px;
}

.marketplace-hero .hero-copy h1 {
  max-width: 700px;
  font-size: clamp(34px, 4.5vw, 58px);
}

.hero-quote-action {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(17, 17, 17, 0.55);
  color: white;
}

.marketplace-categories,
.catalog-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
}

.marketplace-categories {
  overflow: hidden;
}

.market-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.market-section-title h2 {
  margin: 0;
  font-size: 19px;
  text-transform: uppercase;
}

.market-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.category-market-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 148px;
  grid-template-rows: repeat(2, 128px);
  gap: 0;
  margin: 0;
  padding: 0;
  overscroll-behavior-inline: contain;
}

.category-market-grid .category-pill {
  display: grid;
  min-width: 0;
  min-height: 128px;
  place-content: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  text-align: center;
}

.category-market-grid .category-pill:hover,
.category-market-grid .category-pill.active {
  border-color: var(--line);
  background: #fff8d5;
  box-shadow: inset 0 0 0 2px var(--yellow);
}

.category-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f1f1ed;
  color: #222;
}

.category-pill.active .category-icon {
  background: var(--yellow);
}

.category-icon i {
  width: 25px;
  height: 25px;
}

.category-market-grid strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.3;
}

.category-market-grid small {
  color: var(--muted);
  font-size: 10px;
}

.catalog-panel {
  padding: 0;
}

.catalog-panel > .section-heading {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.marketplace-catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: #f3f3f1;
}

.catalog-filter-panel {
  align-self: start;
  display: grid;
  gap: 18px;
  background: white;
  border: 1px solid var(--line);
  padding: 16px;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}

.catalog-filter-panel label {
  display: grid;
  gap: 7px;
}

.catalog-filter-panel label > span,
.price-filter legend {
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 800;
}

.catalog-filter-panel select,
.price-filter input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: white;
  padding: 0 9px;
}

.price-filter {
  margin: 0;
  border: 0;
  padding: 0;
}

.price-filter legend {
  margin-bottom: 8px;
}

.price-filter > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.filter-reset {
  min-height: 40px;
  border: 1px solid #111;
  border-radius: 3px;
  background: #111;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-results {
  min-width: 0;
  scroll-margin-top: 112px;
}

#store-view.is-searching-products .store-hero,
#store-view.is-searching-products .service-band,
#store-view.is-searching-products .diy-home-feature,
#store-view.is-searching-products .marketplace-categories {
  display: none;
}

#store-view.is-searching-products .catalog-panel {
  margin-top: 10px;
}

.catalog-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 12px;
  background: #e8e8e5;
  padding: 9px 13px;
  font-size: 13px;
}

.catalog-sort-bar label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.catalog-sort-bar select {
  min-height: 38px;
  min-width: 190px;
  border: 1px solid #bdbdb8;
  border-radius: 3px;
  background: white;
  padding: 0 10px;
}

.marketplace-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.marketplace-product-grid .product-card {
  border-radius: 2px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.marketplace-product-grid .product-card:hover {
  transform: translateY(-2px);
  border-color: var(--yellow-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.marketplace-product-grid .product-image {
  aspect-ratio: 1;
}

.marketplace-product-grid .product-image img {
  object-fit: contain;
  background: white;
}

.marketplace-product-grid .stock-badge,
.marketplace-product-grid .featured-badge {
  top: 6px;
  min-height: 23px;
  border-radius: 2px;
  padding: 4px 6px;
  font-size: 9px;
}

.marketplace-product-grid .stock-badge {
  left: 6px;
}

.marketplace-product-grid .featured-badge {
  right: 6px;
}

.marketplace-product-grid .product-body {
  padding: 10px;
}

.marketplace-product-grid .product-meta {
  min-height: 16px;
  margin-bottom: 6px;
  font-size: 9px;
}

.product-name-link {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  text-align: left;
}

.marketplace-product-grid .product-body h3 {
  display: -webkit-box;
  min-height: auto;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.market-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 9px;
  color: #8c6900;
}

.market-price span {
  font-size: 10px;
  text-transform: uppercase;
}

.market-price strong {
  color: #b18400;
  font-size: 19px;
}

.credit-price {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.credit-price strong {
  color: #444;
}

.marketplace-product-grid .unit {
  min-height: 28px;
  margin: 7px 0 9px;
  font-size: 10px;
  line-height: 1.35;
}

.marketplace-product-grid .product-actions {
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 6px;
}

.marketplace-product-grid .product-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 11px;
}

.icon-only-action {
  width: 40px !important;
  padding: 0 !important;
}

.catalog-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.catalog-summary div {
  border: 1px solid var(--line);
  background: #f7f7f5;
}

.variant-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 4px;
}

.variant-option-grid button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: white;
  padding: 7px 8px;
  color: var(--ink);
  font-size: 12px;
}

.variant-option-grid button:hover,
.variant-option-grid button.active {
  border-color: var(--yellow-strong);
  background: #fff9df;
  box-shadow: inset 0 0 0 1px var(--yellow-strong);
}

.variant-option-grid button.unavailable {
  border-style: dashed;
  color: #9f1d1d;
  background: #fff7f7;
  opacity: 0.78;
  cursor: not-allowed;
}

.variant-option-grid button.unavailable:hover {
  border-color: var(--line);
  box-shadow: none;
}

.detail-quantity {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.detail-quantity > div {
  display: grid;
  grid-template-columns: 38px 60px 38px;
}

.detail-quantity button,
.detail-quantity input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  text-align: center;
}

.detail-quantity button {
  display: grid;
  place-items: center;
  padding: 0;
}

.detail-quantity button + input,
.detail-quantity input + button {
  border-left: 0;
}

.detail-quantity input {
  width: 60px;
}

.cart-outline-action {
  border-color: var(--yellow-strong);
  background: #fff9df;
  color: #5c4800;
}

.quote-outline-action {
  border-color: #222;
}

@media (min-width: 1240px) {
  main {
    width: min(1380px, calc(100% - 36px));
  }

  .marketplace-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .view-tabs {
    width: auto;
  }

  .marketplace-catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .filter-title {
    grid-column: 1 / -1;
  }

  .filter-reset {
    grid-column: 1 / -1;
  }

  .marketplace-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .announcement-bar {
    display: none;
  }

  /* Mobile storefront: compact marketplace flow so products appear early. */
  #store-view.active {
    display: flex;
    flex-direction: column;
  }

  #store-view .marketplace-hero {
    order: 1;
  }

  #store-view .marketplace-categories {
    order: 2;
  }

  #store-view .catalog-panel {
    order: 3;
  }

  #store-view .diy-home-feature {
    order: 4;
  }

  #store-view .service-band {
    order: 5;
  }

  #store-view .delivery-info,
  #store-view .reviews-panel,
  #store-view .store-footer {
    order: 6;
  }

  #store-view.is-searching-products .catalog-filter-panel,
  #store-view.is-searching-products .catalog-summary {
    display: none;
  }

  #store-view.is-searching-products .marketplace-catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-results {
    scroll-margin-top: 150px;
  }

  .topbar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .brand-mark {
    width: 48px;
    height: 42px;
    flex-basis: 48px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    max-width: 175px;
    white-space: normal;
    font-size: 12px;
    line-height: 1.2;
  }

  .view-tabs {
    gap: 2px;
  }

  .tab-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
  }

  .tab-button span {
    display: none;
  }

  .tab-button[data-view-target="plans"] {
    width: 62px;
    min-width: 62px;
    min-height: 48px;
    flex: 0 0 62px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .tab-button[data-view-target="plans"] span {
    display: block;
    max-width: 58px;
    overflow: hidden;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .tab-button b {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .header-search {
    height: 44px;
  }

  .header-search > button {
    height: 40px;
  }

  .marketplace-hero {
    min-height: 235px;
    grid-template-columns: 1fr;
    border-radius: 14px;
    background-position: center;
  }

  .marketplace-hero .hero-panel {
    display: none;
  }

  .marketplace-hero .hero-copy {
    align-self: end;
    padding: 18px;
  }

  .marketplace-hero .hero-copy h1 {
    max-width: 330px;
    margin-bottom: 7px;
    font-size: 25px;
    line-height: 1.02;
  }

  .marketplace-hero .hero-copy > p:not(.eyebrow) {
    display: none;
  }

  .marketplace-hero .hero-copy .eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .marketplace-hero .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 12px;
  }

  .marketplace-hero .hero-actions .primary-action,
  .marketplace-hero .hero-actions .secondary-action {
    min-height: 42px;
    padding: 0 10px;
    font-size: 11px;
  }

  .marketplace-hero .hero-actions > a {
    display: none;
  }

  #store-view .marketplace-categories,
  #store-view .catalog-panel {
    margin-top: 10px;
  }

  .market-section-title {
    min-height: 44px;
    padding: 9px 12px;
  }

  .market-section-title h2 {
    font-size: 14px;
  }

  .category-market-grid {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .category-market-grid::-webkit-scrollbar {
    display: none;
  }

  .category-market-grid .category-pill {
    flex: 0 0 84px;
    min-width: 84px;
    min-height: 86px;
    scroll-snap-align: start;
    gap: 5px;
    padding: 7px 5px;
  }

  .category-icon {
    width: 36px;
    height: 36px;
  }

  .category-icon i {
    width: 20px;
    height: 20px;
  }

  .category-market-grid strong {
    font-size: 10px;
    line-height: 1.15;
  }

  .category-market-grid small {
    display: none;
  }

  .catalog-panel > .section-heading {
    align-items: center;
    flex-direction: row;
    padding: 11px 10px;
  }

  .catalog-panel > .section-heading .eyebrow {
    display: none;
  }

  .catalog-panel > .section-heading h2 {
    font-size: 17px;
  }

  .catalog-panel > .section-heading .compact-action {
    width: auto;
    min-height: 36px;
    padding: 0 10px;
    font-size: 10px;
  }

  .marketplace-catalog-layout {
    gap: 6px;
    padding: 7px;
  }

  .catalog-filter-panel {
    display: none;
  }

  .catalog-sort-bar {
    min-height: 42px;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    margin-bottom: 7px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .catalog-sort-bar label {
    justify-content: flex-end;
    margin-left: auto;
  }

  .catalog-sort-bar label > span {
    display: none;
  }

  .catalog-sort-bar select {
    width: 132px;
    min-width: 0;
    min-height: 32px;
    padding: 0 6px;
    font-size: 11px;
  }

  .marketplace-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .marketplace-product-grid .product-body {
    padding: 8px;
  }

  .marketplace-product-grid .product-body h3 {
    font-size: 12px;
    line-height: 1.35;
  }

  .market-price strong {
    font-size: 16px;
  }

  .marketplace-product-grid .product-actions {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .marketplace-product-grid .product-actions button span {
    font-size: 10px;
  }

  .icon-only-action {
    width: 36px !important;
  }

  .catalog-summary {
    display: none;
  }

  #store-view .diy-home-feature {
    margin-top: 12px;
  }

  #store-view .service-band {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  #store-view .service-band::-webkit-scrollbar {
    display: none;
  }

  #store-view .service-band > div {
    flex: 0 0 78%;
    min-height: 108px;
    scroll-snap-align: start;
    padding: 13px;
  }

  #store-view .service-band > div strong {
    font-size: 14px;
  }

  #store-view .service-band > div span {
    font-size: 11px;
    line-height: 1.4;
  }

  .variant-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-info h2 {
    font-size: 24px;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .detail-actions .quote-outline-action {
    grid-column: 1 / -1;
  }

  .floating-actions a,
  .floating-actions button {
    width: 46px;
    min-width: 46px;
    padding: 0;
  }

  .floating-actions a span,
  .floating-actions button span {
    display: none;
  }

  .floating-actions button strong {
    position: absolute;
    top: -4px;
    right: -4px;
  }

  .quotation-request-grid {
    grid-template-columns: 1fr;
  }

  .quotation-page-layout,
  .quotation-form {
    grid-template-columns: 1fr;
  }

  .diy-home-feature,
  .diy-project-detail,
  .diy-detail-columns {
    grid-template-columns: 1fr;
  }

  .diy-home-feature > div {
    padding: 16px;
  }

  .diy-gallery {
    position: static;
  }

  .diy-spec-grid {
    grid-template-columns: 1fr;
  }

  .quotation-return-card {
    align-items: stretch;
    flex-direction: column;
  }

  .quotation-selection-panel {
    position: static;
  }

  .quotation-file-grid {
    grid-template-columns: 1fr;
  }

  .house-reference-file-list .quotation-file-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .quotation-file-preview {
    width: 64px;
    height: 58px;
  }

  .quotation-file-card > .secondary-action,
  .quotation-file-card > small {
    grid-column: 1 / -1;
  }
}
.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.text-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.text-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.password-requirements {
  color: #667085;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

/* Final header rules: keep these last so legacy responsive rules cannot override them. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.announcement-bar {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(180px, 1fr) auto;
  min-height: 66px;
  gap: clamp(14px, 2vw, 28px);
  padding: 7px clamp(18px, 3vw, 42px);
}

.announcement-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: white;
  text-align: left;
}

.announcement-brand-mark {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 199, 0, 0.68);
  border-radius: 11px;
  background: #050505;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.38);
}

.announcement-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.announcement-brand-text {
  display: block;
  min-width: 0;
}

.announcement-brand-text strong,
.announcement-brand-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-brand-text strong {
  font-size: 15px;
  line-height: 1.25;
}

.announcement-brand-text small {
  margin-top: 3px;
  color: #cfcfcf;
  font-size: 10px;
  font-weight: 700;
}

.announcement-message {
  color: #e8e8e8;
  font-size: 12px;
  text-align: center;
}

.announcement-contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.8vw, 24px);
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(300px, 1fr) auto;
  gap: clamp(12px, 2vw, 24px);
  padding: 12px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

main section,
main [id] {
  scroll-margin-top: 155px;
}

.header-search {
  min-width: 0;
}

.view-tabs {
  min-width: 0;
  width: auto;
  flex-wrap: nowrap;
  gap: clamp(3px, 0.65vw, 9px);
}

.tab-button {
  min-width: 0;
  padding-inline: clamp(8px, 0.8vw, 13px);
  white-space: nowrap;
}

.footer-brand .brand-mark {
  width: 70px;
  height: 70px;
  flex-basis: 70px;
  border-color: rgba(255, 199, 0, 0.55);
}

.footer-brand .brand-mark img {
  object-fit: contain;
}

@media (max-width: 1180px) {
  .announcement-bar {
    grid-template-columns: minmax(300px, 1fr) auto;
  }

  .announcement-message {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .header-search {
    grid-column: 1;
    grid-row: 1;
  }

  .view-tabs {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .announcement-bar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 6px 12px;
  }

  .announcement-brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .announcement-brand-text strong {
    max-width: 270px;
    font-size: 13px;
  }

  .announcement-brand-text small,
  .announcement-contacts a:last-child {
    display: none;
  }
}

@media (max-width: 620px) {
  .announcement-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .announcement-brand-text strong {
    max-width: 190px;
    white-space: normal;
    font-size: 11px;
    line-height: 1.15;
  }

  .announcement-contacts a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    justify-content: center;
    border: 1px solid rgba(255, 199, 0, 0.45);
    border-radius: 50%;
  }

  .announcement-contacts a span {
    display: none;
  }

  .topbar {
    top: 0;
    z-index: 100;
    grid-template-columns: 1fr;
    box-shadow: 0 7px 20px rgba(17, 17, 17, 0.14);
  }

  .header-search {
    grid-column: 1;
    grid-row: 1;
  }

  .view-tabs {
    grid-column: 1;
    grid-row: 2;
    justify-content: space-between;
  }
}
