:root {
    --primary-color: #000f3f;
    --secondary-color: #e5e5e7;
    --accent-color: #b7b7b7;
    --dark-color: #2b2d42;
    --light-color: #f8f9fa;
    --success-color: #7d7d7d;
    --warning-color: #ff040d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}



.customizer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.app-header .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.design-area {
    flex: 1;
    min-width: 300px;
}

.controls-panel {
    flex: 0 0 350px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    height: fit-content;
}

.controls-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Thumbnail Navigation */
.thumbnail-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.thumbnail-btn {
    background: none;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.thumbnail-btn.active {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.thumbnail-btn img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.thumbnail-btn span {
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* T-Shirt Display */
.tshirt-display {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tshirt-preview {
    display: none;
}

.tshirt-preview.active {
    display: block;
}

.tshirt-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1.2;
    margin: 0 auto;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
     touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.tshirt-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.design-layer {
   position: absolute;
    top: 115px;     /* Adjust Y position on shirt */
    left: 120px;    /* Adjust X position on shirt */
    width: 160px;
    height: 200px;
    border: 2px dashed rgba(0, 0, 0, 0.4);  /* Dotted boundary */
    z-index: 2;
    pointer-events: none;  /* So user can drag logos inside */
    box-sizing: border-box;
    overflow: hidden; 
}

.design-layer > * {
    pointer-events: auto;
}

@media (max-width:768px) {
    .design-layer{
        /* top: 90px; */
        /* left: 94px; */
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 132px;
        height: 170px;
        
    }


    
}

@media (max-width:395px) {

    .design-layer{
        /* top: 90px;
        left: 82px; */
        width: 115px;
        height: 150px;
        
    }
}



/* Color Selection */
.color-circles {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 30px;
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: var(--transition);
    padding: 2px;

}

.color-circle.active {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* File Upload */
.file-upload {
    display: block;
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-btn {
    display: inline-block;
    padding: 0.6rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.upload-btn:hover {
    background-color: var(--secondary-color);
}

.file-name {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Text Controls */
.text-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.text-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.add-text-btn {
    padding: 0.7rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-text-btn:hover {
    background-color: #3a7bc8;
}

.text-options {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
}

.option-row {
    margin-bottom: 0.8rem;
}

.option-row:last-child {
    margin-bottom: 0;
}

.option-row label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #495057;
}

.styled-select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    background-color: white;
    font-size: 0.9rem;
    width: 150px;
}

.styled-range {
    width: 120px;
    margin-right: 0.5rem;
}

.styled-color {
    width: 30px;
    height: 30px;
    border: 1px solid #ced4da;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
}

/* Design Elements */
.design-element {
    position: absolute;
    cursor: move;
    user-select: none;
    border: 1px dashed transparent;
    box-sizing: border-box;
    overflow: visible;
    min-width: 50px;
    min-height: 50px;
    touch-action: none;
}

.design-element.selected {
    border:2px dashed #8b8b8b;
    /* background-color: rgba(67, 97, 238, 0.1); */
}

.design-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: move;
}



.delete-btn-container {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 24px;
    height: 24px;
    z-index: 10;
}

.delete-btn {
    width: 100%;
    height: 100%;
    background: var(--warning-color);
    color: white;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.design-element:hover .delete-btn,
.design-element.selected .delete-btn {
    display: flex;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f4ff;
}

.delete-btn-container {
  position: absolute;
  top: -10px;
  right: -10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}


.adjust-btn-container{
  position: absolute;
    /* top: 9px; */
    /* right: 37px; */
    display: flex;
    gap: 6px;
    transform: rotate(147deg);
    z-index: 11;
    left: -7px;
    bottom: -6px;
}

.delete-btn
 {
  background: #ff3b3b;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

.adjust-btn{
    background: #3b9aff;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);

}

.design-element.selected .delete-btn,
.design-element.selected .adjust-btn {
  display: flex;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .controls-panel {
        flex: 1;
    }
    
    .thumbnail-nav {
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}