/* Estimate Page Specific Styles */

/* Products Section */
.products-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 80vh;
}

.search-filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* position: sticky; */
    top: 76px;
    z-index: 1040;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.search-filter-section.sticky {
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-box {
    position: relative;
}

.search-box input {
    padding-right: 40px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.category-header {
    margin-top: 2rem;
}

.category-header:first-child {
    margin-top: 0;
}

/* Product Card Styles */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 10px;
}

.product-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.product-details {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.quantity-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.qty-btn.minus:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.qty-btn.plus:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: var(--dark-color);
}

.total-price {
    font-weight: bold;
    color: var(--success-color);
    font-size: 14px;
    text-align: right;
    min-width: 60px;
}

/* Cart Summary Styles */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    padding: 15px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    border-top: 3px solid #ffb300;
    animation: slideUpCart 0.5s ease-out;
}

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

.cart-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cart-items-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cart-total-label {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.cart-total-amount {
    font-weight: bold;
    color: #333;
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.cart-summary .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.cart-summary .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ffb300 100%);
    color: white;
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-section {
        padding: 1rem;
    }
    
    .product-card {
        /* margin-bottom: 1rem; */
    }
    
    .product-image img {
        height: 110px;
    }
    
    .product-details {
        padding: 10px;
    }
    
    .product-name {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .quantity-display {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .total-price {
        font-size: 12px;
    }
    
    .cart-summary {
        padding: 10px 0;
    }
    
    .cart-info {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .cart-total-amount {
        font-size: 20px;
    }
    
    .cart-summary .btn-success {
        width: 100%;
        margin-top: 10px;
    }
    
    .quantity-controls {
        gap: 5px;
    }
    
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .quantity-display {
        min-width: 35px;
        font-size: 14px;
        padding: 6px 10px;
    }
}

@media (max-width: 576px) {
    .category-header h3 {
        font-size: 1.2rem;
    }
    
    .btn-warning {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

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

.category-header {
    animation: fadeInUp 0.6s ease-out;
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state for images */
.product-image {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* Print styles */
@media print {
    .navbar,
    .horizontal-scroller,
    .fixed-icons,
    footer,
    .cart-summary {
        display: none !important;
    }
    
    body {
        margin-top: 0 !important;
    }
}