.commerce-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 46px;
}

[hidden] {
  display: none !important;
}

.commerce-hero,
.commerce-card {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(17, 22, 29, .94), rgba(10, 13, 18, .94));
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
}

.commerce-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.commerce-hero h1 {
  margin: 6px 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.08;
}

.commerce-hero p,
.commerce-muted {
  color: var(--muted);
  line-height: 1.55;
}

.commerce-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 18px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.commerce-card {
  padding: 20px;
}

.commerce-hero .commerce-card {
  padding: 14px 16px;
}

.auth-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.auth-card h2 {
  margin-bottom: 0;
}

.google-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  font-weight: 900;
  cursor: pointer;
}

.google-login span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-weight: 900;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(255,255,255,.12);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin-top: 8px;
}

.commerce-card h2,
.commerce-card h3 {
  margin: 0 0 14px;
}

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

.commerce-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .04);
}

.commerce-item strong {
  display: block;
  margin-bottom: 5px;
}

.commerce-item-actions,
.commerce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.customer-order-card {
  align-items: stretch;
  border-radius: 12px;
  padding: 18px;
}

.customer-order-main { display: grid; gap: 14px; }
.customer-order-head,
.customer-shipment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.customer-order-head .commerce-muted,
.customer-shipment span,
.customer-shipment small { display: block; margin-top: 4px; color: var(--muted); }
.customer-order-status,
.customer-shipment-state {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(226,31,47,.82);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.customer-order-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.customer-order-meta span,
.customer-order-items span {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
}
.customer-order-meta strong { color: var(--text); }
.customer-order-items { display: flex; flex-wrap: wrap; gap: 7px; }
.customer-order-items span { padding: 7px 9px; font-size: 12px; }
.customer-shipment {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  padding: 13px;
  background: rgba(255,255,255,.04);
}
.customer-shipment.is-in-transit { border-color: rgba(255,190,45,.42); background: rgba(255,190,45,.07); }
.customer-shipment.is-delivered { border-color: rgba(48,190,116,.5); background: rgba(48,190,116,.08); }
.customer-shipment.is-delivered .customer-shipment-state { background: #238a55; }
.customer-shipment.is-pending strong,
.customer-shipment-event > strong { display: block; margin: 0; }
.customer-shipment-event { margin-top: 12px; }
.customer-order-actions { align-content: flex-start; max-width: 260px; }
.customer-order-actions > * { width: 100%; text-align: center; }

@media (max-width: 760px) {
  .customer-order-card,
  .customer-order-meta { grid-template-columns: 1fr; }
  .customer-order-actions { max-width: none; }
  .customer-order-head,
  .customer-shipment-head { align-items: stretch; flex-direction: column; }
}

.commerce-item input,
.commerce-form input,
.commerce-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  outline: none;
}

.commerce-qty {
  max-width: 86px;
}

.commerce-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.commerce-total {
  font-size: 24px;
  font-weight: 900;
}

.commerce-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

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

.checkout-delivery-card {
  margin-bottom: 18px;
  padding: 24px;
}

.checkout-title-row {
  margin-bottom: 18px;
}

.checkout-title-row h2 {
  margin-bottom: 6px;
}

.checkout-title-row p {
  margin: 0;
}

.checkout-customer-access {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .035);
}

.checkout-guest-access {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.35fr);
  gap: 14px 20px;
  align-items: center;
}

.checkout-guest-access > div:first-child,
.checkout-logged-access {
  display: grid;
  gap: 5px;
}

.checkout-guest-access span,
.checkout-logged-access span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.checkout-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 9px;
}

.checkout-login-box {
  display: grid;
  gap: 9px;
}

.checkout-google-login {
  width: 100%;
  min-height: 44px;
}

.checkout-login-box .auth-divider {
  font-size: 12px;
}

.checkout-login-form input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  outline: none;
}

.checkout-login-status {
  min-height: 0;
}

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

.checkout-method-grid label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-weight: 800;
}

.checkout-address-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkout-address-grid input[name="deliveryStreet"] {
  grid-column: span 2;
}

.checkout-fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  padding: 12px;
}

.checkout-fieldset legend {
  padding: 0 6px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.postal-code-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.postal-code-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.postal-code-field small.is-success { color: #55d391; }
.postal-code-field small.is-error { color: #ff8791; }

.dhl-point-picker {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
  border: 1px solid rgba(255, 204, 0, .34);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 204, 0, .06);
  overflow: hidden;
  isolation: isolate;
}

.dhl-point-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dhl-point-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.dhl-point-picker.has-selection {
  border-color: rgba(85, 211, 145, .72);
  background: rgba(85, 211, 145, .08);
}

.dhl-point-picker.has-selection [data-dhl-selected-point] {
  color: #73e7a9;
  font-weight: 800;
}

.dhl-picker-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 12px;
  min-width: 0;
}

.dhl-map {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 320px;
  border-radius: 8px;
  background: #d7d7d7;
  overflow: hidden;
  isolation: isolate;
}

.dhl-map.leaflet-container { width: 100%; max-width: 100%; }

.dhl-map:empty { display: none; }

.dhl-point-list {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 7px;
  max-height: 230px;
  overflow-x: hidden;
  overflow-y: auto;
}

.dhl-point-option {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}

.dhl-point-option.is-selected { border-color: #ffcc00; background: rgba(255, 204, 0, .16); }
.dhl-point-option small { color: var(--muted); }
.dhl-point-option span,
.dhl-point-option small { overflow-wrap: anywhere; }

.commerce-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.commerce-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(226, 31, 47, .42);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(226, 31, 47, .12);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.commerce-status {
  min-height: 22px;
  color: var(--soft);
}

.commerce-status.is-success { color: #73e7a9; }
.commerce-status.is-error { color: #ff8791; }
.commerce-status a { color: #fff; text-decoration: underline; font-weight: 800; }

.commerce-form input.is-invalid,
.commerce-form select.is-invalid {
  border-color: #ff6976;
  box-shadow: 0 0 0 2px rgba(226, 31, 47, .18);
}

.checkout-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 14px;
}

.checkout-auth-note {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.checkout-auth-note a { color: var(--text); text-decoration: underline; font-weight: 800; }

.checkout-submit {
  min-width: 220px;
  min-height: 50px;
}

.checkout-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.leaflet-popup-content .dhl-map-select {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  background: #c81727;
  font-weight: 800;
  cursor: pointer;
}

.account-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, .045);
}

.account-menu button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--soft);
  background: rgba(255, 255, 255, .055);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.account-menu button.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(180deg, #f03545, var(--red-dark));
  box-shadow: 0 12px 28px rgba(226, 31, 47, .22);
}

.account-panel {
  display: none;
  width: 100%;
}

.account-panel.is-active {
  display: block;
}

.account-panel .commerce-card {
  width: 100%;
}

.account-panel .commerce-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

[data-account-panel="security"] .commerce-form {
  max-width: 560px;
}

.garage-photo-field {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, .04);
  color: var(--soft);
}

.garage-photo-field span {
  font-weight: 800;
}

.garage-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background:
    radial-gradient(circle at 80% 0%, rgba(226, 31, 47, .18), transparent 34%),
    rgba(255, 255, 255, .045);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
}

.garage-history {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.garage-history strong {
  color: var(--soft);
  margin: 0;
}

.garage-history span {
  line-height: 1.35;
}

html[data-theme="light"] .commerce-hero,
html[data-theme="light"] .commerce-card,
html[data-theme="light"] .commerce-item,
html[data-theme="light"] .garage-card,
html[data-theme="light"] .account-menu {
  background: rgba(255, 252, 246, .94);
  border-color: rgba(118, 92, 55, .14);
  box-shadow: 0 16px 36px rgba(87, 62, 33, .08);
}

html[data-theme="light"] .google-login,
html[data-theme="light"] .commerce-form input,
html[data-theme="light"] .commerce-form select,
html[data-theme="light"] .garage-photo-field,
html[data-theme="light"] .account-menu button {
  color: #32291f;
  border-color: rgba(118, 92, 55, .16);
  background: rgba(255,255,255,.72);
}

html[data-theme="light"] .account-menu button.is-active {
  color: #fff;
  background: linear-gradient(180deg, #f03545, var(--red-dark));
}

html[data-theme="light"] .auth-divider::before,
html[data-theme="light"] .auth-divider::after,
html[data-theme="light"] .garage-history {
  border-color: rgba(118, 92, 55, .13);
  background: transparent;
}

html[data-theme="light"] .commerce-muted,
html[data-theme="light"] .garage-card-body p,
html[data-theme="light"] .garage-history {
  color: #6b5a43;
}

.garage-card-photo {
  min-height: 150px;
  background: linear-gradient(135deg, rgba(226, 31, 47, .24), rgba(255, 255, 255, .06));
}

.garage-card-photo img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
}

.garage-card-photo.is-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .76);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.garage-card-body {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.garage-card-body h3 {
  margin: 0;
  font-size: 24px;
}

.garage-card-body p {
  margin: 0;
  color: var(--muted);
}

.garage-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.commerce-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(11, 14, 19, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

.commerce-toast[hidden] {
  display: none;
}

.cart-badge {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(226, 31, 47, .9);
  color: #fff;
  font-size: 12px;
}

.catalog-card-detail-button {
  width: 100%;
}

@media (max-width: 880px) {
  .commerce-hero,
  .commerce-grid,
  .commerce-form-grid,
  .checkout-method-grid,
  .dhl-picker-content,
  .checkout-action-row,
  .checkout-guest-access,
  .checkout-login-form {
    grid-template-columns: 1fr;
  }

  .checkout-delivery-card { padding: 16px; }

  .checkout-address-grid input[name="deliveryStreet"] { grid-column: auto; }

  .checkout-submit { width: 100%; }

  .commerce-shell {
    width: min(100% - 20px, 1180px);
    margin-top: 16px;
  }

  .dhl-point-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dhl-point-head .outline { width: 100%; }

  .dhl-map { height: 240px; }

  .commerce-hero {
    gap: 12px;
    padding: 14px;
  }

  .commerce-hero h1 {
    font-size: 22px;
  }

  .section-title-row {
    display: grid;
    gap: 8px;
  }

  .account-menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: thin;
  }

  .account-menu button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }

  .account-panel .commerce-form-grid {
    grid-template-columns: 1fr;
  }

  .garage-card {
    grid-template-columns: 1fr;
  }
}
