/* Custom Styles for E-Commerce Website */

/* Product Card Styles */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card.selected {
    border: 2px solid #007bff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

.product-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.product-card .card-text {
    color: #666;
    font-size: 0.9rem;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.quantity-input {
    width: 60px;
    text-align: center;
    font-size: 1.2rem;
    border: 2px solid #007bff;
    border-radius: 5px;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Section Spacing */
section {
    padding: 60px 0;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

/* Form Styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Order Summary */
.order-summary-table th {
    width: 30%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .quantity-selector {
        justify-content: center;
    }
    
    section {
        padding: 40px 0;
    }
    
    .product-card .card-title {
        font-size: 1.1rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Styles */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Modal Customization */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    background-color: #007bff;
    color: white;
    border-radius: 10px 10px 0 0;
}

/* Footer */
footer {
    background-color: #343a40;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

/* Animation for selected product */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.product-card.selected {
    animation: pulse 2s infinite;
}

/* Product Image Styles */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Selected Product Image */
#selected-product-display img {
    max-width: 200px;
    max-height: 200px;
    height: auto;
    border-radius: 5px;
}