/* Modern Colorful Theme for E-commerce Site */

:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #666666;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #000000;
    --light-color: #ffffff;
    --text-muted: #6c757d;
    --border-color: #e5e5e5;
    --gradient-primary: linear-gradient(135deg, #000000 0%, #333333 100%);
    --gradient-secondary: linear-gradient(135deg, #333333 0%, #666666 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.15);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.main-content {
    background: #ffffff;
    min-height: calc(100vh - 140px);
    margin-top: 0;
    padding: 40px 20px;
}

/* Navbar Enhancements */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--dark-color) !important;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 15px;
    padding: 8px 0 !important;
    border-radius: 0;
    transition: all 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--dark-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.cart-badge {
    background: var(--dark-color) !important;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 0.75rem;
    margin-left: 5px;
    font-weight: 600;
}

/* Card Enhancements */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background: #ffffff;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 20px;
}

.card-body {
    padding: 20px;
}

/* Product Card Specific */
.product-card {
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.product-card .card-img-top {
    height: 240px;
    object-fit: cover;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    background: #f8f9fa;
}

.product-card:hover .card-img-top {
    transform: scale(1.02);
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #ffffff;
}

.product-card .card-title {
    min-height: 48px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    text-align: center;
}

.product-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card .card-title a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.product-card .card-text {
    flex: 1;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.product-card .mt-auto {
    margin-top: auto !important;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Product Grid Container */
.products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
    justify-items: center;
    align-items: start;
}

@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-card {
        min-height: 380px;
    }
    
    .product-card .card-img-top {
        height: 200px;
    }
    
    .product-card .card-title {
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .product-card .card-body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-card {
        min-height: 300px;
    }
    
    .product-card .card-img-top {
        height: 180px;
    }
    
    .product-card .card-body {
        padding: 16px;
    }
    
    .product-card .card-title {
        min-height: 36px;
        font-size: 0.9rem;
    }
}

/* Button Enhancements */
.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 12px 24px;
    border: 1px solid;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-primary {
    background: var(--dark-color);
    border-color: var(--dark-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: #ffffff;
}

.btn-success:hover {
    background: #1e7e34;
    border-color: #1e7e34;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--dark-color);
}

.btn-danger {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

.btn-info {
    background: var(--info-color);
    border-color: var(--info-color);
    color: #ffffff;
}

/* Form Enhancements */
.form-control {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    transition: all 0.2s ease;
    background: #ffffff;
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--dark-color);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
    background: #ffffff;
    outline: none;
}

.form-group label,
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 0.875rem;
}

/* Badge Enhancements */
.badge {
    border-radius: 15px;
    font-weight: 600;
    padding: 8px 15px;
    font-size: 0.85rem;
}

.badge-warning {
    background: var(--gradient-secondary);
    color: white;
}

.badge-info {
    background: var(--gradient-success);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: white;
}

/* Table Enhancements */
.table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.table td {
    padding: 15px;
    border-color: rgba(102, 126, 234, 0.1);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-heavy);
    background: var(--gradient-card);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-body {
    padding: 30px;
}

/* Footer Enhancements */
footer {
    background: var(--dark-color) !important;
    color: #ffffff;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

/* Pagination Enhancements */
.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    border-radius: 15px;
    margin: 0 5px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

/* Alert Enhancements */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.2) 0%, rgba(9, 132, 227, 0.2) 100%);
    color: #0984e3;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.2) 0%, rgba(0, 160, 133, 0.2) 100%);
    color: #00b894;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.2) 0%, rgba(253, 160, 133, 0.2) 100%);
    color: #e17055;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 82, 0.2) 100%);
    color: #d63031;
}

/* Filter Section */
.filter-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 25px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
}

.filter-section h4 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--dark-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section .row {
    margin: 0 -10px;
}

.filter-section .row > div {
    padding: 0 10px;
    margin-bottom: 20px;
}

.filter-section .form-label {
    text-align: center;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.875rem;
    padding: 0 5px;
}

.filter-section .form-control {
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    background: #ffffff;
    font-size: 0.875rem;
    width: 100%;
    height: 44px;
}

.filter-section .form-control:focus {
    border-color: var(--dark-color);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
    outline: none;
}

.filter-section .col-12.text-center {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.filter-section .btn {
    margin: 0 8px 8px 8px;
    min-width: 130px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: var(--dark-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced Mobile Responsive */
.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Improved spacing for main sections */
.main-content .text-center {
    padding: 0 15px;
}

.main-content .filter-section {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .page-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Tablet styles */
@media (max-width: 991px) {
    .main-content {
        padding: 32px 16px;
    }
    
    .filter-section {
        padding: 25px 20px;
    }
    
    .filter-section .row {
        margin: 0 -8px;
    }
    
    .filter-section .row > div {
        margin-bottom: 18px;
        padding: 0 8px;
    }
    
    .filter-section .col-md-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .filter-section .form-label {
        text-align: left;
        margin-bottom: 6px;
        padding: 0 3px;
    }
    
    .filter-section .form-control {
        text-align: left;
        padding: 10px 14px;
        height: 42px;
    }
    
    .filter-section .btn {
        min-width: 110px;
        height: 42px;
        margin: 0 4px 6px 4px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .main-content {
        padding: 24px 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-nav {
        margin-top: 16px;
    }
    
    .navbar-nav .nav-link {
        margin: 0 0 8px 0;
        padding: 12px 0 !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .filter-section {
        padding: 20px 16px;
        margin-bottom: 24px;
    }
    
    .filter-section h4 {
        font-size: 1.1rem;
        margin-bottom: 18px;
        text-align: center;
        padding-bottom: 8px;
    }
    
    .filter-section .row {
        margin: 0 -6px;
    }
    
    .filter-section .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
        padding: 0 6px;
    }
    
    .filter-section .form-label {
        text-align: left;
        margin-bottom: 6px;
        padding: 0 2px;
    }
    
    .filter-section .form-control {
        text-align: left;
        padding: 12px 14px;
        height: 44px;
    }
    
    .filter-section .col-12.text-center {
        margin-top: 18px;
        padding-top: 12px;
    }
    
    .filter-section .btn {
        margin: 6px 8px;
        width: calc(50% - 16px);
        min-width: 140px;
        height: 44px;
    }
    
    .btn-group .btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .input-group-sm .form-control {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 8px 12px;
        margin: 2px;
        font-size: 0.875rem;
    }
}

/* Small mobile styles */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .filter-section {
        padding: 16px 12px;
    }
    
    .filter-section h4 {
        text-align: center;
        margin-bottom: 15px;
        padding-bottom: 6px;
    }
    
    .filter-section .row {
        margin: 0 -4px;
    }
    
    .filter-section .col-md-2 {
        padding: 0 4px;
        margin-bottom: 12px;
    }
    
    .filter-section .form-label {
        text-align: left;
        margin-bottom: 4px;
        font-size: 0.8rem;
        padding: 0 1px;
    }
    
    .filter-section .form-control {
        text-align: left;
        font-size: 0.85rem;
        padding: 10px 12px;
        height: 40px;
    }
    
    .filter-section .col-12.text-center {
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .filter-section .btn {
        font-size: 0.85rem;
        padding: 10px 16px;
        margin: 4px 6px;
        width: calc(50% - 12px);
        height: 40px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 4px;
        border-radius: 4px !important;
    }
    
    .input-group-sm {
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .text-center .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .filter-section {
        padding: 8px;
    }
    
    .card-body {
        padding: 12px;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--dark-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-medium);
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.2s ease;
}

.scroll-to-top-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
}

/* Additional Modern Styles */
.text-gradient {
    color: var(--dark-color);
    font-weight: 700;
}

/* Out of stock styling */
.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .card-img-top {
    filter: grayscale(50%);
}

.product-card.out-of-stock .card-body {
    position: relative;
}

.product-card.out-of-stock .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Badge styles similar to reference site */
.badge {
    border-radius: 4px;
    font-weight: 500;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.badge-info {
    background: var(--info-color);
    color: #ffffff;
}

.badge-warning {
    background: var(--warning-color);
    color: var(--dark-color);
}

.badge-success {
    background: var(--success-color);
    color: #ffffff;
}

.badge-danger {
    background: var(--danger-color);
    color: #ffffff;
}

/* Professional spacing and typography */
.display-4 {
    letter-spacing: -0.02em;
}

.lead {
    font-weight: 400;
}

/* Clean table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    color: var(--dark-color);
    font-weight: 600;
    padding: 16px;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

/* Modern pagination */
.pagination {
    gap: 8px;
}

.page-link {
    border: 1px solid var(--border-color);
    color: var(--dark-color);
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}

.page-link:hover {
    background: var(--dark-color);
    color: #ffffff;
    border-color: var(--dark-color);
}

.page-item.active .page-link {
    background: var(--dark-color);
    border-color: var(--dark-color);
    color: #ffffff;
}

/* Payment Method Styles */
.payment-methods .form-check {
    margin-bottom: 0.5rem;
}

.payment-option {
    display: block;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.form-check-input:checked + .payment-option {
    border-color: var(--success-color);
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.payment-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.payment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.payment-status.success {
    background-color: #d4edda;
    color: #155724;
}

.payment-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.payment-status.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.payment-status.cancelled {
    background-color: #f1f3f4;
    color: #5f6368;
}
