
  /* Editor Css */
  .cropper-container img,
  .cropper-canvas img,
  .cropper-view-box img,
  #editImage {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
  }

  .main-image-editor {
    background-color: #e0e5ec;
  }

  .soft-shadow {
    box-shadow: 0 20px 40px rgb(4 137 245 / 11%);
    border: none;
    border-radius: 20px;
  }

  .psdropzone {
    border: 2px dashed rgba(110, 86, 246, 0.35);
    border-radius: 16px;
    background: radial-gradient(
        1200px 300px at 20% -10%,
        rgba(110, 86, 246, 0.1),
        transparent 60%
      ),
      radial-gradient(
        1200px 300px at 120% 110%,
        rgba(255, 106, 74, 0.1),
        transparent 60%
      );
  }

  .psdropzone.highlight {
    background: rgba(74, 144, 226, 0.1);
    border-color: #0489f5;
    transform: scale(1.02);
  }

  .preview-frame-container {
    position: relative;
    width: 100%;
  }

  .preview-frame-container img.frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
        border-bottom-left-radius: 0px !important;
    border-bottom-right-radius: 0px !important;

  }

  .frame-fill {
    position: absolute;
    background: #fff;
  }

  .frame-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  #editImageContainer {
    max-height: 35vh;

    position: relative;
    overflow: hidden;
    background: #e0e5ec;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  #editImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #editFrameOverlay {
    position: absolute;
    pointer-events: none;
    z-index: 5;
  }

  .cropper-view-box,
  .cropper-face {
    border: none !important;
    background: #a8cbcf !important;
  }

  .cropper-crop-box {
    border: 2px dotted rgb(3, 146, 255) !important;
  }

  /* Filters rail (Swiper) */
  #filtersSwiperContainer {
    background: var(--rail-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 0.75rem 0.25rem;
    min-height: 120px;
    width: 100%;
    position: relative;
  }

  #filtersRail.swiper-wrapper {
    display: flex;
  }

  .filter-chip-wrapper {
    width: 70px !important;
    text-align: center;
    flex-shrink: 0;
    flex-grow: 0;
    height: auto;
    cursor: grab;
  }

  .filter-radio-input {
    display: none;
  }

  .filter-label-visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    user-select: none;
  }

  .filter-thumb-container {
    display: block;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    background: #1f2937;
    position: relative;
    transition: all 0.2s ease;
  }

  .filter-radio-input:checked + .filter-label-visible .filter-thumb-container {
    outline: 3px solid #0489f5;
    box-shadow: 0 0 10px rgba(110, 86, 246, 0.5);
  }

  .filter-name {
    font-size: 12px;
    margin-top: 0.5rem;
    color: var(--muted);
  }

  .filter-radio-input:checked + .filter-label-visible .filter-name {
    color: #000;
    font-weight: 700;
  }

  #filtersSwiperContainer .swiper-button-prev,
  #filtersSwiperContainer .swiper-button-next {
    color: #0489f5 !important;
    top: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin-top: -10px !important;
  }

  #filtersSwiperContainer .swiper-button-prev::after,
  #filtersSwiperContainer .swiper-button-next::after {
    font-size: 14px !important;
  }

  .tool-btn {
    --h: 44px;
    height: var(--h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    touch-action: manipulation;
  }

  .tool-btn:active {
    transform: translateY(1px);
  }

  .tool-btn.primary {
    background: var(--cta-grad);
    color: #fff;
    border: 0;
  }

  .tool-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  .tools-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }

  .delete-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    border: none;
    border-radius: 33%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .delete-btn.preview-action {
    /* New class for external wiring */
    cursor: pointer;
  }

  /* Zoom slider */
  .form-range {
    appearance: none;
    height: 35px;
    padding: 0 8px;
    background: transparent;
  }

  .form-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(currentColor, currentColor) left/var(--fill, 0%)
        100% no-repeat,
      rgba(0, 0, 0, 0.12);
  }

  .form-range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
  }

  .form-range::-webkit-slider-thumb {
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0489f5;
    border: 0;
    margin-top: -10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }

  .form-range:active::-webkit-slider-thumb {
    transform: scale(1.06);
  }

  .form-range::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: #0489f5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }

  #imageProcessingOverlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
  }

  #imageProcessingOverlay.is-active {
    opacity: 1;
    visibility: visible;
  }

  .nav-pills .nav-link.active,
  .nav-pills .show > .nav-link {
    background-color: #0489f5;
    border-radius: 12px;
    color: #fff !important;
  }

  .ps-neomorphism {
    background: linear-gradient(133.21deg, #f7f7f7 -2.44%, #f9f9f9 135.62%);
    box-shadow: -6px -6px 8px rgba(255, 255, 255, 0.8), -2px -1px 8px #ffffff,
      2px 2px 10px rgba(255, 255, 255, 0.25),
      -4px -4px 20px rgba(255, 255, 255, 0.8),
      1px 1px 5px rgba(185, 185, 185, 0.6), 4px 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
  }

  .cropper-modal {
    background-color: #e0e5ec !important;
    opacity: 1 !important;
  }

  @media (min-width: 992px) {
    #editModal #editImageContainer {
      max-height: 49vh;
    }
  }

  .preview-card.highlight-edited {
    border: 5px solid #0489f5 !important;
    border-radius: 0% !important;
  }

  #previews.swiper-mode {
    padding: 0; /* Remove padding for edge-to-edge Swiper look */
    margin: 0 -10px; /* Adjust to visually center slides */
  }

  /* Define the size of the Swiper slide containing the polaroid-card */
  #previewSwiperWrapper .swiper-slide-preview {
    /* Set a maximum width for the image card */
    width: 200px; /* Adjust this value (e.g., 200px to 300px) to control size */
    flex-shrink: 0;
    margin-bottom: 20px; /* Add some space below the card if container has padding */
  }

  /* Override the polaroid-card max-width for the inline swiper */
  #previewSwiperWrapper .polaroid-card {
    width: 100%;
    /* Remove the isolation for simpler rendering if needed, or keep it */
    isolation: initial; 
  }

  /* Make sure the image frames scale correctly within the slide */
  #previewSwiperWrapper .polaroid-card img.frame {
    width: 100%;
  }

  /* Simple List mode styling */
  .preview-list-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Spacing between list items */
  }

  .preview-list-item .polaroid-card {
    max-width: 300px; /* Constraint for the card in list view */
    margin: 0;
  }

  

 
