/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

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

/* Product Image Container */
.product-image-container {
    background: #f8f9fa;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

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

/* Product Name */
.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    min-height: 40px;
}

/* Product Description */
.product-description {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #6c757d;
    min-height: 40px;
}

/* Price Section */
.price-section {
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.original-price {
    font-size: 0.9rem;
    text-decoration: line-through;
}

.sale-price {
    font-size: 1.4rem !important;
}

.current-price {
    font-size: 1.4rem;
}

/* Stock Info */
.stock-info {
    font-size: 0.85rem;
}

/* Circular Badges */
.circular-badges-container {
    z-index: 10;
}

.circular-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.circular-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.circular-badge:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.circular-badge:active {
    transform: scale(1.1);
}

.circular-badge i {
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* Specific Badge Colors */
.circular-badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.circular-badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.circular-badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

/* Tooltip Styling */
.tooltip {
    font-size: 0.85rem;
    z-index: 1050;
}

.tooltip-inner {
    background-color: #2c3e50;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 500;
    max-width: 200px;
}

.tooltip .tooltip-arrow::before {
    border-right-color: #2c3e50;
}

/* Animation for badges on card hover */
.product-card:hover .circular-badge {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    }
    50% {
        box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }
}

/* Add to Cart Button */
.btn-add-cart {
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Category Cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-icon {
    border-radius: 50%;
}

/* Product Detail Page */
.product-gallery .main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.product-gallery .main-image-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.product-thumbnail {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: #0d6efd;
}

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

.quantity-minus,
.quantity-plus {
    width: 35px;
    height: 35px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.quantity-minus:hover,
.quantity-plus:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px;
}

/* Stock Status */
.stock-available {
    color: #198754;
    font-weight: 500;
    padding: 10px;
    background: #d1e7dd;
    border-radius: 4px;
    margin: 15px 0;
}

.stock-low {
    color: #fd7e14;
    font-weight: 500;
    padding: 10px;
    background: #ffe5d0;
    border-radius: 4px;
    margin: 15px 0;
}

.stock-out {
    color: #dc3545;
    font-weight: 500;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    margin: 15px 0;
}

/* Price Display */
.price-display {
    margin: 20px 0;
}

/* Hero Section */
.hero-section {
    margin-bottom: 30px;
}

.carousel-item img {
    border-radius: 8px;
}

/* Features Section */
.features-section {
    margin: 30px 0;
}

.features-section i {
    margin-bottom: 10px;
}

/* Sidebar Ads */
.sidebar-ads .card {
    border: 1px solid #e0e0e0;
}

.sidebar-ads .card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Filters */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border: none;
}

.card-header i {
    margin-right: 8px;
}

/* Products Header */
.products-header {
    border: 1px solid #e9ecef;
}

.products-header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Form Controls */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Filter Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.btn-outline-secondary {
    border-radius: 8px;
    border: 2px solid #6c757d;
    font-weight: 500;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
}

/* Pagination */
.pagination {
    gap: 5px;
}

.pagination .page-item .page-link {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #667eea;
    font-weight: 500;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.pagination .page-item .page-link:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .product-gallery .main-image-container img {
        max-height: 300px;
    }
    
    .quantity-controls {
        justify-content: center;
    }
    
    .products-header {
        text-align: center;
    }
    
    .products-header .d-flex {
        flex-direction: column;
    }
    
    .products-header h1 {
        font-size: 1.5rem;
    }
    
    .product-image-container {
        height: 200px;
    }
    
    .product-name {
        font-size: 0.9rem;
        min-height: 35px;
    }
    
    .sale-price, .current-price {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .circular-badge {
        width: 32px;
        height: 32px;
    }
    
    .circular-badge i {
        font-size: 0.85rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Product Tags */
.product-tags .badge {
    font-size: 0.85rem;
    padding: 0.5em 0.8em;
}

/* Share Buttons */
.share-buttons .btn {
    margin-bottom: 5px;
}

/* No Products Found */
.no-products-found {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 60px 20px;
    margin: 20px 0;
}

.no-products-found i {
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Card Shadow */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

button, a, .btn {
    transition: all 0.3s ease !important;
}

/* Form Check */
.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Filter Card */
.col-lg-3 .card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
