body {
  margin: 0;
  font-family: Arial, sans-serif;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  background-color: #f0f0f0; /* Visual guide */
}
.col {
  width: 50%;
  padding: 20px;
  box-sizing: border-box;
}
.col-1 {
  background-color: #e0e0e0; /* Visual guide */
}
.col-2 {
  background-color: #d0d0d0;
  padding: 40px; /* More padding for controls */
}

.img {
  max-width: 100%;
  height: auto;
  width: 100%;
  display: block;
}

/* Customizer Styles */
.product-preview-wrapper {
    position: relative;
    width: 100%;
    /* Activate Container Queries */
    container-type: inline-size;
    container-name: preview;
}

/* The 'Special Area' constraints */
/* Note: We rely on % for top/left/width/height which inherently scales */
.overlay-area {
    position: absolute;
    top: 10%;    
    left: 21%;   
    width: 50%;  
    height: 50%; 
    border: 1px dashed rgb(0, 0, 0); 
    overflow: hidden; 
    display: block; 
    pointer-events: none; 
}

/* Second Area (Wrist) */
/* % units ensure this scales with the image */
.wrist-area {
    top: 67%;    
    left: 21%;   
    width: 50%;  
    height: 20%; 
}

.layer {
    position: absolute; 
    /* We will set initial top/left in JS or default to 50% */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    pointer-events: auto;
    text-align: center;
    margin: 0;
    cursor: grab; 
    user-select: none;
    
    /* Responsive Font Size Fallback (JS will override with cqw) */
    font-size: 5cqw; 
    
    /* Prevent wrapping */
    white-space: nowrap;
}

.layer:active {
    cursor: grabbing;
}

/* Logo specific styles */
.logo-layer {
    /* Initial size in % relative to overlay-area */
    width: 30%; 
    height: auto;
}

#user-logo {
    display: none; 
    width: 100%; /* Fill the drag/resize container */
    height: 100%;
    pointer-events: none; /* Let clicks pass to the container for dragging */
    -webkit-user-drag: none; /* Prevent native image drag */
}

/* Resize Handles */
.resizer {
    width: 10px;
    height: 10px;
    background: #fcfcfc;
    position: absolute;
    border-radius: 50%;
    z-index: 10;
    display: none; /* Hidden until active/logo present */
}

.logo-layer:hover .resizer,
.logo-layer.active .resizer {
    display: block; /* Show on hover or active */
}

.resizer.ne { top: -5px; right: -5px; cursor: ne-resize; }
.resizer.nw { top: -5px; left: -5px; cursor: nw-resize; }
.resizer.se { bottom: -5px; right: -5px; cursor: se-resize; }
.resizer.sw { bottom: -5px; left: -5px; cursor: sw-resize; }

/* Text specific styles */
#text-container {
    font-size: 24px;
    font-weight: bold;
    word-break: break-word; /* Prevent long words from breaking layout */
}

/* Control Panel Styling */
.control-group {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-group h3 {
    margin-top: 0;
}

.control-group label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
}

.control-group input[type="text"], 
.control-group select,
.control-group input[type="file"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 5px;
}
