/** Shopify CDN: Minification failed

Line 1363:8 Expected identifier but found whitespace
Line 1363:13 Unexpected ";"

**/
/** Shopify CDN: Minification failed

Line 1357:8 Expected identifier but found whitespace
Line 1357:13 Unexpected ";"

**/
.imageModal{max-height:auto !important;}
.image-side{max-height:auto !important;}
.verticle_direction span{white-space:normal !important;}
.modal-footer{align-content:end !important;}
.loading-overlay{z-index:10001 !important;}
.loading-spiner{z-index:10001 !important;}

/* ─── GLOBAL RESET ───────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


button {
  background: none;
  border: none;
  cursor: pointer;
}

body.modal-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0; /* Ensure the body stays at the top when modal is active */
}
/* ─── MODAL & LAYOUT ─────────────────────────────────────────────────────── */
#sheet-generator-app .modal {
  position: fixed;
  inset: 0; /* Shorthand for top, right, bottom, left */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* Lowered z-index for better layering */
}

#sheet-generator-app .image-modal-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  display: flex; /* Changed from 'none' to support toggling via JS */
  align-items: center;
  justify-content: center;
  overflow: auto; /* Changed to auto for better scroll handling */
  z-index: 2000; /* Adjusted z-index */
  box-sizing: border-box;
  visibility: hidden; /* Default hidden state, toggle with JS */
}

#sheet-generator-app .image-modal-overlay.active {
  visibility: visible; /* Show when active */
}

#sheet-generator-app .image-modal {
  position: relative;
  width: 100%;
  max-width: 90vw; /* Slightly wider for better content fit */
  max-height: 90vh; /* Adjusted for better viewport usage */
  background: #ffffff;
  border-radius: 12px; /* Smoother, modern radius */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* Softer, deeper shadow */
  padding: 2rem; /* More flexible padding */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.imageModal {
  position: relative;
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: calc(80vh - 120px);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  overflow: hidden;
}

.imageModalOverlay .imageModal__close {
  position: absolute;
  top: 15px;
  right: 15px;

  cursor: pointer;
  z-index: 11;
}

.imageModalOverlay .imageModal__close path {
  stroke: #fff;
}

.imageModalOverlay .imageModal img {
  max-width: none;
  max-height: none;
  display: block;
  margin: 0 auto;
}

.imageModal__close svg {
  width: 21px;
  overflow: visible;
  opacity: 0.5;
}

.image-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  overflow-y: auto;
}

#image-and-vertical-container {
  display: flex;
  align-items: stretch;
}

#vertical-ruler-container {
  width: 50px;
  flex-shrink: 0;
}

.verticle_direction {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

.verticle_direction span {
  padding: 5px 4px;
  font-size: 14px;
  background: #fff;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.verticle_direction:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #03a3f7;
  z-index: 1;
}

#image-right-container {
  width: auto;
  flex-shrink: 0;
  position: relative;
}

#image-wrapper {
  position: relative;
  width: 100%;
  border: 1px solid #ddd;
  overflow: hidden;
}

#image-wrapper img {
  display: block;
}

#horizontal-ruler-container {
  width: 100%;
  margin-left: 50px;
  margin-top: 10px;
}

.horizontal_direction {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  border: none;
}

.horizontal_direction span {
  padding: 2px 8px;
  font-size: 14px;
  background: #fff;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.horizontal_direction:after {
  content: "";
  height: 1px;
  background: #03a3f7;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 1;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90vw;
  max-width: none;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.modal-header,
.modal-footer {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: end;
  border-color: #e5e5e5;
  border-style: solid;
}

.modal-header {
  border-width: 0 0 1px;
}

.modal-footer {
  border-width: 1px 0 0;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 400;
  font-family:'Quattrocento Sans';
  
}

.modal-close {
  font-size: 1.5rem;
  color: #555;
  margin-left:20px;
}

/* ─── COST & PREVIEW BUTTONS ─────────────────────────────────────────────── */
.cost-display {
  font-weight:400;
  color: #333;
  margin-left: auto;
  font-size:14px;
}

.preview-sheet {
  background: #4b4bff;
  color: #fff;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 500;
  margin-right: 8px;
  display: none; /* Hidden as per original stylesheet */
}

.preview-sheet:hover {
  background: #3434cc;
}

/* ─── BODY ───────────────────────────────────────────────────────────────── */
.modal-body {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;

}

/* ─── SPACING CONTROL ───────────────────────────────────────────────────── */
.spacing-control {
  display: flex;
  align-items: center;
  gap: 12px;
  display: none !important; /* Hidden as per original stylesheet */
}

.spacing-control label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #333;
}

.spacing-control input {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.spacing-control .unit {
  font-size: 0.875rem;
  color: #333;
}

/* ─── CONTENT WRAP ──────────────────────────────────────────────────────── */
.content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ─── SIDEBAR ───────────────────────────────────────────────────────────── */
.sidebar {
  width: 60px;
  background: #f7f7fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  border-right: 1px solid #e5e5e5;
}

.sidebar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  font-size: 1rem;
  color: #666;
}

.sidebar button.active,
.sidebar button:hover {
  background: #e0e0ff;
  color: #4b3cd9;
}

.sidebar svg {
  width: 24px;
  height: 24px;
}

/* ─── LEFT PANEL (UPLOAD) ──────────────────────────────────────────────── */
.left-panel {
  width: 280px;
  padding: 0 16px;
  background: #f9f9f9;
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.upload-placeholder span{font-weight:500;}

.upload-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: #ffcc00;
  color: #000;
  font-weight: 600 !important;
  border-radius: 24px;
  text-align: center;
  margin-bottom: 8px;
  margin-top: 8px;
}

.upload-btn:hover {
  background: #ffd900;
}

.upload-instructions {
  font-size: 1rem;
  color: #666;
  margin-bottom: 12px;
}

.left-panel input[type="file"] {
  display: none;
}

.search-box {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 16px;
}

.section-label {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.uploaded-grid {
  display: grid;
  grid-template-columns: repeat(2, 116px); /* Fixed width for 2 columns */
  grid-auto-flow: row;
  gap: 12px;
}

.thumb-card {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.thumb-card img {
  display: block;
  width: 100%; /* 100px */
  height: 125px; /* 4:5 ratio with width */
  object-fit: cover;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
}

.thumb-card .badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #7a38ff;
  color: #fff;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.thumb-card .file-info {
  margin-top: 6px;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-card .preview-btn {
  margin-top: 6px;
  background: #4b4bff;
  color: #fff;
  font-size: 1rem;
  padding: 4px 6px;
  border-radius: 4px;
  text-align: center;
  align-self: flex-start;
  display: none;
}

.thumb-card .preview-btn:hover {
  background: #3434cc;
}

/* ─── RIGHT PANEL (SHEET) ──────────────────────────────────────────────── */
.right-panel {
  flex: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 250px)); /* Fixed width per card, no stretching */
  grid-auto-flow: row;
  gap: 16px;
}

.sheet-card {
  display: flex;
  flex-direction: column; /* Stack children vertically */
  align-items: stretch; /* Ensure children take full width */
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px;
  background: #fef7ef;
  min-width: 0;
  max-width: 100%;
}

.sheet-card .image-details-row {
  display: flex;
  flex-direction: row; /* Thumbnail and details side by side */
  align-items: flex-start;
  gap: 12px; /* Matches margin-right on img */
}

.sheet-card .image-wrapper {
  flex-shrink: 0; /* Prevent thumbnail from shrinking */
}

.sheet-card .image-wrapper img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.sheet-card .details {
  flex: 1; /* Take remaining space */
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sheet-card .quantity-row {
  width: 100%;
  margin-top: 4px; /* Reduced margin to match spacing */
  padding: 0; /* Remove extra padding */
}

.sheet-card .quantity-field {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
}

.sheet-card .quantity-field label {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
  min-width: 60px; /* Adjusted to align with screenshot */
}

.sheet-card .quantity-wrapper {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between input and buttons */
}

.sheet-card .quantity-wrapper input.quantity {
  width: 80px; /* Increased width to match screenshot */
  height: 24px; /* Reduced height to match screenshot */
  font-weight: normal; /* Adjusted font-weight */
  font-size: 16px; /* Adjusted font-size */
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff; /* White background */
  padding: 4px 8px; /* Adjusted padding for centered text */
  -webkit-appearance: none; /* Remove native arrows in WebKit browsers */
  -moz-appearance: textfield; /* Remove native arrows in Firefox */
}

/* Hide native number input arrows for WebKit browsers (Chrome, Safari, Edge) */
.sheet-card .quantity-wrapper input.quantity::-webkit-inner-spin-button,
.sheet-card .quantity-wrapper input.quantity::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sheet-card .quantity-controls {
  display: flex;
  flex-direction: column;
  gap: 2px; /* Space between up and down buttons */
}

.sheet-card .quantity-controls button {
  background: #4b4bff; /* Blue background */
  color: #fff;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 14px; /* Adjusted to match screenshot */
  height: 14px; /* Adjusted to match screenshot */
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-card .quantity-controls button:hover {
  background: #3a3aff; /* Darker blue on hover */
}

.sheet-card .actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  justify-content: flex-end; /* Align buttons to the right */
  padding: 0; /* Match .sheet-card padding */
}

.sheet-card .preview-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.3);
  color: #000;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.sheet-card:hover .preview-btn {
  opacity: 1;
}

.sheet-card .image-wrapper .preview-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.details .file-name {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details .size-field,
.details .lock-field,
.details .dpi-field {
  margin-bottom: 4px;
  font-size: 1rem;
  color: #333;
}

.size-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.size-field .field-label {
  font-weight: 500;
  min-width: 35px;
}

.size-field input {
  width: 65px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.lock-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lock-field input {
  transform: scale(0.9);
}

.actions button {
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 12px;
  margin-left: 6px;
  
}

.actions .delete {
  background: #eee;
  color: #666;
}

.actions .duplicate {
  background: #7a38ff;
  color: #fff;
}

.actions .delete:hover {
  background: #ddd;
}

.actions .duplicate:hover {
  background: #662bf5;
}

/* ─── GENERATE BUTTON ──────────────────────────────────────────────────── */
.generate-sheet {
  background: #7a38ff;
  color: #fff;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 500;
  font-size:16px;
}

.generate-sheet:hover {
  background: #662bf5;
}

/* ─── MEDIA QUERIES ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content {
    flex-direction: column;
  }
  .sidebar,
  .spacing-control {
    display: none;
  }
  .left-panel,
  .right-panel {
    width: 100% !important;
    padding: 8px 16px;
  }
  .right-panel {
    flex: 1;
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .modal-content {
    width: 95vw;
    height: 95vh;
  }
  .modal-body {
    padding: 8px 12px;
    gap: 8px;
  }
  .spacing-control input {
    width: 50px;
  }
  .sheet-grid {
    grid-template-columns: 1fr !important;
  }
  .sheet-card .image-details-row {
    flex-direction: column;
    align-items: stretch;
  }
  .sheet-card .image-wrapper {
    margin-right: 0;
    margin-bottom: 12px;
  }
  .sheet-card .actions {
    padding: 0;
  }
}

@media (min-width: 1025px) {
  .modal-body {
    min-height: 70vh;
  }
}

@media screen and (min-width: 990px) {
  .product--medium:not(.product--no-media) .product__media-wrapper,
  .product--small:not(.product--no-media) .product__info-wrapper {
    z-index: 0;
  }
}
.alert-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #ff3333;
  color: white;
  padding: 10px;
  text-align: center;
  z-index: 1000;
  transition: opacity 0.5s;
}



.generate-sheet {
  margin-left: auto;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  color: white;
}

.loading-spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #f0f0f0;
  margin-bottom: 10px;
}

.progress {
  height: 100%;
  background: #3498db;
  transition: width 0.3s;
}

.modal-active .supercart-flyout-cart {
  display: none !important;
}

.imageModalOverlay {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%) !important;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  box-sizing: border-box;
}

.imageModal {
  position: relative;
  width: auto;
  height: auto;
  max-width: 75vw;
  max-height: calc(80vh - 100px);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  overflow: hidden;
}

.image-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-height: calc(80vh - 140px);
  overflow-y: hidden;
}

#horizontal-ruler-container {
  width: 100%;
  margin-left: 50px;
  margin-top: 2px;
}

.quantity-up, .quantity-down {
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  background: #3498db;
  border: none;
  padding: 5px;
  border-radius: 3px;
}

.quantity-up:hover, .quantity-down:hover {
  background: #2a79b0;
}

.image-wrapper {
  position: relative;
}

.check-proof {
  display: block;
  color: #3B82F6;
  font-size: 1rem;
  line-height: 1.25rem;
  text-align: left;
  margin-top: 5px;
}

/* Apparel Modal Styles */
.apparelModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

.apparelModal {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 15px;
}

.apparelModal__close {
  position: absolute;
  top: -7px;
  right: 7px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  width:32px;
  opacity:0.5;
}

.apparelModal__content {
  width: 100%;
}

.check-mockup {
  display: block;
  color: #3b82f6;
  font-size: 1.2rem;
  line-height: 1.25rem;
  text-align: left;
  margin-top: 5px;
  text-decoration: underline;
}

.check-mockup:hover {
  color: #1d4ed8;
}

/* Apparel Modal Styles */
.apparelModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

.apparelModal {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 15px;
}

.apparelModal__close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.apparelModal__content {
  width: 100%;
}



.check-mockup:hover {
  color: #1d4ed8;
}

/* Apparel Visualizer Styles */
.apparel-visualizer {
  margin-top: 10px;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
}

.visualizer-header {
  background: #e8ecef;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-align: center;
}

.visualizer-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.visualizer-header p {
  margin: 3px 0 0;
  font-size: 1rem;
  color: #666;
}

.apparel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: #ffffff !important;
  padding: 0;
  border-radius: 0;
}

.apparel-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.2s;
  width: 100%;
  background-color: transparent;
  aspect-ratio: 3 / 4;
  margin: 0;
}



.apparel-item:hover {
  transform: scale(1.02);
}

.apparel-item img {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
  background: transparent;
  object-fit: contain;
}

.apparel-item__label {
  position: absolute;
  top: 6px;
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: #333;
  z-index: 2;
}

.apparel-item__label span {
  display: block;
  font-weight: 900;
}

.apparel-item__overlay {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.apparel-item--tshirt .apparel-item__overlay {
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apparel-item--tshirt .apparel-item__overlay img {
  max-width: 25%;
  max-height: 25%;
  width: auto;
  height: auto;
}

.apparel-item--hat .apparel-item__overlay {
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apparel-item--hat .apparel-item__overlay img {
  max-width: 25%; /* Increased from 15% to 25% for desktop */
  max-height: 25%;
  width: auto;
  height: auto;
}

.apparel-item--polo .apparel-item__overlay {
  top: 33%;
  left: 60%; /* Moved to the right-hand side */
  transform: translate(-50%, -50%);
}

.apparel-item--polo .apparel-item__overlay img {
  max-width: 13%; /* Increased from 10% to 15% for desktop */
  max-height: 13%;
  width: auto;
  height: auto;
}

.apparel-item--bag .apparel-item__overlay {
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apparel-item--bag .apparel-item__overlay img {
  max-width: 35%;
  max-height: 35%;
  width: auto;
  height: auto;
}

.apparel-item--hoodie .apparel-item__overlay {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apparel-item--hoodie .apparel-item__overlay img {
  max-width: 25%;
  max-height: 25%;
  width: auto;
  height: auto;
}

.apparel-item--apron .apparel-item__overlay {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apparel-item--apron .apparel-item__overlay img {
  max-width: 15%;
  max-height: 15%;
  width: auto;
  height: auto;
}

.color-selector {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.color-selector p {
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-option {
  display: inline-block;
}

.color-option input {
  display: none;
}

.color-option label {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ddd;
  transition: border-color 0.2s;
}

.color-option input:checked + label {
  border-color: #333;
}

.color-option--custom label {
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
}

.color-option--custom input[type="color"] {
  display: block;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  opacity: 0;
  position: absolute;
  cursor: pointer;
}

/* Media Queries */
@media (max-width: 768px) {
  .apparelModal {
    width: 95%;
    padding: 10px;
    max-width: 500px;
  }

  .apparel-visualizer {
    padding: 6px;
    max-width: 500px;
  }

  .apparel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .apparel-item {
    width: 100%;
  }

  .apparel-item__label {
    font-size: 0.7rem;
  }

  .apparel-item--tshirt .apparel-item__overlay,
  .apparel-item--hoodie .apparel-item__overlay {
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .apparel-item--tshirt .apparel-item__overlay img,
  .apparel-item--hoodie .apparel-item__overlay img {
    max-width: 20%;
    max-height: 20%;
  }

  .apparel-item--hat .apparel-item__overlay {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .apparel-item--hat .apparel-item__overlay img {
    max-width: 19%;
    max-height: 19%;
  }

  .apparel-item--polo .apparel-item__overlay {
    top: 33%;
    left: 60%;
    transform: translate(-50%, -50%);
  }

  .apparel-item--polo .apparel-item__overlay img {
    max-width: 13%;
    max-height: 13%;
  }

  .apparel-item--bag .apparel-item__overlay {
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .apparel-item--bag .apparel-item__overlay img {
    max-width: 35%;
    max-height: 35%;
  }

  .apparel-item--apron .apparel-item__overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .apparel-item--apron .apparel-item__overlay img {
    max-width: 12%;
    max-height: 12%;
  }

  .color-selector {
    align-items: flex-start;
  }

  .color-selector p {
    font-size: 0.7rem;
  }
}


/* 

.file-info {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 5px;
}

.delete-uploaded {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7; /* Subtle but visible */
  transition: opacity 0.2s, background 0.2s;
}



.uploaded-grid-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* Above card content, below modals */
}

.uploaded-grid-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.placeholder.thumb-card {
  background: #f9f9f9;
  min-height: 150px; /* Match thumbnail size */
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar {
  width: 100%;
  background: #f3f3f3;
  height: 10px;
  margin-bottom: 10px;
}

.progress {
  height: 100%;
  background: #3498db;
  transition: width 0.3s ease;
}

/* Ensure modals have higher z-index */
.imageModalOverlay,
.apparelModalOverlay, .apparelModalOverlay2 {
  z-index: 10000;
}


span.delete-uploaded svg {
    fill: #eee;
}
span.delete-uploaded svg:hover {
    fill: #ddd;
  
}

.quantity{min-height:30px !important;}

/* .uploaded-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
} */

.thumb-card {
  position: relative;
  border: 1px solid #ddd;
  padding: 10px;
  background: #fff;
  overflow: hidden;
}

.thumb-card img {
  width: 100%;
  height: auto;
  display: block;
}



.file-info {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 5px;
}

.delete-uploaded {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-uploaded:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.delete-uploaded svg {
  width: 16px;
  height: 16px;
  fill: #fff; /* Override fill for consistency */
}

.delete-uploaded svg:hover {
  fill: #fff; /* Keep white on hover */
}

.uploaded-grid-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.uploaded-grid-loading-spinner {
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.placeholder.thumb-card {
  background: #f9f9f9;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-placeholder span{font-size:13px;}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background: #f9f9f9;
  border: 2px dashed #ddd;
  color: #3498db;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  padding: 20px;
}

.upload-placeholder svg {
  margin-bottom: 10px;
}

.upload-placeholder:hover {
  background: #e6f0fa;
}

.progress-bar {
  width: 100%;
  background: #f3f3f3;
  height: 10px;
  margin-bottom: 10px;
}

.progress {
  height: 100%;
  background: #3498db;
  transition: width 0.3s ease;
}

.quantity {
  min-height: 30px !important;
}

/* Ensure modals have higher z-index */
.imageModalOverlay,
.apparelModalOverlay, .apparelModalOverlay2 {
  z-index: 100001;
}

.upload-placeholder svg {
    margin-bottom: 10px;
    max-width: 30px;
    fill: #3498db;
} 

/* Modal for apparel visualizer 2 (preview mode) */
.apparelModalOverlay2 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.apparelModalOverlay2[style*="display: flex"] {
  display: flex !important;
}

.apparelModal2 {
  background: #f2f2f2 url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjAwIDIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGRlZnM+CjxwYXR0ZXJuIGlkPSJhIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPgo8cmVjdCB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIGZpbGw9IiNmZmYiLz4KPHJlY3Qgd2lkdGg9IjUiIGhlaWdodD0iNSIgZmlsbD0iI2RhZGFkYSIvPgo8cmVjdCB4PSI1IiB5PSI1IiB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZGFkYWRhIi8+CjwvcGF0dGVybj4KPC9kZWZzPgo8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+Cjwvc3ZnPgo=) center center;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  position: relative;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border:20px solid #fff ;
}

.apparelModal2__content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.apparelModal2__close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.apparel-visualizer2 {
  display: none;
  text-align: center;
  width: 100%;
}

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

.preview-container2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.horizontal-ruler2 {
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
}

.rulerX2, .rulerY2 {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  display: inline-block;
  padding: 5px;
  background: #f0f0f0;
  border-radius: 4px;
}

.rulerY2 {
  writing-mode: vertical-rl;
  margin-right: 10px;
}

.preview-image2 {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  min-width: 100px; /* Ensure visibility with invalid dimensions */
  min-height: 100px;
}
.check-mockup2 {
    display: block;
    color: #3b82f6;
    font-size: 1.2rem;
    line-height: 1.25rem;
    text-align: left;
    margin-top: 5px;
    text-decoration: underline;
}



.discount-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.discount-table th,
.discount-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.discount-table th {
  background-color: #f0f0f0;
  font-weight: bold;
}

.discount-table tr.selected {
  background-color: #e6f3ff;
}

.discount-table td {
  vertical-align: middle;
}

.discount-table .pre-cut {
  color: #555;
  font-size: 12px;
}

.cost-display{margin-right:30px;}

html body.modal-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100%;
}



  body {
    overflow: auto !important; 
    position: static !important;
  }
  body.modal-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
#sheet-generator-app {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Use viewport height for full coverage */
  height: calc(var(--vh, 1vh) * 100); /* Fallback for mobile viewport */
  background: rgb(226, 216, 206);
  z-index: 1000;
  overflow-y: auto; /* Allow scrolling if content overflows */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
#sheet-generator-app .modal-content {
  background: white;
  width: 100%;
  max-width: 90%;
  max-height: calc(100vh - 40px); /* Account for padding/margins */
  max-height: calc((var(--vh, 1vh) * 100) - 40px);
  margin: 20px auto; /* Center with margin */
  overflow-y: auto; /* Allow scrolling within the modal content */
  position: relative;
  box-sizing: border-box;
}
#sheet-generator-app .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1001; /* Ensure it's above other content */
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar .progress {
  height: 100%;
  background: #4caf50;
  transition: width 0.3s ease;
}



.open-app-btn{


    font-size: 15px;
    font-weight: 600;
    padding: 6px 16px;
    min-height: 56px;
    min-width: 160px;
    width: 100%;
    border-radius: 10px;
    display: flex
;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    background: var(--md-sys-color-primary);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);

}

.thumb-card img {

    object-fit: contain !important;
}

body {
    overflow: auto !important; /* Ensure scrolling is enabled by default */
    position: static !important;
  }
  body.modal-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  #sheet-generator-app {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(226, 216, 206);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  #sheet-generator-app .modal-content {
    background: white;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
  }
  #sheet-generator-app .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
  }


/* Mobile-specific media query */
@media only screen and (max-width: 480px) {
  #sheet-generator-app {
    height: 100vh; /* Ensure full viewport height */
    height: calc(var(--vh, 1vh) * 100); /* Adjust for mobile viewport */
  }

  #sheet-generator-app .modal-content {
    max-width: 100%;
    margin: 10px; /* Reduce margin for more space */
    padding: 15px; /* Adjust padding for smaller screens */
    max-height: calc(100vh - 20px); /* Fit within viewport */
    max-height: calc((var(--vh, 1vh) * 100) - 20px);
    overflow:scroll;
  }

  #sheet-generator-app .modal-close {
    font-size: 20px; /* Slightly smaller close button */
    top: 5px;
    right: 5px;
  }

  .open-app-btn {
    font-size: 14px;
    min-height: 48px;
    min-width: 140px;
    padding: 5px 12px;
  }

  .progress-bar {
    height: 15px; /* Slightly smaller progress bar */
  }

  /* Ensure the "Proceed To Checkout" button is visible */
  #add-to-cart-form .generate-sheet {
    font-size: 14px;
    padding: 8px;
    margin: 15px auto;
    width: 100%;
    max-width: 280px;
  }
}
@media only screen and (min-width: 1024px) {
#sheet-generator-app .modal-content{
  overflow:auto;
}
}
