/* Global Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #06d6a0;
    --danger-color: #e63946;
    --warning-color: #ffb703;
    --info-color: #4cc9f0;
    --accent-color: #f72585;
    --dark-color: #2b2d42;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

main {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 30px 0 0;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

/* Product Cards */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.15);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--info-color));
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 40px rgba(67, 97, 238, 0.3);
}

.product-card .card-img-top {
    border-radius: 20px 20px 0 0;
    transition: transform 0.5s;
}

.product-card:hover .card-img-top {
    transform: scale(1.1);
}

.product-card .price-section {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(67, 97, 238, 0.2);
}

.product-card .btn {
    border-radius: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    font-weight: bold;
    transition: all 0.3s;
}

.product-card .btn:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.4);
}

/* Category Cards */
.category-card {
    border: none;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.4s;
    cursor: pointer;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: height 0.4s;
    z-index: 0;
    opacity: 0.9;
}

.category-card:hover::after {
    height: 100%;
}

.category-card > * {
    position: relative;
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.category-card:hover i,
.category-card:hover h5,
.category-card:hover p {
    color: white !important;
}

.category-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.4s;
}

.category-card:hover i {
    -webkit-text-fill-color: white;
    transform: rotate(360deg) scale(1.2);
}

/* Hero Slider */
.carousel-item {
    height: 600px;
    border-radius: 30px;
    overflow: hidden;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.8);
    transition: transform 8s;
}

.carousel-item.active img {
    transform: scale(1.1);
}

.carousel-caption {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.9), rgba(247, 37, 133, 0.9));
    border-radius: 20px;
    padding: 30px;
    bottom: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart Badge */
#cart-count {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--danger-color)) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, var(--dark-color), #1a1b2f) !important;
    color: white;
    border-radius: 30px 30px 0 0;
    padding: 40px 0 20px !important;
}

footer a {
    color: var(--info-color) !important;
    transition: all 0.3s;
    position: relative;
    display: inline-block;
}

footer a:hover {
    color: var(--warning-color) !important;
    transform: translateX(5px);
    text-decoration: none !important;
}

.social-links a {
    transition: all 0.3s;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin: 0 5px;
}

.social-links a:hover {
    opacity: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translateY(-5px) rotate(360deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption {
        bottom: 30px;
        padding: 15px;
        left: 15px;
        right: 15px;
    }
    
    .carousel-caption h3 {
        font-size: 1.3rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .category-card {
        margin-bottom: 20px;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.spinner-overlay::after {
    content: '';
    width: 60px;
    height: 60px;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--accent-color);
    border-bottom-color: var(--info-color);
    border-left-color: var(--success-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 15px !important;
    padding: 12px 20px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
    transform: translateY(-2px);
}

/* Table Styles */
.table {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.table thead th {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: linear-gradient(90deg, #f8f9fa, #ffffff);
}

.table tbody tr {
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, #e9ecef, #ffffff);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Alert Styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px 25px;
    animation: slideIn 0.5s ease-out;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #06d6a0, #06b894);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #e63946, #c92a3a);
    color: white;
}

/* Button Styles */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(247, 37, 133, 0.4);
}

/* Pagination */
.pagination {
    gap: 5px;
}

.pagination .page-link {
    color: var(--primary-color);
    border-radius: 50% !important;
    border: none;
    padding: 10px 18px;
    font-weight: 600;
    transition: all 0.3s;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: scale(1.1);
}

/* Search Bar */
.input-group {
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.15);
    border-radius: 50px;
    overflow: hidden;
}

.input-group .form-select,
.input-group .form-control,
.input-group .btn {
    border: none;
    border-radius: 0 !important;
    height: 55px;
}

.input-group .form-select {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-right: 2px solid #e9ecef;
}

.input-group .form-control {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.input-group .btn {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
    padding: 0 30px;
}

.input-group .btn:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
}