@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--light-color);
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar-dark {
    background: var(--gradient-1) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    color: white;
    padding: 120px 0 80px;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background slideshow behind hero content — SLIDE HORIZONTAL */
.hero-bg-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-track {
    display: flex;
    width: 400%; /* 4 slides × 100% */
    height: 100%;
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

.hero-bg-slide {
    width: 25%; /* 100% / 4 slides */
    height: 100%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

/* Dark overlay so text stays readable */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79,70,229,0.72) 0%, rgba(109,40,217,0.65) 100%);
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
    z-index: 2;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

/* Dot indicators for bg slideshow */
.hero-bg-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.hero-bg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}

.hero-bg-dot.active {
    background: #fff;
    transform: scale(1.35);
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.25rem;
    font-weight: 300;
    animation: fadeInUp 1s ease;
    opacity: 0.95;
}

.hero-section .btn {
    animation: fadeInUp 1.2s ease;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-section img {
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

/* Product Card */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    overflow: hidden;
    border-radius: 20px;
    background: white;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl) !important;
}

.product-card img {
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
    position: relative;
    z-index: 1;
}

.product-card:hover img {
    transform: scale(1.15) rotate(2deg);
}

.product-card .card-body {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
}

.product-card .badge {
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.product-card h5 {
    font-weight: 700;
    color: var(--dark-color);
    margin: 12px 0;
}

.product-card .text-primary {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-card .btn {
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.product-card .btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Category Filter */
#categoryFilter {
    padding: 20px 0;
}

#categoryFilter .btn {
    border-radius: 50px;
    padding: 12px 28px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

#categoryFilter .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-1);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

#categoryFilter .btn:hover::before {
    width: 300px;
    height: 300px;
}

#categoryFilter .btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

#categoryFilter .btn:hover {
    color: white;
    border-color: var(--primary-color);
}

/* Cart Badge */
#cartCount {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Cart Items */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
    padding: 0 15px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item-quantity button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Services Section */
.service-card {
    border-radius: 20px;
    border: none;
    transition: all 0.4s ease;
    background: white;
    overflow: hidden;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-1);
    opacity: 0;
    transition: all 0.5s ease;
    transform: rotate(45deg);
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-card i {
    transition: all 0.4s ease;
}

.service-card:hover i {
    transform: scale(1.2) rotate(10deg);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Payment Methods */
.payment-option {
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.payment-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.05;
    transition: left 0.3s ease;
}

.payment-option:hover::before {
    left: 0;
}

.payment-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.payment-option.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow-md);
}

.payment-option i {
    font-size: 2rem;
    margin-bottom: 10px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

.slide-in {
    animation: slideInRight 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    #categoryFilter {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    #categoryFilter .btn {
        display: inline-block;
    }
}

/* Admin Styles */
.admin-sidebar {
    background: #343a40;
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.table-actions {
    display: flex;
    gap: 5px;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
    border-radius: 50px;
    font-weight: 600;
    padding: 12px 32px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--gradient-1);
    border: none;
}

.btn-success {
    background: var(--gradient-4);
    border: none;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

.btn-lg {
    padding: 14px 40px;
    font-size: 1.1rem;
}

/* Card Hover */
.card {
    transition: all 0.3s ease;
}

.shadow-sm:hover {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

/* Modal Styling */
.modal-content {
    border-radius: 25px;
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: none;
    padding: 25px 30px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: none;
    padding: 20px 30px;
}

/* Form Styling */
.form-control, .form-select {
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    padding: 12px 18px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

.form-control-lg {
    padding: 14px 20px;
    font-size: 1rem;
}

.input-group-text {
    border: 2px solid #e5e7eb;
    background: white;
}

/* Cart Styling */
.cart-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(99, 102, 241, 0.05);
    padding: 15px 10px;
    border-radius: 10px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.cart-item-info {
    flex: 1;
    padding: 0 15px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-quantity button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cart-item-quantity button:hover {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

.cart-item-quantity span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Badge Styling */
.badge {
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
}

/* Contact Section */
.contact-card {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    background: var(--dark-color);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
}

/* Navbar Scrolled */
.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 8px 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 80px 0 60px;
        text-align: center;
    }
    
    .payment-option {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .hero-section .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    #categoryFilter {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 15px 0;
    }
    
    #categoryFilter .btn {
        display: inline-block;
        margin-right: 8px;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .payment-option {
        padding: 15px;
    }
    
    .payment-option i {
        font-size: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item img {
        width: 100%;
        height: 150px;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 12px 28px;
        font-size: 1rem;
    }
}

/* Admin Panel Enhancements */
.admin-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    color: white;
    box-shadow: var(--shadow-lg);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 14px 24px;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 5px 10px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    transform: translateX(5px);
}

.admin-header {
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions .btn {
    padding: 6px 12px;
    border-radius: 8px;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-info:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Utility Classes */
.fw-semibold {
    font-weight: 600;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-in {
    animation: slideInLeft 0.6s ease;
}

.animate-zoom-in {
    animation: zoomIn 0.4s ease;
}

/* Print Styles */
@media print {
    .navbar, .modal, .btn, footer {
        display: none !important;
    }
}

/* ===== Hero Slideshow ===== */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 460px;
    background: #111;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    padding: 28px 20px 16px;
}

.slide-caption span {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    z-index: 10;
}

.slide-btn:hover { background: rgba(255,255,255,0.4); }
.slide-prev { left: 12px; }
.slide-next { right: 12px; }

.slide-dots {
    position: absolute;
    bottom: 14px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
}
