/* Additional CSS for Enhanced Features */

/* Category Filters */
.category-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    justify-content: center;
    padding: 10px 0;
}

.category-btn {
    padding: 10px 24px;
    border-radius: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #334155;
    font-size: 0.9rem;
}

.category-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.category-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Product Action Buttons */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.view-item {
    background: #f1f5f9;
    color: #334155;
}

.view-item:hover {
    background: #e2e8f0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: #0f172a;
    margin: 0;
}

.close-modal {
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
    color: #64748b;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: #ef4444;
}

/* Product Gallery in Modal */
.product-gallery {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.main-image {
    flex: 2;
    min-width: 250px;
}

.main-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thumbnail-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 100px;
}

.thumbnail-list img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.thumbnail-list img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail-list img.active {
    opacity: 1;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Enhanced Admin Panel */
.admin-panel {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.admin-panel h2 {
    color: #0f172a;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.admin-panel h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Image Preview for Admin */
.image-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    min-height: 100px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
    border: 2px solid white;
}

.remove-image:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Enhanced Form Styles */
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.form-group input[type="file"] {
    padding: 10px;
    background: #f8fafc;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background: #f1f5f9;
}

/* Checkout Modal Enhancements */
#checkoutModal .form-group {
    margin-bottom: 20px;
}

#checkoutModal label {
    font-weight: 600;
    color: #1e293b;
    display: block;
    margin-bottom: 8px;
}

#checkoutModal input,
#checkoutModal textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

#checkoutModal .success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

#checkoutModal .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Enhanced About and Contact Pages */
.about-box,
.contact-box {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin: 40px 0;
    transition: transform 0.2s;
}

.about-box:hover,
.contact-box:hover {
    transform: translateY(-4px);
}

.about-box h2,
.contact-box h2 {
    color: #0f172a;
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.about-box h2:after,
.contact-box h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #3b82f6;
    border-radius: 2px;
}

.about-box p {
    line-height: 1.8;
    color: #334155;
    margin-bottom: 20px;
}

.contact-form {
    margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
}

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

/* Enhanced Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #0f172a;
}

.cart-item-price {
    color: #3b82f6;
    font-weight: 700;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.quantity-btn {
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 8px;
    transition: color 0.2s;
}

.remove-item:hover {
    color: #dc2626;
    text-decoration: underline;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #0f172a;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #3b82f6;
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .category-filters {
        gap: 8px;
    }
    
    .category-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .product-gallery {
        flex-direction: column;
    }
    
    .thumbnail-list {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .thumbnail-list img {
        width: 80px;
        flex-shrink: 0;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .about-box,
    .contact-box {
        padding: 25px;
    }
    
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
    
    .image-preview-item {
        width: 80px;
        height: 80px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation for Product Cards */
.product-card {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State Illustrations */
.empty-cart i,
.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #64748b;
    margin-top: 10px;
}

/* Toast Notification Enhancement */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button Disabled State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Success Message */
.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
    border-left: 4px solid #10b981;
}

/* Admin Table Actions */
.admin-table .btn-outline {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.admin-table .btn-outline:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Responsive Table for Admin */
@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}