:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --accent-color: #10b981;
    --text-color: #334155;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --error-color: #ef4444;
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #0f172a;
}

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

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Products Grid */
.products-showcase {
    padding: 4rem 0;
    background: var(--white);
}

.products-showcase h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem 1rem 0.5rem;
}

.product-card .price {
    padding: 0 1rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.125rem;
}

.product-card .btn {
    margin: 1rem;
}

/* Design Studio */
.design-studio {
    display: flex;
    min-height: calc(100vh - 200px);
}

.design-sidebar {
    width: 350px;
    background: var(--white);
    padding: 2rem;
    overflow-y: auto;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.design-canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #e5e7eb;
    position: relative;
}

.design-section {
    margin-bottom: 2rem;
}

.design-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.color-picker {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

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

.price-display {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 2rem 0;
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: var(--white);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.cart-table th {
    background: #f9fafb;
    font-weight: 600;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.design-preview {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
}

.quantity-input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--error-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-form h1 {
    margin-bottom: 2rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-links {
    text-align: center;
    margin-top: 2rem;
}

.demo-login {
    margin-top: 2rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: var(--error-color);
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #86efac;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

footer h3, footer h4 {
    margin-bottom: 1rem;
}

footer ul {
    list-style: none;
}

footer li {
    margin-bottom: 0.5rem;
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
}

footer a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #475569;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .design-studio {
        flex-direction: column;
    }
    
    .design-sidebar {
        width: 100%;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Additional utility classes */
.text-right {
    text-align: right;
}

.no-products {
    text-align: center;
    padding: 3rem;
}

.cta {
    background: #f3f4f6;
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
}

.cta p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}
/* Enhanced Design Studio Styles */
.design-studio-enhanced {
    display: flex;
    min-height: calc(100vh - 200px);
    background: #f8f9fa;
}

.design-studio-enhanced .design-sidebar {
    width: 400px;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding: 0;
}

.sidebar-header {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.design-studio-enhanced .design-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.color-option {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #3b82f6;
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.design-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.text-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.shapes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.shape-btn {
    padding: 1rem;
    font-size: 2rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.shape-btn:hover {
    background: #f3f4f6;
}

.layers-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.layer-item:hover {
    background: #f8f9fa;
}

.layer-controls {
    display: flex;
    gap: 0.25rem;
}

.layer-controls button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 1.25rem;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.quantity-control input {
    width: 80px;
    text-align: center;
}

.price-display {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-top: 1rem;
}

.price-breakdown {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #6b7280;
}

.price-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.design-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.canvas-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 1rem;
}

.canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tool-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.125rem;
}

.tool-btn:hover {
    background: #f3f4f6;
}

.tool-btn.danger:hover {
    background: #fee;
    color: #dc2626;
}

.separator {
    width: 1px;
    height: 30px;
    background: #e5e7eb;
}

.design-tips {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    max-width: 500px;
}

.design-tips h4 {
    margin-bottom: 0.5rem;
    color: #0369a1;
}

.design-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #0c4a6e;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-warning {
    background: #f59e0b;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .design-studio-enhanced {
        flex-direction: column;
    }
    
    .design-studio-enhanced .design-sidebar {
        width: 100%;
        order: 2;
    }
    
    .design-canvas-area {
        order: 1;
    }
}