/* Ring Customizer V2 - Modern Styles */

:root {
    --primary: #d4af37;
    --primary-dark: #b8962e;
    --bg-dark: #1a1a1a;
    --bg-card: #242424;
    --bg-input: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #3a3a3a;
    --success: #4CAF50;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Main Layout */
.customizer-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Preview Section */
.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: sticky;
    top: 0;
    height: 100vh;
}

.preview-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

#ringPreview {
    background: transparent;
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
}

.preview-nav {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-nav:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.view-indicator {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.view-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.view-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.view-labels {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.view-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.2s;
}

.view-label.active {
    color: var(--primary);
    background: rgba(212, 175, 55, 0.1);
}

/* Customization Panel */
.customization-panel {
    background: var(--bg-card);
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.price-display {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Tab Content */
.tab-content {
    min-height: 350px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-pane h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* Option Grid */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.option-card:hover {
    border-color: var(--border-color);
}

.option-card input {
    display: none;
}

.option-card input:checked + .option-swatch {
    box-shadow: 0 0 0 3px var(--primary);
}

.option-card input:checked ~ .option-name {
    color: var(--primary);
}

.option-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.option-card.small .option-swatch {
    width: 40px;
    height: 40px;
}

.option-name {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.option-price {
    font-size: 11px;
    color: var(--primary);
    margin-top: 4px;
}

/* Text Inputs */
.text-input-group {
    margin-bottom: 20px;
}

.text-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.text-input-group label small {
    color: var(--text-secondary);
    font-weight: 400;
}

.text-input-group input,
.text-input-group select,
.design-type-select select,
.sport-select select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.text-input-group input:focus,
.text-input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.text-input-group input::placeholder {
    color: var(--text-secondary);
}

/* Color Options */
.text-color-select {
    margin-top: 20px;
}

.text-color-select label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.color-options {
    display: flex;
    gap: 15px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--bg-input);
    border-radius: var(--radius);
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-option input:checked + .color-swatch {
    box-shadow: 0 0 0 2px var(--primary);
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Side Design */
.side-design {
    padding: 15px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.design-type-select,
.sport-select {
    margin-bottom: 15px;
}

.design-type-select label,
.sport-select label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.size-option {
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-option input {
    display: none;
}

.size-value {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.size-option input:checked + .size-value {
    border-color: var(--primary);
    color: var(--primary);
}

.size-option:hover .size-value {
    border-color: var(--border-color);
}

.size-guide-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.size-guide-link:hover {
    text-decoration: underline;
}

.help-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Panel Actions */
.panel-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.btn-secondary,
.btn-primary {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-add-cart {
    width: 100%;
    padding: 18px 30px;
    background: var(--success);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 900px) {
    .customizer-container {
        grid-template-columns: 1fr;
    }

    .preview-section {
        position: relative;
        height: auto;
        min-height: 400px;
        padding: 30px 20px;
    }

    #ringPreview {
        max-width: 300px;
    }

    .customization-panel {
        max-height: none;
    }
}

@media (max-width: 500px) {
    .tab-nav {
        justify-content: center;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .option-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
