﻿.hdl-content-wrap:has(.hdl-dealer-wrap) {
  overflow-x: clip;
}

.hdl-dealer-wrap.hdl-container {
  display: block;
  width: min(1200px, calc(100% - 64px)) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 16px;
  margin-bottom: 48px;
  padding: 0;
  box-sizing: border-box;
}

/* Same pattern as .hdl-category-layout: first col = sidebar on the right in RTL */
.hdl-dealer-shell {
  display: grid;
  grid-template-columns: minmax(240px, 260px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hdl-dealer-sidebar {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #5a368c 0%, #45256e 55%, #2a1b45 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(42, 27, 69, 0.18);
  box-sizing: border-box;
}

.hdl-dealer-main {
  min-width: 0;
  max-width: 100%;
}

.hdl-dealer-sidebar__brand {
  display: grid;
  gap: 4px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}

.hdl-dealer-sidebar__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

.hdl-dealer-sidebar__brand strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.hdl-dealer-sidebar__brand span {
  font-size: 0.9rem;
  opacity: 0.85;
}

.hdl-dealer-sidebar__nav {
  display: grid;
  gap: 4px;
}

.hdl-dealer-sidebar__nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.hdl-dealer-sidebar__nav a:hover,
.hdl-dealer-sidebar__nav a.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.hdl-dealer-sidebar__logout {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px 10px 0 0;
  padding-top: 14px !important;
  color: #ffd7d7 !important;
}


.hdl-dealer-main__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hdl-dealer-main__head h1 {
  margin: 0 0 6px;
  color: #2a1b45;
  font-size: 1.55rem;
}

.hdl-dealer-main__head p {
  margin: 0;
  color: #5a368c;
}

.hdl-dealer-main__cart {
  align-self: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(90, 54, 140, 0.1);
  color: #45256e;
  font-weight: 600;
}

.hdl-dealer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hdl-dealer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: #5a368c;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
}

.hdl-dealer-action:hover {
  filter: brightness(1.06);
}

.hdl-dealer-action.is-ghost {
  background: rgba(90, 54, 140, 0.1);
  color: #45256e !important;
}

.hdl-dealer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.hdl-dealer-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(90, 54, 140, 0.12);
  box-shadow: 0 8px 24px rgba(42, 27, 69, 0.06);
}

.hdl-dealer-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f3eef9;
}

.hdl-dealer-card h2 {
  margin: 0;
  padding: 12px;
  font-size: 0.95rem;
  color: #2a1b45;
  line-height: 1.5;
}

.hdl-dealer-empty,
.hdl-dealer-note {
  color: #6b5b85;
}

.hdl-dealer-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(90, 54, 140, 0.12);
}

.hdl-dealer-table th,
.hdl-dealer-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(90, 54, 140, 0.08);
  color: #2a1b45;
  font-size: 0.95rem;
}

.hdl-dealer-table th {
  background: rgba(90, 54, 140, 0.06);
  color: #45256e;
  font-weight: 600;
}

.hdl-dealer-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(90, 54, 140, 0.1);
  color: #45256e;
}

.hdl-dealer-badge.is-processing {
  background: rgba(230, 160, 40, 0.16);
  color: #9a6a00;
}

.hdl-dealer-badge.is-processed {
  background: rgba(46, 160, 110, 0.12);
  color: #1f7a52;
}

.hdl-dealer-sidebar__count {
  display: inline-block;
  margin-right: 6px;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-style: normal;
  font-size: 0.78rem;
  text-align: center;
}

.hdl-dealer-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hdl-dealer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(42, 27, 69, 0.12);
}

.hdl-dealer-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hdl-dealer-inline-form input[type="number"] {
  width: 72px;
  border: 1px solid rgba(90, 54, 140, 0.22);
  border-radius: 8px;
  padding: 6px 8px;
}

.hdl-dealer-inline-form button,
.hdl-dealer-btn-danger {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #5a368c;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.hdl-dealer-btn-danger {
  background: #a12828;
}

.hdl-dealer-form textarea {
  width: 100%;
  border: 1px solid rgba(90, 54, 140, 0.22);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}

.hdl-dealer-add-order {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(90, 54, 140, 0.12);
}

.hdl-dealer-add-order__qty {
  display: grid;
  gap: 6px;
  color: #45256e;
  font-size: 0.9rem;
}

.hdl-dealer-add-order__qty input {
  width: 90px;
  border: 1px solid rgba(90, 54, 140, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
}

.hdl-dealer-add-order__btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: #5a368c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hdl-dealer-add-order__btn:hover {
  filter: brightness(1.06);
}

.hdl-dealer-add-order__link {
  color: #5a368c;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 4px;
}

.hdl-dealer-add-order__link:hover {
  text-decoration: underline;
}

.hdl-dealer-form {
  display: grid;
  gap: 12px;
  max-width: 480px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(90, 54, 140, 0.12);
}

.hdl-dealer-form label {
  display: grid;
  gap: 6px;
  color: #45256e;
  font-size: 0.92rem;
}

.hdl-dealer-form input {
  width: 100%;
  border: 1px solid rgba(90, 54, 140, 0.22);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
}

.hdl-dealer-form button {
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #5a368c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hdl-dealer-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(46, 160, 110, 0.12);
  color: #1f7a52;
}

.hdl-dealer-alert.is-error {
  background: rgba(200, 60, 60, 0.1);
  color: #a12828;
}

@media (max-width: 991.98px) {
  .hdl-dealer-shell {
    grid-template-columns: 1fr;
  }

  .hdl-dealer-sidebar {
    position: static;
  }

  .hdl-dealer-sidebar__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hdl-dealer-sidebar__logout {
    grid-column: 1 / -1;
    margin-top: 0;
    border-top: 0;
  }
}
