/**
 * Photo Art Creator - Wallpaper-style Layout
 * Clean, simple two-column design matching wallpaper product page
 */

/* Reset for Photo App */
#photoApp {
  display: block;
  clear: both;
  /* Clear any floats */
  margin-top: 0;
  /* Ensure no negative margin */
}

#photoApp *,
#photoApp *::before,
#photoApp *::after {
  box-sizing: border-box;
}

/* Product Container */
.product-container {
  max-width: 100%;
  /* Full width for split background */
  margin: 0;
  padding: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 0;
  margin-bottom: 0;
  width: 100%;
  min-height: calc(100vh - 80px);
  background: #f5f1e9;
  /* Fill remaining height */
}

.product-grid>div {
  min-width: 0
}

/* ============================================
   LEFT COLUMN - CANVAS PREVIEW
   ============================================ */

.product-gallery {
  width: 100%;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  padding: 20px 40px 40px;
  box-sizing: border-box;
  z-index: 10;
}

/* Canvas Preview Container */
.canvas-preview-container {
  position: relative;
  margin-bottom: 10px;
  background: transparent;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: visible;
  padding: 40px 100px 20px;
  gap: 30px;
  transition: all 0.3s ease-in-out;
}

/* Poster with dimension indicators */
#photoApp .poster-with-dimensions {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

/* Canvas Wrapper - displays poster scaled for screen */
#photoApp .canvas-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  max-height: 100%;
  /* Smooth morphing transitions */
  /* transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
}

/* Inner shadow effects when frame is selected - makes poster look recessed */

/* Scenario 1: Frame selected + NO border - shadow on canvas/image using ::after overlay */
#photoApp .canvas-container.has-frame:not(.has-border),
#photoApp .canvas-wrapper.has-frame:not(.has-border) {
  position: relative;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  /* Keep outer shadow for depth */
}

#photoApp .canvas-container.has-frame:not(.has-border)::after,
#photoApp .canvas-wrapper.has-frame:not(.has-border)::after {
  content: '';
  position: absolute;
  top: var(--frame-thickness, 28px);
  left: var(--frame-thickness, 28px);
  right: var(--frame-thickness, 28px);
  bottom: var(--frame-thickness, 28px);
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3),
    inset 0 0 10px rgba(0, 0, 0, 0.2),
    inset 0 0 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Scenario 2: Frame AND border selected - shadow on border using ::after inset by border width */
#photoApp .canvas-container.has-frame.has-border,
#photoApp .canvas-wrapper.has-frame.has-border {
  position: relative;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  /* Keep outer shadow for depth */
}

#photoApp .canvas-container.has-frame.has-border::after,
#photoApp .canvas-wrapper.has-frame.has-border::after {
  content: '';
  position: absolute;
  top: var(--frame-thickness, 28px);
  left: var(--frame-thickness, 28px);
  right: var(--frame-thickness, 28px);
  bottom: var(--frame-thickness, 28px);
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3),
    inset 0 0 10px rgba(0, 0, 0, 0.2),
    inset 0 0 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

#photoApp .canvas-wrapper canvas {
  display: block;
  /* Scale canvas to fit container while maintaining aspect ratio */
  max-width: 100%;
  max-height: min(100%, calc(100vh - 250px));
  width: auto;
  height: auto;
  cursor: grab;
  /* Claim all touch gestures so mobile browsers deliver touchmove to JS
     instead of treating drags on the canvas as native page scroll. */
  touch-action: none;
  /* Smooth morphing transitions for canvas dimensions */
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Optimize text rendering on scaled canvas */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  font-smooth: never;
  -webkit-font-smoothing: antialiased;
}

#photoApp .canvas-wrapper canvas:active {
  cursor: grabbing;
}

@media (max-width: 768px) {

  .product-grid {
    padding-top: 12px;
  }

  /* Constrain the wrapper (not the canvas) so the box-shadow hugs the
     poster instead of drawing around empty space inside the wrapper. */
  #photoApp .poster-with-dimensions {
    max-width: 88%;
  }

  #photoApp .canvas-preview-container {
    padding: 0px 20px;
  }

  #photoApp .canvas-wrapper {
    /* Dynamic aspect ratio set via :style in preview.php */
  }

  #photoApp .canvas-wrapper canvas {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 30px);
  }
}

/* Loading Screen - Premium Glassmorphism */
#photoApp .loading-screen {
  position: absolute;
  inset: 0;
  background: rgba(245, 241, 233, 0.7);
  /* Warmer, more transparent tone */
  backdrop-filter: blur(12px) saturate(180%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#photoApp .loading-screen::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-top: 3px solid #333;
  border-right: 3px solid #333;
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Preview Bottom Row - Mobile only wrapper (desktop uses absolute-positioned toolbar) */
.preview-bottom-row {
  display: none;
  box-sizing: border-box;
}


/* ============================================
   RIGHT COLUMN - PRODUCT DETAILS
   ============================================ */

.product-details {
  padding: 0;
  /* Generous padding for clean look */
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  /* Pure white background */
  min-height: calc(100vh - 80px);
}

@media (min-width: 768px) {
  .product-details {
    padding: 30px 40px;
  }
}

@media (max-width: 992px) {
  .product-details {
    padding: 3px;
  }
}

.product-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 30px 0 15px;
  line-height: 1.3;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.product-description {
  margin-bottom: 20px;
}

.product-description p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #666;
  margin-bottom: 10px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0 0;
  margin-top: 15px;
  border-top: 1px solid #eee;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #666;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.trust-badge svg {
  width: 16px;
  height: 16px;
  color: #28a745;
}

/* Customization Section */
.customization-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.5px;
}

.customization-section p {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.8rem;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* Settings Menu Tabs */
#photoApp .settings-menu-wrap {
  position: relative;
}

#photoApp .settings-menu {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
  list-style: none;
  padding: 0;
  margin-top: 0;
}

.settings-menu li {
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #999;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -1px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: transparent;
}

.settings-menu li:hover {
  color: #333;
}

.settings-menu li.selected {
  color: #333;
  border-bottom-color: #333;
}

/* Panel Content */
#photoApp .pa-panels {
  /* display: block; */
  list-style: none;
  padding: 0;
  margin: 0;
}

#photoApp .pa-panels>li {
  /* Let Vue's v-show handle visibility */
  max-width: 800px;
  width: 100%;
}

#photoApp .panel-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

#photoApp .panel-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-row>label,
#photoApp .row-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #333;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.5px;
}

#photoApp .panel-section-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #333;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  margin-bottom: 2px;
}

#photoApp .panel-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 20px 0;
}

/* Filter Grid */
#photoApp .filter-grid-wrapper {
  position: relative;
}

#photoApp .filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 6px;
  overflow-x: visible;
  padding: 10px 0;
  justify-content: space-between;
}

@media (max-width: 768px) {
  #photoApp .filter-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but allow scrolling */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #photoApp .filter-grid::-webkit-scrollbar {
    display: none;
  }
}

#photoApp .filter-scroll-hint {
  display: none;
}

#photoApp .filter-option {
  width: calc(20% - 6px);
  min-width: 70px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  padding: 4px 2px;
}

@media (max-width: 768px) {
  #photoApp .filter-option {
    width: 75px;
    min-width: 75px;
  }
}

#photoApp .filter-option:hover .filter-preview {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#photoApp .filter-option.active .filter-preview {
  border-color: #000 !important;
  border-width: 2px !important;
}

#photoApp .filter-option.active .filter-name {
  color: #000;
  font-weight: 700;
}

#photoApp .filter-preview {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #eee;
  flex-shrink: 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filter skeleton shimmer */
@keyframes filterSkeletonShimmer {
  0% {
    background-position: -200px 0;
  }

  100% {
    background-position: calc(200px + 100%) 0;
  }
}

#photoApp .filter-option.filter-skeleton {
  pointer-events: none;
}

#photoApp .filter-option.filter-skeleton .filter-preview {
  background-color: #e8e8e8;
  background-image: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 50%, #e8e8e8 75%);
  background-size: 400px 100%;
  animation: filterSkeletonShimmer 1.4s ease-in-out infinite;
}

#photoApp .filter-name {
  font-size: 0.6rem;
  font-weight: 600;
  color: #999;
  text-align: center;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  max-width: 70px;
  word-break: break-word;
  transition: color 0.2s ease;
  margin-top: 6px;
}

#photoApp .filter-option.active .filter-preview span {
  display: none;
  padding: 8px 6px;
}

#photoApp .filter-option.active .filter-preview::after {
  display: none;
}

#photoApp .new-badge {
  display: none !important;
}

/* Slider Row (label + value above, track in middle, range labels below) */
#photoApp .slider-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
}

#photoApp .slider-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

#photoApp .slider-header .panel-section-label {
  margin-bottom: 0;
}

#photoApp .slider-value {
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #333;
  font-variant-numeric: tabular-nums;
}

#photoApp .slider-range {
  display: flex;
  justify-content: space-between;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #a8a097;
  font-variant-numeric: tabular-nums;
  margin-top: -4px;
}

/* Range input — bold black filled portion on the left + soft cream unfilled track */
#photoApp .panel-row input[type="range"],
#photoApp .ui-slider {
  width: 100%;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: linear-gradient(to right,
      #1a1a1a 0%,
      #1a1a1a var(--slider-progress, 0%),
      #e8e1d2 var(--slider-progress, 0%),
      #e8e1d2 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

#photoApp .ui-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}

#photoApp .ui-slider::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

#photoApp .ui-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #1a1a1a;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#photoApp .ui-slider::-webkit-slider-thumb:hover,
#photoApp .ui-slider:active::-webkit-slider-thumb {
  transform: scale(1.08);
}

#photoApp .ui-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1a1a;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#photoApp .ui-slider:focus {
  outline: none;
}

/* Border & Text Controls */
#photoApp .border-text-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#photoApp .border-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Suppress transitions during initial Vue mount to prevent flash */
#photoApp.no-transition * {
  transition: none !important;
}

/* Pill-Shaped Layout Toggle */
#photoApp .layout-pill-toggle {
  display: flex;
  background: #f5f1e9;
  padding: 4px;
  border-radius: 50px;
  border: 1px solid #e9ecef;
  width: 100%;
  margin-top: 5px;
}

#photoApp .layout-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 9px 11px;
  text-align: center;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

#photoApp .layout-option.active {
  background: #2c2c2c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#photoApp .layout-option:not(.active):hover {
  color: #333;
}

/* Border Color Options */
#photoApp .border-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#photoApp .border-color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: #555;
  flex: 1 1 calc(33.333% - 6px);
  min-width: 88px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  transition: all 0.2s ease;
}

#photoApp .border-color-option:hover {
  border-color: #333;
  color: #333;
}

#photoApp .border-color-option.active {
  border-color: #333;
  color: #333;
}

#photoApp .border-color-option .color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#photoApp .color-swatch-name {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#photoApp .font-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.border-pill-btn,
#photoApp .font-sample-btn {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.border-pill-btn:hover,
#photoApp .font-sample-btn:hover {
  border-color: #333;
  color: #333;
}

#photoApp .border-pill-btn.active,
#photoApp .font-sample-btn.active {
  background: #333 !important;
  border-color: #333 !important;
  color: #fff !important;
}

#photoApp .font-sample-btn {
  font-size: 1.2rem;
  padding: 12px;
}

#photoApp .font-sample-btn.no-text-btn {
  font-size: 1.2rem;
  color: #999;
}

#photoApp .font-sample-btn.no-text-btn.active {
  color: #fff !important;
}

/* Text Inputs */
#photoApp .text-input-wrapper {
  position: relative;
}

#photoApp .text-input-field {
  width: 100%;
  padding: 8px 32px 8px 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #333;
  transition: all 0.2s ease;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

#photoApp .text-input-field:focus {
  outline: none;
  border-color: #333;
}

#photoApp .text-input-field::placeholder {
  color: #adb5bd;
}

#photoApp .text-input-field:disabled {
  background: #f8f9fa;
  color: #adb5bd;
  cursor: not-allowed;
}

#photoApp .border-text-row.disabled {
  opacity: 0.5;
}

#photoApp .clear-text-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  cursor: pointer;
  transition: color 0.3s ease;
  background: transparent;
  border: none;
  padding: 0;
}

#photoApp .clear-text-btn i {
  font-size: 16px;
  display: inline-block !important;
  visibility: visible !important;
}

#photoApp .clear-text-btn:hover {
  color: #333;
}

/* Orientation & Size Controls */
#photoApp .orientation-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

#photoApp .orientation-btn {
  padding: 8px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#photoApp .orientation-btn:hover {
  border-color: #333;
  color: #333;
}

#photoApp .orientation-btn.active {
  background: #333 !important;
  border-color: #333 !important;
  color: #fff !important;
}

#photoApp .size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#photoApp .size-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  white-space: nowrap;
}

#photoApp .size-pill .quality-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
}

#photoApp .size-pill:hover {
  border-color: #333;
  color: #333;
}

/* Layout Toggle (Posterdesign / Utfallande) */
#photoApp .layout-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

#photoApp .layout-btn {
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  transition: all 0.2s ease;
}

#photoApp .layout-btn:hover {
  border-color: #333;
  color: #333;
}

#photoApp .layout-btn.active {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* Frame Selection Grid */
#photoApp .frame-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

#photoApp .frame-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: #555;
  text-align: left;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  transition: all 0.2s ease;
}

#photoApp .frame-option:hover {
  border-color: #333;
  color: #333;
}

#photoApp .frame-option.active {
  border-color: #333;
  border-width: 2px;
  color: #333;
}

#photoApp .frame-option--none {
  grid-column: 1 / -1;
}

#photoApp .frame-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#photoApp .frame-option__name {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#photoApp .frame-option__price {
  font-size: 0.65rem;
  color: #999;
  white-space: nowrap;
}

#photoApp .size-pill.active {
  background: #333 !important;
  border-color: #333 !important;
  color: #fff !important;
}

/* Frame Selector */
#photoApp .frame-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  padding: 5px;
}

#photoApp .frame-selector::-webkit-scrollbar {
  height: 4px;
}

#photoApp .frame-selector::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 2px;
}

#photoApp .frame-selector::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

#photoApp .frame-selector::-webkit-scrollbar-thumb:hover {
  background: #333;
}

#photoApp .frame-selector .frame-option {
  min-width: 80px;
  width: 80px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

#photoApp .frame-selector .frame-option:hover {
  transform: translateY(-1px);
}

#photoApp .frame-selector .frame-option:hover .frame-thumbnail {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#photoApp .frame-selector .frame-option.active .frame-thumbnail {
  border-color: #333 !important;
  border-width: 3px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

#photoApp .frame-selector .frame-option.active {
  transform: translateY(-2px);
}

#photoApp .frame-selector .frame-option.active .frame-name {
  color: #333 !important;
  font-weight: 700 !important;
}

#photoApp .frame-option.active .frame-thumbnail::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  background: #333;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#photoApp .frame-thumbnail {
  width: 80px;
  height: 80px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.frame-thumbnail i {
  font-size: 1.2rem;
  color: #adb5bd;
}

#photoApp .frame-name {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 2px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.3px;
}

#photoApp .frame-price {
  font-size: 0.7rem;
  font-weight: 600;
  color: #333;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 20px;
}

#photoApp .btn:disabled {
  background: #e9ecef !important;
  border-color: #e9ecef !important;
  color: #adb5bd !important;
  cursor: not-allowed;
}

/* Keep black button black while cart is loading (overrides grey disabled style). */
#photoApp .btn--black:disabled {
  background: #111 !important;
  border-color: #111 !important;
  opacity: 0.75;
}

#photoApp .btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-right-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

#photoApp .btn-upload-new {
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #333;
  border: 2px solid #333;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.5px;
  margin-top: 10px;
}

#photoApp .btn-upload-new:hover {
  background: #333;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#photoApp .upload-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  justify-self: center;
  margin: 4px 0 0;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid #1a1a1a;
  border-radius: 999px;
  color: #1a1a1a;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#photoApp .upload-new-btn svg {
  width: 0.95em;
  height: 0.95em;
}

#photoApp .upload-new-btn:hover,
#photoApp .upload-new-btn:focus {
  background: #1a1a1a;
  color: #fff;
  outline: none;
}

#photoApp .delivery-info {
  display: none;
}

/* Info Accordion */
#photoApp .info-accordion {
  margin-top: 30px;
  border-top: 1px solid #eee;
}

#photoApp .accordion-item {
  border-bottom: 1px solid #eee;
}

#photoApp .accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

#photoApp .accordion-header:hover {
  color: #666;
}

#photoApp .accordion-header i {
  font-size: 0.65rem;
  color: #999;
}

#photoApp .accordion-content {
  padding: 0 0 16px 0;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.8rem;
  color: #666;
  line-height: 1.6;
  text-align: left !important;
}

#photoApp .accordion-content p,
#photoApp .accordion-content ul,
#photoApp .accordion-content li {
  text-align: left !important;
}

#photoApp .accordion-content p {
  margin: 0;
}

#photoApp .accordion-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#photoApp .accordion-content ul li {
  padding: 4px 0;
  position: relative;
  padding-left: 12px;
}

#photoApp .accordion-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #999;
}

#photoApp .accordion-content ul.price-list li {
  display: flex;
  justify-content: space-between;
  padding-left: 0;
}

#photoApp .accordion-content ul.price-list li::before {
  display: none;
}

#photoApp .accordion-content .faq-item {
  margin-bottom: 12px;
}

#photoApp .accordion-content .faq-item:last-child {
  margin-bottom: 0;
}

#photoApp .accordion-content .faq-item strong {
  display: block;
  color: #333;
  margin-bottom: 4px;
}

#photoApp .accordion-content .faq-item p {
  margin: 0;
}

/* Price Display */
#photoApp .price-display {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.price-display .price-label {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.price-display .price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* ============================================
   INFORMATION TABS SECTION
   ============================================ */

.info-tabs-section {
  margin-top: 80px;
  border-top: 2px solid #e9ecef;
  padding-top: 40px;
}

.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 40px;
  overflow-x: auto;
}

.tab-navigation li {
  padding: 15px 25px;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.tab-navigation li:hover {
  color: #333;
}

.tab-navigation li.active {
  color: #333;
  border-bottom-color: #333;
}

.tab-content {
  padding: 0;
  background: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel[style*="display: block"] {
  display: block !important;
}

.tab-panel h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.tab-panel h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 30px 0 15px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.tab-panel p {
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 15px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.tab-panel ul {
  padding-left: 20px;
  list-style: disc;
}

.tab-panel ul li {
  padding: 8px 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* Price Tables */
.price-table {
  margin-bottom: 40px;
}

.price-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.price-table thead {
  background: #333;
  color: white;
}

.price-table th,
.price-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

.price-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.price-table td {
  font-size: 1rem;
  color: #333;
}

.price-table tbody tr {
  background: white;
}

.price-table tbody tr:hover {
  background: #f8f9fa;
}

/* FAQ Items */
.faq-item {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
}

.faq-item h4 {
  color: #333;
  margin-top: 0 !important;
}

.faq-item p {
  margin-bottom: 0;
}

/* Spec Groups */
.spec-group {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
}

.spec-group h4 {
  margin-top: 0 !important;
}

/* Delivery Sections */
.delivery-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
}

.delivery-section:last-child {
  border-bottom: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .product-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {

  .product-grid {
    grid-template-columns: auto;
    gap: 0;
  }


  .product-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 0;
  }

  .main-image-container {
    min-height: 400px;
    flex: none;
  }

  .product-title {
    font-size: 1.3rem;
    margin-top: 20px;
  }

  .customization-section {
    padding: 15px;
  }

  /* Border & Text Panel Tablet Adjustments */
  .border-pill-btn,
  #photoApp .font-sample-btn {
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  #photoApp .font-sample-btn {
    font-size: 1.1rem;
    padding: 11px 10px;
  }

  /* Size & Frame Panel Tablet Adjustments */
  #photoApp .orientation-btn {
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  #photoApp .size-pill {
    padding: 7px 11px;
    font-size: 0.7rem;
  }

  .settings-menu li {
    font-size: 0.65rem;
    padding: 8px 8px;
  }

  .tab-navigation {
    flex-wrap: wrap;
  }

  .tab-navigation li {
    flex: 1 0 50%;
    text-align: center;
    font-size: 0.8rem;
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {

  .product-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 0;
  }

  .main-image-container {
    min-height: 300px;
    border-radius: 8px;
    flex: none;
  }

  .product-title {
    font-size: 1.2rem;
    margin-top: 15px;
  }

  .product-description p {
    font-size: 0.85rem;
  }

  .customization-section {
    padding: 12px;
  }

  #photoApp .panel-container {
    gap: 18px;
  }

  #photoApp .panel-row {
    gap: 8px;
  }

  .filter-option {
    min-width: 90px;
    width: 90px;
    height: 90px;
  }

  .frame-option {
    min-width: 90px !important;
    width: 90px !important;
  }

  .frame-thumbnail {
    width: 90px !important;
    height: 90px !important;
  }

  /* Border & Text Panel Mobile Adjustments */
  #photoApp .border-buttons,
  #photoApp .font-buttons {
    gap: 4px;
  }

  .border-pill-btn,
  #photoApp .font-sample-btn {
    padding: 6px 8px;
    font-size: 0.65rem;
  }

  #photoApp .font-sample-btn {
    font-size: 1rem;
    padding: 10px 8px;
  }

  #photoApp .text-input-field {
    padding: 6px 28px 6px 10px;
    font-size: 0.7rem;
  }

  /* Size & Frame Panel Mobile Adjustments */
  #photoApp .orientation-toggle {
    gap: 4px;
  }

  #photoApp .orientation-btn {
    padding: 6px 8px;
    font-size: 0.65rem;
  }

  #photoApp .size-pills {
    gap: 4px;
  }

  #photoApp .size-pill {
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .settings-menu li {
    font-size: 0.6rem;
    padding: 6px 4px;
  }

  .tab-navigation li {
    flex: 1 0 100%;
    font-size: 0.75rem;
    padding: 10px;
  }


}

@media (min-width: 769px) {

  #photoApp .photo-sheet,
  #photoApp .sheet-backdrop {
    display: none !important;
  }
}

/* Utility Classes */
.portrait .canvas-container canvas,
.landscape .canvas-container canvas {
  display: block !important;
  visibility: visible !important;
}

/* Filter Description */
#photoApp .filter-description {
  background: #f8f9fa;
  padding: 10px 12px;
  margin-top: 10px;
}

.filter-description p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #666;
  margin: 0;
}

/* Size Info */
#photoApp .size-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.size-info p {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 10px;
}

#photoApp .size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

#photoApp .size-guide-link:hover {
  text-decoration: underline;
}

/* Additional Panel Styles */
#photoApp .b-form {
  all: initial;
  display: block;
}

#photoApp .panel-actions {
  margin-top: auto;
}

#photoApp .price-breakdown {
  display: none;
}

/* Quality zone — quality pill + upload button, sits below the poster in normal flow */
#photoApp .quality-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Quality Overlay - Pill badge (desktop only) */
#photoApp .quality-overlay {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 10px 22px 10px 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  white-space: nowrap;
}

#photoApp .quality-overlay:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* "KVALITET" eyebrow label */
#photoApp .quality-overlay .quality-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: 0.08em;
  white-space: nowrap;
  line-height: 1;
}

/* Dot row */
#photoApp .quality-overlay .quality-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

#photoApp .quality-overlay .quality-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: background 0.2s ease;
}

#photoApp .quality-overlay .quality-dots span.active {
  background: #e8a838;
}

/* Quality title text e.g. "Utmärkt" */
#photoApp .quality-overlay .quality-title-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Dot colours by quality tier — applied via q1-q4 class on .quality-overlay */
#photoApp .quality-overlay.q4 .quality-dots span.active {
  background: #2e7d32;
}

#photoApp .quality-overlay.q3 .quality-dots span.active {
  background: #e8a838;
}

#photoApp .quality-overlay.q2 .quality-dots span.active {
  background: #e67e22;
}

#photoApp .quality-overlay.q1 .quality-dots span.active {
  background: #e53935;
}

#photoApp .quality-overlay.q0 .quality-title-label {
  color: #6d1f1f;
}

/* Upload button beneath quality pill (desktop only) */
#photoApp .upload-beneath-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

#photoApp .upload-beneath-btn:hover {
  background: #333;
}

#photoApp .upload-beneath-btn svg {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

/* Desktop toolbar capsule — vertically floating on the right of canvas-preview-container */
#photoApp .toolbar-capsule {
  display: flex;
  flex-direction: column;
  /* Vertical stacking */
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  /* Float right of the poster, vertically centered */
  position: absolute;
  right: -100px;
  /* Hug the poster right edge */
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

#photoApp .toolbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-size: 1rem;
  flex-shrink: 0;
}

#photoApp .toolbar-btn:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

#photoApp .toolbar-btn.active {
  background: #333;
  border-color: #333;
  color: #fff;
}

#photoApp .toolbar-btn[data-tooltip] {
  position: relative;
}

#photoApp .toolbar-btn[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

#photoApp .toolbar-btn[data-tooltip]:hover::before {
  opacity: 1;
}

#photoApp .toolbar-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Mobile toolbar (hidden on desktop) — thin status strip atop .product-details */
#photoApp .mobile-toolbar {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fefbf8;
  padding: 6px 10px 6px 16px;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

#photoApp .mobile-upload-row {
  display: none;
}

#photoApp .mobile-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#photoApp .bildalternativ-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #666;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

#photoApp .toolbar-upload-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

#photoApp .toolbar-upload-btn:hover,
#photoApp .toolbar-upload-btn:active {
  background: #333;
}

#photoApp .bildalternativ-btn svg,
#photoApp .toolbar-upload-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#photoApp .mobile-quality {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  flex-wrap: nowrap;
  overflow: hidden;
}

#photoApp .mobile-quality .quality-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

#photoApp .quality-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
}

#photoApp .quality-dot.q5 {
  background: #2e7b3e;
  box-shadow: 0 0 6px rgba(46, 123, 62, 0.5);
}

#photoApp .quality-dot.q4 {
  background: #2e7b3e;
  box-shadow: 0 0 6px rgba(46, 123, 62, 0.5);
}

#photoApp .quality-dot.q3 {
  background: #78a800;
  box-shadow: 0 0 6px rgba(120, 168, 0, 0.5);
}

#photoApp .quality-dot.q2 {
  background: #d4880a;
  box-shadow: 0 0 6px rgba(212, 136, 10, 0.5);
}

#photoApp .quality-dot.q1 {
  background: #d9512a;
  box-shadow: 0 0 6px rgba(217, 81, 42, 0.5);
}

#photoApp .quality-dot.q0 {
  background: #6d1f1f;
  box-shadow: 0 0 6px rgba(109, 31, 31, 0.4);
}

#photoApp .mobile-quality-label {
  font-size: 9px;
  font-weight: 600;
  color: #666;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom sheet */
#photoApp .sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 999;
}

#photoApp .photo-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 12px 20px 24px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#photoApp .photo-sheet.open {
  transform: translateY(0);
}

#photoApp .sheet-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 16px;
}

#photoApp .sheet-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-bottom: 10px;
}

#photoApp .sheet-pills::-webkit-scrollbar {
  display: none;
}

#photoApp .sheet-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #e9ecef;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

#photoApp .sheet-pill-btn:hover,
#photoApp .sheet-pill-btn.active {
  background: #333;
  border-color: #333;
  color: #fff;
}

#photoApp .sheet-pill-btn i,
#photoApp .sheet-pill-btn svg {
  font-size: 0.8rem;
  width: 0.8rem;
  height: 0.8rem;
}

#photoApp .sheet-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

#photoApp .sheet-klar-btn {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

/* ============================================
   FRAME SELECTION MODAL
   ============================================ */

#frame-selection-modal .modal-dialog {
  max-width: 700px;
}

#frame-selection-modal .modal-body {
  padding: 30px;
}

.frame-modal-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.frame-modal-option {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.frame-modal-option:hover {
  border-color: #999;
  background: #f8f9fa;
}

.frame-modal-option.active {
  border-color: #333;
  background: #f8f9fa;
}

.frame-modal-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #999;
  flex-shrink: 0;
  border: 1px solid #ddd;
}

.frame-modal-details {
  flex: 1;
  margin-left: 20px;
}

.frame-modal-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.frame-modal-price {
  font-size: 0.95rem;
  color: #666;
}

.frame-modal-checkmark {
  font-size: 1.5rem;
  color: #28a745;
  margin-left: 15px;
}

#frame-selection-modal .modal-footer {
  border-top: 1px solid #e0e0e0;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#frame-selection-modal .modal-footer .btn {
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #frame-selection-modal .modal-dialog {
    max-width: 95%;
    margin: 10px;
  }

  #frame-selection-modal .modal-body {
    padding: 20px;
  }

  .frame-modal-option {
    padding: 15px;
  }

  .frame-modal-thumbnail {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .frame-modal-details {
    margin-left: 15px;
  }

  .frame-modal-name {
    font-size: 1rem;
  }

  .frame-modal-price {
    font-size: 0.85rem;
  }

  /* Hide desktop capsule and quality zone on mobile */
  #photoApp .toolbar-capsule {
    display: none;
  }

  #photoApp .quality-zone {
    display: none !important;
  }

  /* Adjust canvas container padding for mobile (no badge to accommodate) */
  #photoApp .canvas-preview-container {
    width: 100%;
    padding-bottom: 0;
  }

  /* Show mobile toolbar as a strip flush against .product-details top edge */
  #photoApp .mobile-toolbar {
    display: flex;
    margin: -3px 0 0;
    align-self: stretch;
    flex-shrink: 0;
    background: #fefbf8;
  }

}

/* ============================================
 FILTER GENERATION LOADING OVERLAY
 ============================================ */

#photoApp .filter-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: 6px;
}

#photoApp .filter-loading-content {
  text-align: center;
  padding: 20px;
}

#photoApp .filter-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e9ecef;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  margin: 0 auto 15px;
}

#photoApp .filter-loading-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  letter-spacing: 0.5px;
}

#photoApp .filter-loading-progress {
  width: 180px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto 8px;
}

#photoApp .filter-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #333, #555);
  border-radius: 3px;
  transition: width 0.3s ease;
}

#photoApp .filter-loading-percent {
  font-size: 0.75rem;
  font-weight: 700;
  color: #666;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
}

/* On-demand filter applying spinner (shown on canvas while single filter generates) */
#photoApp .filter-applying-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
  pointer-events: none;
}

#photoApp .filter-applying-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 500ms linear infinite;
}

/* ============================================
   BELOW-TOOL SECTIONS
   ============================================ */

/* Image Carousel */
.pa-carousel-section {
  background: #fff;
  padding: 40px 0 0;
  overflow: hidden;
}

.pa-carousel-swiper {
  padding: 0 20px;
  box-sizing: border-box;
}

.pa-carousel-swiper .swiper-slide img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.pa-carousel-prev,
.pa-carousel-next {
  display: none;
}

@media (min-width: 768px) {
  .pa-carousel-section {
    padding: 60px 0 0;
  }
}

@media (min-width: 1024px) {
  .pa-carousel-swiper {
    padding: 0 50px;
  }

  .pa-carousel-prev,
  .pa-carousel-next {
    display: flex;
    --swiper-navigation-color: #333;
    --swiper-navigation-size: 18px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s;
  }

  .pa-carousel-prev:hover,
  .pa-carousel-next:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  }

  .pa-carousel-prev {
    left: 4px;
  }

  .pa-carousel-next {
    right: 4px;
  }
}

/* FAQ Section */
.pa-faq-section {
  background: #fff;
  padding: 60px 24px 80px;
}

.pa-faq-section__inner {
  max-width: 760px;
  margin: 0 auto;
}

.pa-faq-section h2 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 40px;
  letter-spacing: 0.02em;
}

/* Accordion styles unscoped from #photoApp for use outside the Vue app */
.pa-faq-section .info-accordion {
  border-top: 1px solid #eee;
}

.pa-faq-section .accordion-item {
  border-bottom: 1px solid #eee;
}

.pa-faq-section .accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.04em;
  text-align: left;
  transition: color 0.2s ease;
}

.pa-faq-section .accordion-header:hover {
  color: #666;
}

.pa-faq-section .accordion-header i {
  font-size: 0.75rem;
  color: #999;
  flex-shrink: 0;
  margin-left: 16px;
}

.pa-faq-section .accordion-content {
  padding: 0 0 20px;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
}

.pa-faq-section .accordion-content p {
  margin: 0 0 10px;
}

.pa-faq-section .accordion-content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   QUALITY MODAL
   ============================================ */

#photoApp [v-cloak] {
  display: none;
}

/* ---- MOBILE (bottom sheet) ---- */

#photoApp .quality-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1099;
}

#photoApp .quality-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#photoApp .quality-modal.open {
  transform: translateY(0);
}

#photoApp .quality-sheet-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 12px auto 0;
}

#photoApp .quality-modal-close {
  display: none;
}

#photoApp .quality-modal-hero {
  padding: 16px 20px 16px;
}

#photoApp .quality-modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

#photoApp .quality-modal-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #999;
  text-transform: uppercase;
}

#photoApp .quality-modal-title {
  margin: 0 0 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: #1a1a1a;
}

/* Quality bar */
#photoApp .quality-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

#photoApp .quality-bar-col {
  text-align: center;
}

#photoApp .quality-bar-track {
  height: 6px;
  border-radius: 99px;
  background: #e8e8e8;
}

#photoApp .quality-bar-track.active.qb-1 {
  background: #d9512a;
}

#photoApp .quality-bar-track.active.qb-2 {
  background: #d4880a;
}

#photoApp .quality-bar-track.active.qb-3 {
  background: #78a800;
}

#photoApp .quality-bar-track.active.qb-4 {
  background: #2e7b3e;
}

#photoApp .quality-bar-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 6px;
  color: #bbb;
  font-weight: 400;
}

#photoApp .quality-bar-label.qbl-active {
  color: #1a1a1a;
  font-weight: 700;
}

/* Specs */
#photoApp .quality-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

#photoApp .quality-stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999;
  display: block;
  margin-bottom: 4px;
}

#photoApp .quality-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
}

#photoApp .quality-stat-unit {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  color: #999;
  font-weight: 300;
  margin-left: 2px;
}

/* Tips */
#photoApp .quality-tips {
  padding: 12px 20px 4px;
  border-top: 1px solid #f0f0f0;
}

#photoApp .quality-tips-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 8px;
}

#photoApp .quality-tips-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}

#photoApp .recommended-sizes {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

#photoApp .recommended-sizes-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 12px;
}

#photoApp .recommended-size-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

#photoApp .size-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1.5px solid #e9ecef;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  gap: 6px;
  text-align: left;
}

#photoApp .size-card:hover {
  border-color: #bbb;
}

#photoApp .size-card.current {
  border-color: #222;
  background: #222;
  color: #fff;
}

#photoApp .size-card.unsuitable {
  opacity: 0.45;
  cursor: not-allowed;
}

#photoApp .size-card.unsuitable .size-card-dims {
  text-decoration: line-through;
  text-decoration-color: #999;
}

#photoApp .size-card-dims {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

#photoApp .size-card-quality-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

#photoApp .size-card .quality-dot {
  width: 7px;
  height: 7px;
}

#photoApp .size-card-quality {
  font-size: 0.65rem;
  color: #888;
}

#photoApp .size-card.current .size-card-quality {
  color: rgba(255, 255, 255, 0.65);
}

/* Footer */
#photoApp .quality-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 20px 24px;
}

#photoApp .quality-modal-btn-close {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---- DESKTOP (centered dialog) ---- */

@media (min-width: 768px) {
  #photoApp .quality-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
  }

  #photoApp .quality-modal {
    bottom: auto;
    left: 50%;
    top: 50%;
    right: auto;
    width: 560px;
    max-width: 90vw;
    border-radius: 16px;
    max-height: 90vh;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, calc(-50% + 100vh));
  }

  #photoApp .quality-modal.open {
    transform: translate(-50%, -50%);
  }

  #photoApp .quality-sheet-handle {
    display: none;
  }

  #photoApp .quality-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: none;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #666;
    padding: 0;
    flex-shrink: 0;
  }

  #photoApp .quality-modal-close:hover {
    background: #f0f0f0;
  }

  #photoApp .quality-modal-hero {
    padding: 28px 32px 20px;
    border-bottom: 1px solid #ebebeb;
    background: linear-gradient(180deg, #f8f6f2, #fff);
  }

  #photoApp .quality-modal-title {
    font-size: 36px;
    margin-bottom: 18px;
  }

  #photoApp .quality-stats {
    gap: 18px;
    padding: 20px 32px;
    border-top: none;
  }

  #photoApp .quality-stat-value {
    font-size: 18px;
  }

  #photoApp .quality-tips {
    padding: 4px 32px 24px;
    border-top: none;
  }

  #photoApp .quality-tips-text {
    font-size: 14px;
    margin-bottom: 16px;
  }

  #photoApp .quality-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #ebebeb;
    background: #f7f7f7;
  }
}

/* Filter theme swatch row (per-filter settings UI) */
#photoApp .filter-theme-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

#photoApp .filter-theme-swatch {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 120ms ease, transform 120ms ease;
}

#photoApp .filter-theme-swatch:hover {
  transform: scale(1.06);
}

#photoApp .filter-theme-swatch.active {
  border-color: #000;
}

#photoApp .filter-theme-swatch-a,
#photoApp .filter-theme-swatch-b {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  display: block;
}

#photoApp .filter-theme-swatch-a {
  left: 0;
}

#photoApp .filter-theme-swatch-b {
  right: 0;
}