/* Product Dynamic Styles */

/* Layout Fixes */
.shop-section .row {
    margin: 0;
}

.shop-section .col-lg-3,
.shop-section .col-lg-9 {
    padding: 0 15px;
}

.left-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
}

.shop-left-sidebar {
    position: relative;
}

/* Mobile Filter Toggle */
.filter-button {
    background: #0f3460;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.filter-button:hover {
    background: #0a2a4a;
    color: white;
}

/* Product Grid Enhancements */
.product-item {
    transition: all 0.3s ease;
    position: relative;
}

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

/* Product Options */
.product-option {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-option.show {
    opacity: 1;
    visibility: visible;
}

.product-option li {
    margin-bottom: 5px;
}

.product-option a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-option a:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* Product Badges */
.product-badge,
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.product-badge .badge,
.featured-badge .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* Stock Warning */
.stock-warning {
    margin-top: 0.5rem;
}

.stock-warning small {
    font-weight: 500;
}

/* Price Styling */
.product-price .discount-percentage {
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

.product-price .original-price {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Cart Box Enhancements */
.add-to-cart-box {
    position: relative;
    transition: all 0.3s ease;
}

.cart_qty.qty-box {
    transition: all 0.3s ease;
}

.cart_qty.qty-box.show {
    display: block !important;
}

/* Button States */
.btn-add-cart {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-add-cart.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* Grid/List View */
.products-grid.grid-view .product-item {
    width: 100%;
}

.products-grid.list-view .product-item {
    width: 100%;
    display: flex;
    margin-bottom: 1rem;
}

.products-grid.list-view .product-box-3 {
    display: flex;
    width: 100%;
}

.products-grid.list-view .product-image {
    width: 200px;
    flex-shrink: 0;
}

.products-grid.list-view .product-footer {
    flex: 1;
    padding-left: 1rem;
}

/* Quick View Modal */
#quickViewModal .modal-body {
    min-height: 300px;
}

/* Notification Styles */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

/* Product Detail Page Enhancements */
.product-section .product-left-box {
    position: sticky;
    top: 20px;
}

.product-main-2 .slider-image {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-image {
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-image:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-image.active {
    border: 2px solid #007bff;
}

/* Variant Selection */
.select-package li a {
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

.select-package li a.active {
    background-color: #007bff;
    color: white;
    transform: scale(1.05);
}

.select-package li a:hover {
    background-color: #e9ecef;
    transform: scale(1.02);
}

/* Progress Bar */
.progress-sec .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-sec .progress-bar {
    border-radius: 4px;
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

/* Vendor Box */
.vendor-box {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
}

.vendor-box .vendor-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Related Products */
.product-list-section .product-box-3 {
    transition: all 0.3s ease;
}

.product-list-section .product-box-3:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .left-box {
        position: static;
        margin-bottom: 20px;
    }
    
    .shop-left-sidebar {
        display: none;
    }
    
    .shop-left-sidebar.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        z-index: 9999;
        padding: 20px;
        overflow-y: auto;
    }
    
    .back-button {
        display: block;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .product-option {
        position: static;
        opacity: 1;
        visibility: visible;
        display: flex;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .product-option li {
        margin: 0 2px;
    }
    
    .products-grid.list-view .product-item {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
    }
    
    .products-grid.list-view .product-footer {
        padding-left: 0;
        padding-top: 1rem;
    }
    
    .left-box {
        padding: 15px;
    }
    
    .shop-section .col-lg-3,
    .shop-section .col-lg-9 {
        padding: 0 10px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login Required Pricing Styles */
.login-required-price {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 2px dashed #dee2e6;
}

.login-text {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-text i {
    color: #dc3545;
}

.wholesale-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.price-comparison {
    font-size: 0.875rem;
    line-height: 1.4;
}

.price-comparison .text-muted {
    color: #6c757d !important;
}

.price-comparison .text-success {
    color: #28a745 !important;
    font-weight: 500;
}

.price-comparison .text-info {
    color: #17a2b8 !important;
}

/* User Role Indicators */
.user-role-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-role-indicator.wholesaler {
    background: #28a745;
}

.user-role-indicator.customer {
    background: #17a2b8;
}

.user-role-indicator.guest {
    background: #6c757d;
}
