/* Modal backdrop */
  .favset-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 25, 40, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding: 12px 20px;
  }
  .favset-modal-backdrop.favset-modal-show {
    display: flex;
  }

  /* Modal container */
  .favset-modal-container {
    background: #fff;
    width: 100%;
    max-width: 720px;
    max-height: 80vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow:
      0 4px 8px rgba(0, 0, 0, 0.1),
      0 12px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
  }

  /* Header */
  .favset-modal-header {
    background: #121535 !important;
    color: #fff;
    padding: 0px 0px;
    font-weight: 700;
    font-size: 1.375rem;
    user-select: none;
  }

  #favset-modal-header-title{
    color: #fff !important;
    margin: 15px;
    font-size: 1.25rem !important;
  }

  /* Body */
  .favset-modal-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex-grow: 1;
  }
  .favset-modal-body::-webkit-scrollbar {
    width: 6px;
  }
  .favset-modal-body::-webkit-scrollbar-track {
    background: transparent;
  }
  .favset-modal-body::-webkit-scrollbar-thumb {
    background-color: #004aad;
    border-radius: 3px;
  }

  /* Footer */
  .favset-modal-footer {
    background: #f9fbfd;
    padding: 16px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }

  /* Buttons */
  .favset-modal-btn {
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 22px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    user-select: none;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
  }
  .favset-modal-btn-primary {
    background-color: #004aad;
    color: white;
    box-shadow: 0 4px 10px rgb(0 74 173 / 0.2);
  }
  .favset-modal-btn-primary:hover:not(:disabled) {
    background-color: #003177;
    box-shadow: 0 6px 16px rgb(0 49 119 / 0.3);
  }
  .favset-modal-btn-secondary {
    background-color: #e7ecf8;
    color: #004aad;
  }
  .favset-modal-btn-secondary:hover {
    background-color: #c5d1f1;
  }
  .favset-modal-btn:disabled {
    background-color: #bcc6d4;
    cursor: not-allowed;
    box-shadow: none;
  }

  /* Step title */
  .favset-modal-step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #0d1e40;
  }
  .favset-modal-info-text {
    font-size: 1rem;
    color: #2d3b64;
    margin-bottom: 20px;
  }

  /* ====== Step 1: Categories grid & cards ====== */
  .favset-modal-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .favset-modal-category-item {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.06);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px 12px;
    color: #395584;
    transition:
      border-color 0.3s ease,
      box-shadow 0.3s ease,
      background-color 0.3s ease;
    user-select: none;
    outline-offset: 2px;
  }
  .favset-modal-category-item:hover:not(.favset-modal-selected) {
    border-color: #2561cc;
    box-shadow: 0 3px 10px rgb(37 97 204 / 0.15);
  }
  .favset-modal-category-item.favset-modal-selected {
    background-color: #eaf3ff;
    border-color: #004aad;
    box-shadow: 0 5px 20px rgb(0 74 173 / 0.3);
    color: #004aad;
  }

  /* ====== Step 3: Products grid & cards ====== */
  .favset-modal-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
    gap: 16px;
  }

  .favset-modal-product-item {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow:
      0 1px 4px rgb(0 0 0 / 0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    user-select: none;
    transition:
      border-color 0.3s ease,
      box-shadow 0.3s ease;
    overflow: hidden;
  }
  .favset-modal-product-item:hover:not(.favset-modal-selected) {
    border-color: #2561cc;
    box-shadow: 0 3px 10px rgb(37 97 204 / 0.15);
  }
  .favset-modal-product-item.favset-modal-selected {
    border-color: #004aad;
    background-color: #eaf3ff;
    box-shadow: 0 5px 20px rgb(0 74 173 / 0.3);
  }

  .favset-modal-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f0f3fa;
    border-bottom: 1px solid #e0e6f1;
  }

  .favset-modal-product-info {
    padding: 12px 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .favset-modal-product-name {
    font-weight: 700;
    font-size: 1rem;
    color: #113366;
    margin: 0;
    line-height: 1.2;
  }

  .favset-modal-product-category {
    font-size: 0.85rem;
    color: #556a9b;
  }

  .favset-modal-product-tags {
    font-size: 0.75rem;
    color: #7789ac;
    margin-top: auto;
    font-style: italic;
  }

  /* ====== Step 4: Preview ====== */
  .favset-modal-preview-block {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .favset-modal-preview-section {
    background: #f7faff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: inset 0 0 12px #dce9fc;
  }
  .favset-modal-preview-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 16px;
    color: #2d3b64;
  }
  /* Preview category item */
  .favset-modal-preview-category-item {
    display: inline-block;
    background: #dde8ff;
    color: #2e57c2;
    font-weight: 600;
    border-radius: 24px;
    font-size: 0.95rem;
    padding: 6px 16px;
    margin: 4px 6px 4px 0;
    user-select: none;
    box-shadow: 0 2px 6px rgb(46 87 194 / 0.25);
  }
  /* Preview product list grid */
  .favset-modal-preview-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 16px;
  }
  .favset-modal-preview-product-item {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow:
      0 1px 8px rgba(0,0,0,0.06);
    padding: 12px;
    align-items: center;
  }
  .favset-modal-preview-product-image {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    object-fit: contain;
    background: #f0f3fa;
    border-radius: 10px;
    border: 1.5px solid #cbd7fc;
  }
  .favset-modal-preview-product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .favset-modal-preview-product-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
    color: #113366;
  }
  .favset-modal-preview-product-category {
    font-size: 0.9rem;
    font-style: italic;
    color: #536498;
  }
  .favset-modal-preview-product-tags {
    font-size: 0.8rem;
    color: #7a89a9;
  }

  /* Responsive tweaks */
  @media (max-width: 576px) {
    .favset-modal-container {
      max-width: 100%;
      border-radius: 0;
      max-height: 80vh;
    }
    .favset-modal-body {
      padding: 16px 20px;
    }
    .favset-modal-footer {
      padding: 12px 20px;
      gap: 10px;
    }
  }
  @media (max-width: 400px) {
    .favset-modal-footer {
      flex-wrap: wrap;
      gap: 8px;
    }
    .favset-modal-btn {
      flex: 1 1 100%;
      padding: 14px;
      font-size: 1.1rem;
    }
  }