/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at center 30%, #ffffff 10%, #bfbfbf 100%);
    color: #1a1a1a;
}

/* App Container Layout */
.app-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Center Model Area */
.workspace {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 80%;
    z-index: 10;
}

.preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Left Sidebar - Patterns */
.left-sidebar {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    padding: 20px 0;
    max-height: 350px;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

.pattern-list::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #000;
}

.pattern-item {
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s ease;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pattern-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.pattern-item.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a;
}

.sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 15px;
}

.sidebar-nav button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #1a1a1a;
}

/* Right Sidebar - Menus */
.right-sidebar {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: flex-start;
    gap: 80px;
    z-index: 20;
}

.menu-container {
    width: 200px;
}

.accordion-item {
    margin-bottom: 5px;
}

.accordion-header {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.accordion-header i {
    font-size: 0.8rem;
    margin-right: 8px;
    width: 12px;
    text-align: center;
}

.accordion-content {
    display: none;
    padding-left: 20px;
    padding-bottom: 10px;
}

.option-list {
    list-style: none;
}

.option-list li {
    font-size: 0.85rem;
    margin: 8px 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #555;
    transition: color 0.2s;
}

.option-list li:hover,
.option-list li.active {
    color: #000;
    font-weight: 600;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.action-panel {
    display: flex;
    align-items: center;
}

.add-to-cart-btn {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.add-to-cart-btn:hover {
    color: #000;
    transform: translateY(-1px);
}

/* Inputs / Details */
.upload-wrapper label {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
    color: #555;
}

.upload-wrapper input {
    font-size: 0.75rem;
}

.input-light input {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    background: transparent;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Bottom Color Bar */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: stretch;
    background: transparent;
    z-index: 30;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-palette-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    /* Align colors to bottom */
}

.color-palette {
    display: flex;
    min-width: 1500px;
    /* Force it to overflow outside wrapper so buttons work */
    width: max-content;
    height: 50px;
}

.color-swatch {
    flex: 1;
    height: 40px;
    /* Normal height */
    cursor: pointer;
    transition: height 0.2s ease, transform 0.2s;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.color-swatch.active {
    height: 55px;
    /* Expanded height when selected */
    transform: translateY(0);
}

.view-controls {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    padding: 0 20px;
}

.view-arrow {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px;
}

.view-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #1a1a1a;
}

/* Modal and Overlays (Same as previous roughly) */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 0.9rem;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.checkout-btn:hover {
    background: #333;
}

.custom-text-overlay {
    position: absolute;
    pointer-events: auto;
    font-weight: 700;
    text-align: center;
    white-space: pre-wrap;
    z-index: 10;
    font-size: 2.2rem;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

.draggable-item:hover {
    outline: 2px dashed rgba(74, 110, 224, 0.5);
    cursor: move;
}