/* Public Website Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Prevent image flickering and refresh loops */
.product-image img {
    transition: opacity 0.3s ease;
    opacity: 1;
    will-change: auto;
}

.product-image img[src*="data:image"] {
    opacity: 1;
    transition: none;
}

/* Smooth loading for all images - simplified */
img {
    image-rendering: auto;
    backface-visibility: hidden;
}

/* Prevent layout shifts */
.product-image {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-image img {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Feature Cards */
.feature-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Product Cards */
.product-card {
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

/* Different shapes for products */
.product-card:nth-child(1) { border-radius: 15px; }
.product-card:nth-child(2) { border-radius: 50% 50% 15px 15px; }
.product-card:nth-child(3) { border-radius: 15px 50% 15px 50%; }
.product-card:nth-child(4) { border-radius: 50% 15px 50% 15px; }
.product-card:nth-child(5) { border-radius: 15px; }
.product-card:nth-child(6) { border-radius: 50% 50% 15px 15px; }
.product-card:nth-child(7) { border-radius: 15px 50% 15px 50%; }
.product-card:nth-child(8) { border-radius: 50% 15px 50% 15px; }

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Different image shapes */
.product-card:nth-child(1) .product-image img { border-radius: 15px 15px 0 0; }
.product-card:nth-child(2) .product-image img { border-radius: 50% 50% 0 0; }
.product-card:nth-child(3) .product-image img { border-radius: 15px 50% 0 0; }
.product-card:nth-child(4) .product-image img { border-radius: 50% 15px 0 0; }
.product-card:nth-child(5) .product-image img { border-radius: 15px 15px 0 0; }
.product-card:nth-child(6) .product-image img { border-radius: 50% 50% 0 0; }
.product-card:nth-child(7) .product-image img { border-radius: 15px 50% 0 0; }
.product-card:nth-child(8) .product-image img { border-radius: 50% 15px 0 0; }

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Photo Slate Builder */
.photo-slate-builder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.preview-container {
    position: relative;
    display: inline-block;
    margin: 1rem 0;
}

.slate-preview {
    width: 300px;
    height: 300px;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid #dee2e6;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.slate-shape-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.shape-option {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.shape-option:hover,
.shape-option.active {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.size-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.size-option {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
    min-width: 80px;
}

.size-option:hover,
.size-option.active {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

/* Cart */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .slate-preview {
        width: 250px;
        height: 250px;
    }
    
    .shape-option {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .slate-preview {
        width: 200px;
        height: 200px;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Social Links */
.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Different slate shapes for products based on data-shape attribute */
.product-card[data-shape="rectangle"] { 
    border-radius: 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.product-card[data-shape="oval"] { 
    border-radius: 50% 50% 15px 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.product-card[data-shape="diamond"] { 
    border-radius: 15px 50% 15px 50%; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.product-card[data-shape="heart"] { 
    border-radius: 50% 15px 50% 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Different image shapes for slate effect based on data-shape attribute */
.product-card[data-shape="rectangle"] .product-image img { 
    border-radius: 15px 15px 0 0; 
    border: 3px solid #8B4513;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.product-card[data-shape="oval"] .product-image img { 
    border-radius: 50% 50% 0 0; 
    border: 3px solid #8B4513;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.product-card[data-shape="diamond"] .product-image img { 
    border-radius: 15px 50% 0 0; 
    border: 3px solid #8B4513;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.product-card[data-shape="heart"] .product-image img { 
    border-radius: 50% 15px 0 0; 
    border: 3px solid #8B4513;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* Hover effects for slate cards - simplified */
.product-card:hover {
    transform: scale(1.02);
    transition: all 0.3s ease;
    z-index: 10;
}
