.wp-site-blocks > .wp-block-group > .wp-block-group {
    max-width: none !important;
}

.entry-content {
    display: flex;
    justify-content: center;
}

:root{
    /* This fixes the issue with wrongly displayed selection-border of canvas element 
        However, this issue is only in chrome. 
        ! This may break styles of other elements on the page !
    */
    --wp--preset--font-size--xxx-large: initial !important;
    --wp--preset--font-size--xx-large:   initial !important;
    --wp--preset--font-size--x-large:  initial !important;

    --tab-border-color: #828181;

    --wp--style--global--wide-size: 1500px;
}

h2.wp-block-post-title{
    max-width: var(--wp--style--global--wide-size) !important;
}

#editor-page{
    max-width: var(--wp--style--global--wide-size);
}

#editor-app {
    width: 100%;
    /*max-width: none !important;*/
    margin: 0 !important;

    display: flex;
    gap: 1rem;
}

/* Add this class to body during drag/resize/rotate to prevent text selection */
body.is-dragging-element {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Start of Canvas Editor css =========================================================================  */
.editor-content{
    min-width: 280px;
    max-width: 900px;
    flex: 7;
}

.product-info {
    flex: 3;
    min-width: 240px;
}

.editor-container {
    all: revert;
    box-sizing: border-box;
    font-size-adjust: none !important;
}


.editor-container {
    width: 100%;
    background-color: white;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

#upper-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    
}

#visible-canvas {
    position: absolute;
    border: 1px dashed turquoise;
    z-index: 1;
    background: transparent;

    display: block;
}

#product-overlay {
    background-color: white;
    position: relative;
    object-fit: contain;
    max-width: 100%;
    box-sizing: content-box !important; /* Force content-box */
}

/* Container for overlay images */
.overlays-container {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 2;
    pointer-events: none;
}

/* Base styles for the primary overlay image */
#product-overlay .overlay-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Styling for the second overlay image */
#product-overlay .overlay-image2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: block;
}

/* Hide the second overlay when not in use */
#product-overlay .overlay-image2:not([src]) {
    display: none;
}

#hidden-canvas {
    display: none;
}

.selection-border {
    position: absolute;
    border: 1px dashed turquoise;
    cursor: move;
    z-index: 10;
/*    pointer-events: none;*/
    box-sizing: border-box;
}         

.rotation-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    left: 50%;
    top: -20px;
    background: turquoise;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: grab;
    z-index: 20;
}

.rotation-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 0;
    height: 20px;
    border-left: 1px dashed turquoise;
    transform: translateY(-100%);
    pointer-events: none;
    z-index: 15;
}

.rotation-label {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
}

.button {
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    white-space: nowrap; 
}

.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: turquoise;
    border-radius: 50%;
    transform: translate(-50%, -50%); /* Center the circle on the corner */
    pointer-events: auto;
}

.nw-handle { 
    cursor: nw-resize;
    left: 0;
    top: 0;
}

.sw-handle {
    cursor: sw-resize;
    left: 0;
    top: 100%;
}

.se-handle {
    cursor: se-resize;
    left: 100%;
    top: 100%;
}

.delete-button {
    position: absolute;
    transform: translate(-50%, -50%) rotate(0deg); /* Center the circle on the corner */
    top: 0;
    left: 100%;
    width: 22px;
    height: 22px;
    background-color: #ff4444;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 16px;
    border: 1px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: opacity 0.2s ease;
    pointer-events: auto; 
}

.delete-button:hover {
    background-color: #ff0000;
}

.dragging .delete-button,
.dragging .resize-handle {
    opacity: 0.5;
}

.guide-container {
    position: absolute;
    pointer-events: none;
}

.guide-line {
    position: absolute;
    pointer-events: none;
    z-index: 9;
    opacity: 0;
    transition: opacity 0.2s;
    background: none;
    box-sizing: content-box !important;
}

.guide-line.horizontal {
    height: 0;
    background: none;
    width: 100%;
    border: none;  /* Reset all borders first */
    border-top: 1px dashed turquoise;
    top: 50%;
}

.guide-line.vertical {
    width: 0;
    height: 100%;
    border: none;  /* Reset all borders first */
    border-left: 1px dashed turquoise;
    left: 50%;
}

.guide-line.left {
    width: 0;
    height: 100%;
    border: none;  /* Reset all borders first */
    border-left: 1px dashed turquoise;
    left: 0%;
}

.guide-line.right {
    width: 0;
    height: 100%;
    border: none;  /* Reset all borders first */
    border-left: 1px dashed turquoise;
    left: 100%;
}

.guide-line.top {
    height: 0;
    background: none;
    width: 100%;
    border: none;  /* Reset all borders first */
    border-top: 1px dashed turquoise;
    top: 0%;
}

.guide-line.bottom {
    height: 0;
    background: none;
    width: 100%;
    border: none;  /* Reset all borders first */
    border-top: 1px dashed turquoise;
    top: 100%;
}

/* Be specific about which border to make solid when snapped */
.guide-line.horizontal.snapped {
    border-top: 1px solid turquoise;
}

.guide-line.vertical.snapped {
    border-left: 1px solid turquoise;
}

.guide-line.top.snapped {
    border-top: 1px solid turquoise;
}

.guide-line.bottom.snapped {
    border-bottom: 1px solid turquoise;
}

.guide-line.left.snapped {
    border-left: 1px solid turquoise;
}

.guide-line.right.snapped {
    border-left: 1px solid turquoise;
}        

.selection-border {
    z-index: 10;
}

.resize-handle {
    z-index: 11;
}

.rotation-handle {
    z-index: 11;
}

.delete-button {
    z-index: 11;
}

.guide-container {
    z-index: 9;
}

.resize-indicator {
    position: fixed;
    display: flex;  /* Add this */
    align-items: stretch;  /* Add this */
    pointer-events: none;
    z-index: 1000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    white-space: nowrap;
}

.resize-indicator__dim {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px 0 0 4px;
    white-space: nowrap;
}

.resize-indicator__quality {
    background: #3d8e40;  /* Green background */
    color: white;
    padding: 4px 8px;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
}

.resize-indicator__quality--good {
    background: var(--dpi-good);
}

.resize-indicator__quality--okay {
    background: var(--dpi-okay);
}

.resize-indicator__quality--poor {
    background: var(--dpi-poor);
}

/* to override WooCommerce styles */
.editor-container .selection-border {
    box-sizing: content-box !important; /* Force content-box, important for proper ".selection-border display */
    margin: 0 !important;
    padding: 0 !important;
}

/* End of Canvas Editor css =========================================================================  */

/* start of Product info css =========================================================================  */

/* Tool Tabs Section */
.tool-tabs {
    margin-bottom: 0rem;
}

.tool-buttons {
    display: flex;
    margin-bottom: 0; /* Remove bottom margin since it's now separate */
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    width: 100%;
    border-radius: 8px 8px 0 0; /* Only round top corners */
    padding-bottom: 10px;
}

.left-buttons {
    display: flex;
    flex-wrap: nowrap; /* MODIFIED: Prevent Image/Text buttons from wrapping */
    gap: 1rem;
}

.right-button {
    margin-left: auto;
}

.tool-btn {
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-color);
    background-color: var(--tab-bck);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    position: relative;
}

.left-buttons .tool-btn {
    flex-shrink: 0; /* ADDED: Prevent the main tool buttons from shrinking */
}

.tool-btn:hover {
    border-color: var(--tab-border-color);
    background-color: #f9f9f9;
}

.tool-btn.active {
    background-color: var(--btn-bck);
    color: white;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.tool-btn svg {
    width: 18px;
    height: 18px;
    fill: transparent;
    stroke: currentColor;
}

.tool-btn.txt-icon svg {
    fill: currentColor;
    stroke: none;
}



.tool-btn img {
    fill: var(--text-color);
}

.tool-btn.txt-icon.active svg {
    fill: white;
    stroke: none;
}

.tool-btn.active svg {
    fill: var(--btn-bck);
    stroke: white;
}

/* Tool Content Panel */
.tool-content-panel {
    background-color: var(--tab-bck);
    border-radius: 0 0 8px 8px; /* Only round bottom corners */
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.tool-content-inner {
    padding: 1.5rem;
}

.tool-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tool-content:first-child,
.tool-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Better spacing for tool content sections */
.tool-content .drop-zone {
    margin-bottom: 0;
}

.tool-content .toolbar {
    margin-bottom: 1rem;
}

.tool-content .text-editor {
    margin-top: 1rem;
}

/* Improve the visual connection between tabs and content */
.tool-tabs {
    position: relative;
    z-index: 2;
}

.product-info-content{
    border-radius: 8px;
    background-color: var(--tab-bck);
    padding: 1.5rem;
    color: var(--text-color);
    font-family: var(--font-body);
}

.product-info-content h2{
    font-family: var(--font-body);
    padding: 0;
}

.thumbnail-grid {
    display: flex;
    gap: 0.5rem;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid var(--button-border-color);
    border-radius: 4px;
    cursor: pointer;
    padding: 0.25rem;
}

.thumbnail.active {
    border-color: #26b7b7;
}

.product-title-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
    flex-wrap: nowrap; /* This is the key change to prevent wrapping */
    gap: 10px;
    overflow: hidden; /* Add to contain the elements */
}

#change-product-btn{
    display: none;
}

.mobile-change-btn {
    padding: 0.5rem 0.75rem;
    background-color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
    flex-shrink: 0;
}

    .mobile-change-btn .change_title {
        display: inline;
    }

.mobile-change-btn:hover {
    border-color: var(--tab-border-color);
}

.mobile-change-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: transparent;
}

.product-title {
    font-size: 1.5rem;
    color: var(--text-color);

    /* Add these properties for truncation */
    flex: 1; /* Allow the title to grow and shrink */
    min-width: 0; /* Crucial for allowing flex items to shrink below their content size */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.product-description {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/*
.image-design-elements {
     romoved because of .info-circle:hover::after
    max-height: 200px;
    overflow-y: auto;
}
*/

.empty-images-message {
    padding: 1rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

.image-info-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: .5rem;


    border: 1px solid var(--button-border-color);
    border-radius: 6px;
    background-color: white;
}

.image-info-item.selected {
    border-color: var(--btn-bck);
}

.image-info-item:hover {
    background-color: #f9f9f9;
}

.image-info-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    color: var(--btn-bck);
}

.image-info-dpi {
    margin-left: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    
    padding: 0.25rem 0.5rem;
}

.dpi-good {
    color: var(--dpi-good);
}

.dpi-okay {
    color: var(--dpi-okay);
}

.dpi-poor {
    color: var(--dpi-poor);
}

.image-info-delete {
    background: none;
    border: none;
    color: #666;
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: 0.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.image-info-delete:hover {
    background-color: #ff4444;
    color: white;
}

.info-circle {
    position: relative;
    display: inline-flex; 
    width: 18px;
    height: 18px;
    background-color: #949494;
    border-radius: 50%;
    
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.info-circle:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--info-box-bck);
    color: white;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;  /* Ensure it appears above other elements */
    width: 250px;

    left: auto;
    right: -20px;
    transform: none;
}


.drop-zone {
    border: 1px dashed var(--button-border-color);
    border-radius: 6px;
    background-color: white;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center; 
    flex-direction: column;
    margin-bottom: 1rem;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--btn-bck);
}

.drop-zone--over {
    border-color: var(--btn-bck);
    background-color: rgba(76, 175, 80, 0.1);
}

.drop-zone__prompt {
    font-size: 14px;
}

.drop-zone__prompt span{
    color: var(--btn-bck);
}

.drop-zone p {
    font-size: 12px;
}

.drop-zone__input {
    display: none;
}

.drop-zone__thumb {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background-color: #cccccc;
    background-size: cover;
    position: relative;
}

.drop-zone__thumb::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.75);
    font-size: 14px;
    text-align: center;
}

.icon-container {
    width: 44px;
    height: 44px;
    border-radius: 50%;  /* This makes it circular */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--tab-bck);
    margin-bottom: 0.75rem;
  }
  
  /* Optional hover effect */
  .icon-container.hover {
    background-color: rgba(64, 179, 195, 0.1);
    transform: scale(1.1);
  }

/* overrideing style.css ============*/

.size-box {
    border: 1px solid transparent;
    outline: none;
    background-color: white;
}

.size-box:hover {
    border-color: var(--tab-border-color);
}

.size-box.selected {
    border-color: var(--btn-bck);
}

.custom-variations-container {
    margin-bottom: 1.5rem;
}

.custom-variations-container h5, 
.custom-variations-container .orientation-selector-container h5{
    margin-bottom: 0.5rem;
}
/*==================================*/

/* --- Add to Cart Section (UPDATED) --- */

/* Main container for desktop */
.add-to-cart {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.add-to-cart-form {
    margin: 0;
    padding: 0;
}

/* Container for quantity and button on desktop */
.add-to-cart-right {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--button-border-color);
    border-radius: 8px;
    width: fit-content;
    background: white;
    height: 44px; /* Increased height for better touch targets */
}
  
.quantity-btn {
    border: none;
    background: none;
    color: #4b5563;
    font-size: 1.25rem; /* Larger for easier tapping */
    padding: 0 1rem;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.quantity-btn:focus-visible, 
.quantity-btn:hover {
    background-color: #f3f4f6;
    outline: none;
}
  
.quantity-input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0;
    height: 100%;
    -moz-appearance: textfield; /* Firefox */
    background: transparent;
    outline: none;
}

.quantity-input:focus {
    outline: none;
    box-shadow: none;
}
  
/* Remove spinner arrows for Chrome, Safari, Edge, Opera */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-btn {
    min-width: 150px;
    height: 44px; /* Match quantity height */
    width: fit-content;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 24px;
    background: #26b7b7;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.cart-btn.active,
.cart-btn:hover,
.cart-btn:focus{
    background-color: var(--btn-hover);
    outline: none;
}

/* Cart button spinner */
.cart-btn.wc-block-components-button--loading {
    position: relative;
    text-indent: -9999em;
    overflow: hidden;
    background-color: #34c6cd; 
    opacity: 0.8; /* Makes it look more disabled */
    outline: none;
}

.cart-btn.wc-block-components-button--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 1em; 
    height: 1em;
    border-radius: 50%;
    border: 0.25em solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    animation: wc-block-components-button-spinner__animation 1s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

@keyframes wc-block-components-button-spinner__animation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
/* End Cart button spinner */

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    margin-right: auto; /* Pushes the form to the right on desktop */
}



#text-area-input {
    /* Ensure proper whitespace handling */
    white-space: pre-wrap;
    /* Maintain spaces and line breaks */
    overflow-wrap: break-word;
    /* Ensure vertical scrolling works properly */
    overflow-y: auto;
    /* Fix text and caret color */
    color: #000;
    /* Ensure caret is visible on all backgrounds */
    caret-color: #000;
    /* Prevent textarea from collapsing empty lines */
    min-height: 100px;
    /* Add some padding for better text visibility */
    padding: 8px;
    /* Prevent horizontal scrolling */
    resize: vertical;
    /* Improve font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent iOS zoom on focus */
    font-size: 16px;
    /* Ensure proper line height */
    line-height: 1.5;
    /* Add border and rounded corners */
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Improve focus state */
    outline: none;
    transition: border-color 0.2s ease;

    width: 100%;
    height: 100px; /* Set your desired height in pixels here */
    box-sizing: border-box; /* This ensures padding doesn't increase the width beyond 100% */
    margin-bottom: 1.5rem;
}

#text-area-input:focus {
    border-color: #228293;
    /* Optional: add a subtle box shadow on focus */
    box-shadow: 0 0 0 2px rgba(34, 130, 147, 0.1);
}

.toolbar{
    align-items: center;
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    column-gap: 24px;
    row-gap: 8px;
    margin-bottom: 8px;
}

.text-style-buttons,
.allign-buttons {
    display: flex;
    gap: 8px;
}

.style-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    height: 1.5rem;
    width: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);      
}

.style-btn.active {
    background-color: var(--button-border-color);
    border-color: #999;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.font-selector {
    color: #292929;
    background-color: white;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.font-selector option {
    padding: 4px;
}

.font-selector optgroup {
    font-weight: bold;
}


/* Make all select elements consistent width */
select.font-selector {
    width: 180px; /* Set a fixed width */
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px; /* Make space for the arrow */
}

/* Safari and Chrome */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select.font-selector {
        padding-right: 30px;
    }
}

/* Firefox */
@-moz-document url-prefix() {
    select.font-selector {
        padding-right: 30px;
    }
}

/* For better select option styling across browsers - helps maintain width consistency */
option {
    font-size: 14px; /* Consistent font size */
    padding: 8px; /* Consistent padding */
}

/* Ensure optgroup doesn't create inconsistencies */
optgroup {
    font-size: 14px;
    padding: 0;
}

/* Add this to help with width calculations */
.font-selector-container {
    position: relative;
    display: inline-block;
    width: 180px;
}
/* End of Make all select elements consistent width */

.text-color-selector {
    position: relative;
  }
  
  .color-title {
    font-size: 12px;
    padding: 4px 8px;
    color: #4B5563;
    background-color: white;
    border: 1px solid var(--button-border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
  }

  .color-title img {
    padding-right: 8px;
  }
  
  .color-title:hover {
    background-color: #f0f0f0;
  }
  
  .color-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 0 8px;
    border: 1px solid #d1d5db;
  }
  
  .color-dropdown-icon {
    font-size: 10px;
    color: #666;
  }
  
  .color-palette {
    display: none;
    position: absolute;
    top: 100%;
    left: -100px;
    width: 220px;
    background-color: white;
    border: 1px solid var(--button-border-color);
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
  }
  
  .text-color-selector.open .color-palette {
    display: flex;
  }
  
  .color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .color-btn:hover {
    transform: scale(1.1);
  }
  
  .color-btn.selected {
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1DB5BE;
  }
  
  .color-btn.selected::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
  }

  .hidden{
    display: none;
  }

  .orientation-selector-container {
    margin-bottom: 1.5rem;
}

.orientation-selector-container.hidden {
    display: none;
}

.orientation-selector-container h5 {
    display: block;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-color);
}

.orientation-selector-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.orientation-box {
    padding: 4px 12px;
    border: 1px solid transparent;
    background-color: white;
    outline: 1px solid transparent;
    cursor: pointer;
    color: #1F2937;
    font-size: 1rem;
    border-radius: 4px;
    box-sizing: border-box;
}

.orientation-box.disabled {
    opacity: 0.5;
    cursor: default;
    background-color: #f1f1f1;
    border-color: #d1d5db;
}

.orientation-box:hover {
    border-color: var(--tab-border-color);
}

.orientation-box.selected {
    border-color: var(--btn-bck);
}

/* Ensure no hover effect on disabled buttons */
.orientation-box.disabled:hover {
    border-color: #d1d5db;
}

/* Container for the entire printfiles section */
.printfiles-container {
    position: relative;
    max-width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    box-sizing: border-box; 
}

/* The printfiles grid with horizontal scrolling */
.printfiles-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 10px 30px; 
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.printfile {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    color: #555;
    transition: all 0.2s ease;
}

.printfile.active {
    border-bottom: 2px solid #26b7b7;
    font-weight: 600;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.printfiles-grid::-webkit-scrollbar {
    display: none;
}


/* Navigation arrows */
.printfiles-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, opacity 0.2s;
  }

.printfiles-nav-arrow:hover {
    background-color: #f5f5f5;
}

.printfiles-nav-arrow.disabled {
    display: none;
}


.printfiles-prev {
    left: 0;
}

.printfiles-next {
    right: 0;
}

.add-to-cart .price small{
    color: #666;
    font-weight: 400;
    font-size: .9rem;
}

/* Mobile phone screens - stack vertically */
@media (max-width: 768px) {
    #editor-app {
        flex-direction: column;
        gap: 1rem;
    }
    
    .editor-content {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        order: 1; /* Show editor first */
    }
    
    .product-info {
        flex: none;
        width: 100%;
        min-width: auto;
        order: 2; /* Show product info second */
    }
    
    /* Larger touch targets for mobile */
    .resize-handle {
        width: 20px;
        height: 20px;
    }

    .rotation-handle {
        width: 24px;
        height: 24px;
        top: -30px; /* Adjust position for larger handle */
    }

    .rotation-line {
        height: 30px; /* Adjust line to meet handle */
    }

    .delete-button {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    /* Tool tabs responsive */
    .tool-buttons {
        gap: 0.75rem;
    }
    
    .left-buttons {
        gap: 0.75rem;
    }
    
    .tool-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
        justify-content: flex-start;
        
    }
    
    .left-buttons .tool-btn {
        width: auto; /* ADDED: Override full-width stacking on mobile */
        justify-content: center; /* ADDED: Re-center content now that button isn't full-width */
    }
    
    .right-button {
        margin-left: 0;
        order: -1; /* Show change product button at top on mobile */
    }
    
    .tool-content-inner {
        padding: 1rem;
    }
    
    /* Adjust product info content padding for mobile */
    .product-info-content {
        padding: 1rem;
    }
    
    /* Adjust add to cart section for mobile (UPDATED) */
    .add-to-cart {
        justify-content: space-between; /* Puts price left, quantity right */
        row-gap: 1rem; /* Creates space when the button wraps */
    }
    
    /* 
     * This is the key change. `display: contents` makes the form and its inner
     * div "disappear" for layout purposes, promoting .quantity and .cart-btn
     * to be direct flex children of .add-to-cart.
    */
    .add-to-cart-form,
    .add-to-cart-right {
        display: contents;
    }
    
    /* Force the button to take up the full width on the next line */
    .cart-btn {
        width: 100%;
        min-width: auto;
        order: 3; /* Third item, which wraps to the next line */
    }
    
    /* Ensure quantity is on the right */
    .quantity {
        order: 2; /* Second item in the row */
    }
    
    /* Adjust price display */
    .price {
        text-align: left; /* Align to the left */
        margin-right: 0;
        order: 1; /* First item in the row */
    }
    
    /* Make text area smaller on mobile */
    #text-area-input {
        height: 80px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Adjust toolbar for mobile */
    .toolbar-row {
        gap: 16px 12px;
    }
    
    .text-style-buttons,
    .allign-buttons {
        gap: 6px;
    }
    
    /* Adjust font selector width */
    select.font-selector,
    .font-selector-container {
        width: 140px;
    }
    
    /* Adjust color palette positioning on mobile */
    .color-palette {
        left: -80px;
        width: 200px;
    }
}

@media (max-width: 1024px) {
    .tool-btn {
        max-width: 240px;
    }
    
    .right-button {
        margin-left: 0;
        align-self: flex-start;
        max-width: 240px;
    }

    .product-description{
        display: none;
    }
}

@media (max-width: 1350px) {
   

    .tool-btn {
        max-width: 240px;
       
    }
}

@media (max-width: 1550px) {
   

    /* Hide desktop change button */
    .tool-btn.right-button {
        display: none;
    }

    .mobile-change-btn .change_title {
        display: none;
    }
}

/* End of Product info css =========================================================================  */

.design-editor-notices {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999999;
}

.design-editor-notice {
    background-color: #FEF2F2;
    border: 1px solid #DC2626;
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes notice-timer {
    from { width: 100%; }
    to { width: 0%; }
}

.design-editor-notice-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.design-editor-notice-icon {
    padding: 2px;
    border-radius: 50%;
    background-color: #cc1818;
}

.design-editor-notice-icon svg {
    fill: white;
    display: block;
    width: 20px;
    height: 20px;
}

.design-editor-notice-content {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 20px;
    padding-top: 1px;
}

.design-editor-notice-dismiss {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 12px;
}

.design-editor-notice-dismiss:hover {
    color: #000;
}

.image-info-printfile {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    font-style: italic;
}


/* Add this to your design-editor.css file */

/* Style Selection Popup Styles ==================================================================== */
.style-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.style-selection-overlay.show {
    opacity: 1;
    visibility: visible;
}

.style-selection-popup {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.style-selection-overlay.show .style-selection-popup {
    transform: scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px;
    line-height: 1;
}

.popup-close:hover {
    color: #333;
}

.popup-content {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: filter 0.3s ease;
}

.image-preview.processing {
    filter: blur(4px);
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.processing-overlay.show {
    display: flex;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top: 4px solid #26b7b7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.processing-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.cancel-button {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-button:hover {
    background: #ff0000;
}

.styles-section {
    margin-bottom: 24px;
}

.styles-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    display: block;
}

.styles-container {
    position: relative;
    overflow: hidden;
}

.styles-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.styles-grid::-webkit-scrollbar {
    display: none;
}

.style-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.style-item:hover {
    background-color: #f8f9fa;
}

.style-item.selected {
    background-color: #e8f5f5;
    border: 2px solid #26b7b7;
}

.style-item.processing {
    opacity: 0.5;
    pointer-events: none;
}

.style-preview {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid transparent;
    margin-bottom: 8px;
}

.style-item.selected .style-preview {
    border-color: #26b7b7;
}

.style-name {
    font-size: 12px;
    text-align: center;
    color: #333;
    line-height: 1.2;
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-secondary:hover {
    background: #d5d5d5;
}

.btn-primary {
    background: #26b7b7;
    color: white;
}

.btn-primary:hover {
    background: #1fa5a5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive design for style selection popup */
@media (max-width: 768px) {
    .style-selection-popup {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .popup-content {
        padding: 16px;
    }
    
    .image-preview-container {
        height: 250px;
    }
    
    .popup-actions {
        padding: 16px;
    }
}
/* end of Style Selection Popup Styles ==================================================================== */

.message-dots {
    display: inline-block;
    width: 1.5em; /* Fixed width in em units */
    text-align: left;
    font-family: monospace; /* Ensures consistent dot spacing */
    flex-shrink: 0;
}

.cart-btn:disabled,
.cart-btn--unavailable {
    background-color: #9ca3af !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.cart-btn:disabled:hover,
.cart-btn--unavailable:hover {
    background-color: #9ca3af !important;
    transform: none !important;
}

/* Enhanced tooltip styling for unavailable button */
.cart-btn--unavailable[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.cart-btn--unavailable[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}