/* Product Viewer Shared Styles */
/* Used across all product pages for consistent design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fef7f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f0e8;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #e8dfd5;
    transform: translateX(-4px);
}

.product-title-header {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    font-family: 'Poppins', sans-serif;
}

.etsy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.etsy-link:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

/* Viewer Section */
.viewer-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.viewer-container {
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8dfd5 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.viewer-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-group {
    background: #f5f0e8;
    padding: 16px;
    border-radius: 8px;
}

.control-group h3 {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.control-row:last-child {
    margin-bottom: 0;
}

.control-label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2563eb;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.color-input {
    width: 60px;
    height: 36px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
}

.color-select {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    font-weight: 500;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.info-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
}

.info-card p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 16px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    font-size: 14px;
    color: #495057;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.info-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 16px;
    color: #495057;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .viewer-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .product-title-header {
        font-size: 22px;
    }

    .viewer-container {
        height: 400px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}
