/* static/css/product-detail.css - Product detail page styles */

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Product Image Section */
.product-image-section {
    position: sticky;
    top: 2rem;
}

.main-image {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Product Info Section */
.product-info-section {
    padding: 1rem 0;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.product-price {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-from {
    color: #6b7280;
    font-size: 1.25rem;
    font-weight: 400;
}

.price-amount {
    font-weight: 700;
    color: #059669;
}

.price-currency {
    color: #6b7280;
    font-size: 1.25rem;
    font-weight: 400;
}

.product-description {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border-left: 4px solid #059669;
}

/* Product Form */
.product-form {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.variant-selection,
.quantity-selection {
    margin: 1.5rem 0;
}

.variant-selection label,
.quantity-selection label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.variant-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.variant-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 80px;
    text-align: center;
    margin: 0;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Product Actions */
.product-actions {
    margin: 2rem 0;
}

.add-to-cart-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.add-to-cart-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.3);
}

.add-to-cart-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Product Features */
.product-features {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.feature:hover {
    background: #f3f4f6;
}

.feature-icon {
    font-size: 1.5rem;
    min-width: 1.5rem;
}

.feature span:last-child {
    color: #374151;
    font-weight: 500;
}

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

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success/Error States */
.add-to-cart-btn.success {
    background-color: #10b981;
}

.add-to-cart-btn.error {
    background-color: #ef4444;
}

/* Legacy product page styles (for product.html) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.image-column {
    position: sticky;
    top: 2rem;
}

.image-frame-large {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.image-frame-large img {
    width: 100%;
    height: auto;
    display: block;
}

.info-column {
    padding: 1rem 0;
}

.info-column h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 2rem;
}

.desc {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border-left: 4px solid #059669;
}

.info-column label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1rem;
}

.info-column select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    margin-bottom: 1.5rem;
}

.buy-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
    margin: 1rem 0;
}

.buy-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-grid,
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-container,
    .container {
        padding: 1rem;
    }

    .product-title,
    .info-column h1 {
        font-size: 2rem;
    }

    .product-price,
    .price-large {
        font-size: 1.5rem;
    }

    .product-image-section,
    .image-column {
        position: static;
    }

    .quantity-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-title,
    .info-column h1 {
        font-size: 1.75rem;
    }

    .add-to-cart-btn,
    .buy-button {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

const zoomCSS = `
/* Zoom Overlay Styles - Add to your product-detail.css */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.zoom-overlay.active {
    display: flex;
}

.zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-radius: 8px;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.zoom-close:hover {
    background: rgba(0,0,0,0.8);
}

.main-image {
    position: relative;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.main-image:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.main-image:hover .zoom-hint {
    opacity: 1;
}

@media (max-width: 768px) {
    .zoom-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}