#FormeZone {
   width: 100%;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   overflow: visible;
   background-color: #ffffff;
   background-image: 
       linear-gradient(rgba(10, 177, 240, 0.1) 1px, transparent 1px),
       linear-gradient(90deg, rgba(10, 177, 240, 0.1) 1px, transparent 1px);
   background-size: 20px 20px;
   border-radius: 5px;
   opacity: 1;
   animation: canvasPreviewIn 0.25s ease;
   z-index: 5;
   transition: background-size 0.3s ease;
} 

#FormeZone svg{
   width: 100%;
   height: 100%;
   overflow: visible;
   transition: all 0.3s ease;
}
   /* Styles for the SVG shapes */
   .dimension-line {       
   stroke: #0AB1F0;
   stroke-width: 1;
   marker-end: url(#broadhead);
   marker-start: url(#shaft);
}
.p{
   float: none !important;
   text-align: center;
   font-size: x-large;
   margin-bottom: 10px;
}
.dimension-text {
   fill: #666;
   font-size: 12px;
   text-anchor: middle;
   alignment-baseline: middle;
}

.figure {
   fill: #0AB1F0;
}

/* HIDE RADIO */
.inputShape{
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* IMAGE STYLES */
.inputShape+img {
	cursor: pointer;
	width: 100%;
    height: auto;
    max-width: 70px;
}

/* CHECKED STYLES */
.inputShape:hover + img {
    outline: 2px solid #0AB1F0 !important;
    background-color: white !important;
    border-radius: 6px !important;
    padding: 2px !important;
}

/* CHECKED STYLES */
.inputShape:checked + img {
    outline: 2px solid #0AB1F0 !important;
    background-color: white !important;
    border-radius: 6px !important;
    padding: 2px !important;
}

.btn-check:checked + .btn, 
.btn.active, 
.btn.show, 
.btn:first-child:active, 
:not(.btn-check) + .btn:active {
    color: white !important;
    background-color: #0AB1F0 !important;
    border-color: #0AB1F0 !important;
}

/* Make hover effects more specific */
.product_custom_field .inputShape:hover + img {
    outline: 2px solid #0AB1F0 !important;
    background-color: white !important;
    border-radius: 6px !important;
    padding: 2px !important;
}

.justify-content-around {
   justify-content: space-around !important;
}

.d-flex {
   display: flex !important;
}
.justify-content-around label{
   justify-content: space-around !important;
   margin-right: 10px;
}
.rounded-pill {
   border-radius: 6px !important;
}

.product_custom_field p{
   margin: 0px 0px 15px 0px;
}

.product_custom_field{
   /* margin-top: 1.25rem; */
   padding: 1rem;
   border-radius: 3px;
   border: 1px solid #dedede;
   margin-bottom: 2px;
}
.btn-outline-dark {
   --bs-btn-color: #0AB1F0;
   --bs-btn-border-color: #0AB1F0;
   --bs-btn-hover-color: #fff;
   --bs-btn-hover-bg: #0AB1F0;
   --bs-btn-hover-border-color: #0AB1F0;
   --bs-btn-focus-shadow-rgb: 33, 37, 41;
   --bs-btn-active-color: #fff;
   --bs-btn-active-bg: #0AB1F0;
   --bs-btn-active-border-color: #0AB1F0;
   --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
   --bs-btn-disabled-color: #0AB1F0;
   --bs-btn-disabled-bg: transparent;
   --bs-btn-disabled-border-color: #0AB1F0;
   --bs-gradient: none;
}
.btn {
   --bs-btn-padding-x: 0.75rem;
   --bs-btn-padding-y: 0.375rem;
   --bs-btn-font-family: ;
   --bs-btn-font-size: 1rem;
   --bs-btn-font-weight: 400;
   --bs-btn-line-height: 1.5;
   --bs-btn-color: #0AB1F0;
   --bs-btn-bg: transparent;
   --bs-btn-border-width:  1px;
   --bs-btn-border-color: transparent;
   --bs-btn-border-radius: 0.375rem;
   --bs-btn-hover-border-color: transparent;
   --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
   --bs-btn-disabled-opacity: 0.65;
   --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba( 33, 37, 41, .5);
   display: inline-block;
   padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
   font-family: var(--bs-btn-font-family);
   font-size: var(--bs-btn-font-size);
   font-weight: var(--bs-btn-font-weight);
   line-height: var(--bs-btn-line-height);
   color: #0AB1F0;
   text-align: center;
   text-decoration: none;
   vertical-align: middle;
   cursor: pointer;
   -webkit-user-select: none;
   -moz-user-select: none;
   user-select: none;
   border:  1px solid #0AB1F0;
   border-radius: var(--bs-btn-border-radius);
   background-color: transparent;
   transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/*summury detaille product*/
.entry-summary{
   background-color: #ffffff;
    padding-top: 25px;
    padding-right: 10px;
    padding-bottom: 25px;
    padding-left: 10px;
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.1);
}

/* Adjust entry-summary padding on mobile */
@media (max-width: 768px) {
    .entry-summary {
        padding-right: 5px !important;
        padding-left: 5px !important;
        /* Keep top and bottom padding as defined */
    }
}

/* CHECKED STYLES */
.inputShape:hover+img {
   outline: 2px solid #0AB1F0;
   background-color: white;
   border-radius: 6px;
   padding: 2px;
}
.btn-check{
   position: absolute;
   opacity: 0;
   width: 0;
   height: 0;
}

.ms-2 {
   margin-right: 0.5rem !important;
}

.input-field,.input-field:checked {
   width: 100%;
   padding: 0.425rem 0.375rem;
   border: 1px solid #dedede;
   border-radius: 3px;
   font-size: 15px;
   font-weight: 600;
}
input {
   appearance: none;
   border-radius: 0;
}
.input {
   display: flex;
   flex-direction: column-reverse;
   position: relative;
   padding-top: 0.2rem;
   margin-top: 0.1rem;
}
/* Alignement des inputs */
.product_custom_field .row{
   display: flex !important;
   flex-wrap: wrap !important;
   margin-right: -15px !important;
   margin-left: -15px  !important;
}

.col-6 {
   flex: 0 0 50%;
   max-width: 50%;
   padding-right: 15px;
   padding-left: 15px;
}

.col-4 {
   flex: 0 0 33.333333%;
   max-width: 33.333333%;
   padding-right: 15px;
   padding-left: 15px;
}

.col-sm-3 {
   flex: 0 0 25%;
   max-width: 25%;
   padding-right: 15px;
   padding-left: 15px;
}
.min-max-value{
   display: inline-block !important; 
   color: #aaa !important;
   font-size: small;
}
.col-12 {
   flex: 0 0 100%;
   max-width: 100%;
   padding-right: 15px;
   padding-left: 15px;
}
.thickness {
   position: relative; /* Nécessaire pour le positionnement absolu du message */
}

.stock-message {
   display: none;
   position: absolute;
   top: 100%; /* Positionné en dessous */
   left: 0;
   background-color: #333;
   color: #fff;
   padding: 5px 10px;
   border-radius: 5px;
   white-space: nowrap; /* Empêche le retour à la ligne */
   font-size: 0.9em;
   z-index: 1000;
}

 
/* Conteneur pour aligner le label et le message */
.stock-container {
   position: relative; /* Nécessaire pour le positionnement absolu du message */
   display: inline-block;
 }
 
 /* Afficher le message au survol du label */
 .stock-container:hover .stock-message {
   display: inline-flex;
 } 
  
  /* Hover effect */
  .help-btn:hover {
    color: darkred;           /* Changer de couleur au survol */
  }
  
  /* Pour la popup, masquer par défaut */
  .mfp-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 9999;
    width: 300px;
    max-width: 100%;
  }
  
  .mfp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
  }

  /* Styles pour le bouton Aide */
  .help-btn {
     
      color: red;
      background: none;
      border: none;
      font-size: 16px;
      cursor: pointer;
     
  }

  /* Styles pour le popup */
  #popup {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 80%;
      height: 80%;
      overflow-y: scroll;
      padding: 20px;
      background-color: #fff;
      border: 2px solid #ccc;
      box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
      z-index: 10000 !important;
      border-radius: 20px;
      margin: 20px auto;
  }
  #popupContent {
      text-align: center;
  }
  .popup img {
      display: block;
      margin: 10px auto;
      max-width: 100%;
      height: auto;
  }
  /* Styles pour fermer le popup */
  #closePopup {
      position: absolute;
      top: 10px;
      right: 10px;
      background: none;
      border: none;
      font-size: 18px;
      cursor: pointer;
  }
 
  /* Overlay pour le popup */
  #popupOverlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      z-index: 1000;
  }



  #popupContent .row .col {
   flex: 1;
   padding-left: 15px;
   padding-right: 15px;
}

/* Deux colonnes pour les écrans de bureau */
@media (min-width: 768px) {
   #popup-content .col {
       flex: 1 1 45%;
   }
}

/* Une seule colonne pour les écrans mobiles */
@media (max-width: 767px) {
   #popup{
   height: 80%;
    overflow-y: scroll;
   }
   #popup-content .col {
       flex: 1 1 100%;
   }
   #popupContent .row {
      display: block;
      padding-left: 15px;
      padding-right: 15px;
   }
}
#popupContent .help-footer {
   background: #f4f5f7;
   padding: 0.75rem 1.5rem;
   margin: 10px -20px -24px;
   border-radius: 0 0 20px 20px;
   text-align: center;
   font-size: 12px;
   font-weight: 700;
   line-height: 1.75;
}

.commercekit_sticky-atc .cutom_fields {
   max-width: 95% !important;
   max-height: 50% !important;
   overflow-y: scroll !important;
   padding: 10px !important;
   box-sizing: border-box !important;
}

@media (min-width: 993px) {
   body.header-4:not(.full-width-header) .header-4-inner, .summary form.cart.commercekit_sticky-atc .commercekit-pdp-sticky-inner, .commercekit-atc-sticky-tabs ul.commercekit-atc-tab-links, .h-ckit-filters.no-woocommerce-sidebar .commercekit-product-filters {
       max-width: 1170px;
   }
}
@media (min-width: 993px) {
   form.cart.commercekit_sticky-atc .commercekit-pdp-sticky-inner {
       overflow-y: auto;
       height: 100%;
       padding: 1.5em;
   }
}
.cart .commercekit_sticky-atc{
   overflow-y: overlay !important;
}
@media (max-width: 992px) {
   .commercekit-pdp-sticky-inner {
      overflow-y: visible !important;
      
   }
}

/* Preview wrapper to contain both preview zone and zoom controls */
.preview-wrapper {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Improved preview zone with full rounded corners */
.preview-zone {
    position: relative;
    margin-top: 15px;
    margin-bottom: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: #fff;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-zone:hover {
    border-color: #0AB1F0;
    box-shadow: 0 4px 12px rgba(10, 177, 240, 0.15);
}

/* Enhanced grid background */
.StickyFormeZone {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    background-color: #fff;
    background-image: 
        linear-gradient(rgba(10, 177, 240, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 177, 240, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    transition: background-size 0.3s ease;
}

/* Redesigned zoom controls - now in a separate container below the preview */
.zoom-controls {
    display: none !important;
}

.zoom-btn {
    display: none !important;
}

.zoom-level {
    display: none !important;
}

/* Redesigned scale indicator - now in bottom right corner */
.scale-indicator-container {
    display: none !important;
}

.scale-bar {
    display: none !important;
}

.scale-text {
    display: none !important;
}

/* Enhanced figure styling */
.sticky-figure {
    fill: rgba(10, 177, 240, 0.3);
    stroke: #0AB1F0;
    stroke-width: 1.5;
    transition: fill 0.3s ease, stroke-width 0.3s ease;
}

/* Improved dimension lines */
.sticky-dimension-line {
    stroke: #0AB1F0;
    stroke-width: 2;
    marker-end: url(#line-end);
    marker-start: url(#line-end);
    vector-effect: non-scaling-stroke;
}

/* Improved dimension text */
.sticky-dimension-text {
    fill: #333;
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    alignment-baseline: middle;
    paint-order: stroke;
    stroke: white;
    stroke-width: 1.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Measurement point styling */
.measurement-point {
    fill: #0AB1F0;
    r: 3;
}

.measurement-point:hover {
    fill: #ff6b00;
}

.measurement-guide-dot {
    fill: #ff3b30 !important;
    r: 4 !important;
    stroke: white !important;
    stroke-width: 1 !important;
    z-index: 1000 !important;
    position: relative !important;
}

.measurement-guide-line {
    stroke: #ff3b30 !important;
    stroke-width: 1 !important;
    stroke-dasharray: 3,3 !important;
    z-index: 999 !important;
    position: relative !important;
}

.measurement-guide-label {
    fill: #666;
    font-size: 10px;
    text-anchor: middle;
    alignment-baseline: middle;
}

.measurement-line {
    stroke: #ff3b30 !important;
    stroke-width: 1.5 !important;
    stroke-dasharray: 3,3 !important;
    z-index: 999 !important;
    position: relative !important;
}

/* Make sure all measurement elements are visible on top of other elements */
.measurement-guide-dot, .measurement-line, .measurement-guide-line {
    z-index: 1000 !important;
    pointer-events: none !important;
}

.measurement-label {
    fill: #666;
    font-size: 10px;
    text-anchor: middle;
    alignment-baseline: middle;
}

/* Enhanced preview zone when zoomed */
.preview-zone-zoomed {
    border-color: rgba(10, 177, 240, 0.5);
    box-shadow: 0 0 15px rgba(10, 177, 240, 0.2), inset 0 0 10px rgba(10, 177, 240, 0.1);
    background-color: #f9fdff;
}

/* Enhance the grid background for zoomed shapes */
.preview-zone-zoomed #FormeZone {
    background-image: 
        linear-gradient(rgba(10, 177, 240, 0.05) 1px, transparent 1px), 
        linear-gradient(to right, rgba(10, 177, 240, 0.05) 1px, #ffffff 1px);
    background-size: 10px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zoom-controls {
        flex-wrap: wrap;
    }
    
    .zoom-btn {
        width: 36px;
        height: 36px;
    }
    
    .zoom-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .zoom-level {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* Ensure SVG elements are properly stacked */
svg * {
    transform-box: fill-box;
    transform-origin: center;
}

/* Enhanced mobile responsiveness for main form */
@media (max-width: 768px) {
    /* Make shape grid display in one row without scrolling */
    .shape-grid {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 1px !important; /* Reduced from 2px to save space */
        padding: 5px 0 !important;
    }
    
    .shape-option {
        width: 100% !important;
    }
    
    .shape-content {
        padding: 0px !important;
    }
    
    .shape-content img {
        width: 32px !important; /* Increased from 28px to 32px */
        height: 32px !important; /* Increased from 28px to 32px */
    }
    
    /* Make shape SVGs bigger on mobile */
    .shape-content svg {
        width: 32px !important; /* Increased from 28px to 32px */
        height: 32px !important; /* Increased from 28px to 32px */
        transform: scale(1) !important;
    }
    
    /* Reduce vertical spacing */
    .product_custom_field {
        padding: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .section-header {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }
    
    .section-header h3 {
        font-size: 13px !important;
    }
    
    .step-number {
        width: 18px !important;
        height: 18px !important;
        font-size: 11px !important;
    }
    
    /* Make thickness options more compact */
    .thickness-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)) !important;
        gap: 3px !important;
    }
    
    .thickness-label {
        padding: 4px 6px !important;
        font-size: 11px !important;
    }
    
    /* Make dimension fields more compact */
    .dimensions-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        gap: 6px !important;
    }
    
    .dimension-label {
        font-size: 11px !important;
        margin-bottom: 1px !important;
    }
    
    .dimension-input {
        padding: 5px 6px !important;
        font-size: 12px !important;
        height: 30px !important;
    }
    
    .dimension-limits {
        font-size: 8px !important;
        margin-top: 1px !important;
    }
    
    /* Reduce preview zone height */
    .preview-zone {
        height: 180px !important;
        margin-top: 10px !important;
    }
    
    /* Make zoom controls more compact */
    .zoom-controls {
        padding: 5px !important;
    }
    
    .zoom-btn {
        width: 28px !important;
        height: 28px !important;
    }
    
    .zoom-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .zoom-level {
        font-size: 11px !important;
        padding: 0 8px !important;
        min-width: 50px !important;
    }
    
    /* Make dimension fields display two per row */
    .dimensions-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    /* Make thickness options display in two rows */
    .thickness-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 3px !important;
    }
    
    /* Make dimension inputs more compact */
    .dimension-input {
        padding: 4px 5px !important;
        font-size: 11px !important;
        height: 28px !important;
    }
    
    .dimension-label {
        font-size: 10px !important;
        margin-bottom: 1px !important;
    }
    
    .dimension-limits {
        font-size: 7px !important;
        margin-top: 1px !important;
    }
    
    .dimension-error {
        font-size: 9px !important;
        min-height: 12px !important;
    }
    
    /* Make thickness labels more compact */
    .thickness-label {
        padding: 3px 4px !important;
        font-size: 10px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Reduce help button size */
    .help-btn {
        padding: 2px 4px !important;
        font-size: 12px !important;
    }
    
    /* Reduce dimensions header spacing */
    .dimensions-header {
        margin-bottom: 6px !important;
    }
}

/* Desktop optimizations to match sticky cart compactness */
.shape-selector, .thickness-selector, .dimensions-selector {
    padding: 12px !important;
    margin-bottom: 15px !important;
}

.section-header {
    margin-bottom: 12px !important;
}

.shape-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important; /* Force 7 columns */
    gap: 6px !important;
}

.shape-content {
    padding: 6px !important;
}

.thickness-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important;
    gap: 6px !important;
}

.thickness-label {
    padding: 6px 10px !important;
    font-size: 13px !important;
}

.dimensions-grid {
    gap: 10px !important;
}

.dimension-label {
    margin-bottom: 3px !important;
}

.dimension-input {
    padding: 7px 10px !important;
}

/* Ensure the preview zone has consistent height */
.preview-zone {
    height: 220px !important;
}

/* Make single fields take full width */
.dimensions-grid > .dimension-field:only-child {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
}

/* Ensure single fields in sticky form also take full width */
.sticky-dimensions-grid > .sticky-dimension-field:only-child {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
}

/* Adjust thickness options when there's only one */
.thickness-grid > .thickness-option:only-child {
    grid-column: 1 / -1 !important;
    max-width: 300px !important;
    margin: 0 auto !important;
}

.sticky-thickness-grid > .sticky-thickness-option:only-child {
    grid-column: 1 / -1 !important;
    max-width: 300px !important;
    margin: 0 auto !important;
}

/* Ensure consistent styling for single fields */
@media (min-width: 769px) {
    .dimensions-grid > .dimension-field:only-child,
    .sticky-dimensions-grid > .sticky-dimension-field:only-child {
        max-width: 400px !important;
        margin: 0 auto !important;
    }
}

/* Enhanced price display for main form */
.main-price-section {
    margin-top: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.main-price-display {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    padding: 8px 12px !important;
    background: #f0f8ff !important;
    border-radius: 4px !important;
    border: 1px solid #d1e7ff !important;
    width: 100% !important;
    max-width: 340px !important;
}

.main-price-label {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 14px !important;
    margin-right: 10px !important;
}

.main-price-amount {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0AB1F0 !important;
    text-align: right !important;
}

.main-add-to-cart-btn {
    background: #0AB1F0 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    max-width: 300px !important;
}

.main-add-to-cart-btn:hover:not(:disabled) {
    background: #0899d6 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(10, 177, 240, 0.2) !important;
}

.main-add-to-cart-btn:disabled {
    background: #cccccc !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Responsive adjustments for price section */
@media (max-width: 768px) {
    .main-price-section {
        padding: 10px !important;
    }
    
    .main-price-label,
    .main-price-amount {
        font-size: 12px !important;
    }
    
    .main-price-display {
        flex-direction: row !important;
        align-items: center !important;
    }
}

/* Remove margin from zoom controls */
.zoom-controls {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Ensure consistent spacing on desktop */
@media (min-width: 769px) {
    .product_custom_field,
    .shape-selector, 
    .thickness-selector, 
    .dimensions-selector,
    .main-price-section {
        padding: 10px !important;
        margin-bottom: 2px !important;
    }
}

/* Ensure consistent spacing on mobile */
@media (max-width: 768px) {
    .product_custom_field,
    .shape-selector, 
    .thickness-selector, 
    .dimensions-selector,
    .main-price-section {
        padding: 8px !important;
        margin-bottom: 2px !important;
    }
}

/* Make step labels more responsive */
.step-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: #0AB1F0 !important;
    color: white !important;
    border-radius: 50% !important;
    margin-right: 6px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}

/* Consistent margins for all sections */
.custom_fields {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.product_custom_field,
.shape-selector, 
.thickness-selector, 
.dimensions-selector,
.main-price-section {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    padding: 10px !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .step-number {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        margin-right: 4px !important;
    }
    
    .section-header h3,
    .thickness-header {
        font-size: 13px !important;
        display: inline-block !important;
        align-items: center !important;
        line-height: 1.2 !important;
    }
    
    .product_custom_field,
    .shape-selector, 
    .thickness-selector, 
    .dimensions-selector,
    .main-price-section {
        padding: 8px !important;
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        border-radius: 6px !important;
    }
    
    .section-header {
        margin-bottom: 6px !important;
    }
    
    /* Ensure the dimensions header is properly aligned */
    .dimensions-header {
        align-items: center !important;
    }
    
    /* Make help button smaller on mobile */
    .help-btn {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

.dimension-error {
    color: #dc3545;
    font-size: 11px;
    margin-top: 2px;
    display: block;
    min-height: 14px; /* Ensure space is reserved for error messages */
    font-weight: 500; /* Make errors more visible */
}

/* Special styling for length label */
.length-label {
    text-anchor: middle !important; /* Center the text at its anchor point */
    dominant-baseline: middle !important; /* Vertically center the text */
    fill: #0AB1F0 !important; /* Blue color */
    font-weight: 600 !important; /* Bold text */
}

/* Special styling for height label */
.height-label {
    text-anchor: middle !important; /* Center the text at its anchor point */
    dominant-baseline: middle !important; /* Vertically center the text */
    fill: #0AB1F0 !important; /* Blue color */
    font-weight: 600 !important; /* Bold text */
}

/* Loading overlay styles */
.shape-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none; /* Changed from flex to none, will be toggled with JS */
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 5px;
    /* Removed opacity and visibility transitions */
}

.shape-loading-overlay.active {
    display: flex; /* Changed from opacity to display property */
}

.shape-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(10, 177, 240, 0.2);
    border-radius: 50%;
    border-top-color: #0AB1F0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Make sure the preview zone has position relative for absolute positioning of overlay */
.preview-zone {
    position: relative !important;
}

/* Same for sticky preview zone */
.sticky-preview-zone {
    position: relative !important;
}

/* SVG STYLES FOR SHAPE SELECTION */
.shape-content svg {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.shape-option input[type="radio"]:checked + .shape-content svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .shape-content svg {
        width: 24px;
        height: 24px;
        transform: scale(0.9);
    }
}

/* SVG STYLES FOR STICKY CART */
.sticky-shape-content svg {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.sticky-shape-option input[type="radio"]:checked + .sticky-shape-content svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .sticky-shape-content svg {
        width: 24px;
        height: 24px;
        transform: scale(0.9);
    }
}