/* ========================================
   E-Commerce Website - Professional Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
    --font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f1f5f9;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-color);
}

/* ========================================
   Top Bar
   ======================================== */
.top-bar {
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    background-color: var(--light-color);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

.cart-badge {
    font-size: 0.65rem !important;
    padding: 0.25em 0.5em !important;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
}

.hero-slide {
    height: 500px;
    display: flex;
    align-items: center;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

/* ========================================
   Feature Cards
   ======================================== */
.feature-card {
    transition: var(--transition);
    border-radius: var(--border-radius-xl) !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.feature-icon {
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* ========================================
   Category Cards
   ======================================== */
.category-card {
    transition: var(--transition);
    border-radius: var(--border-radius-lg) !important;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.category-img-wrapper {
    overflow: hidden;
}

.category-card img {
    height: 150px;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

/* ========================================
   Product Cards
   ======================================== */
.product-card {
    transition: var(--transition);
    border-radius: var(--border-radius-lg) !important;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
}

.product-img {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions .btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* ========================================
   WhatsApp Float Button
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ========================================
   Forms
   ======================================== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control-lg, .form-select-lg {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* ========================================
   Cards
   ======================================== */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* ========================================
   Tables
   ======================================== */
.table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table th {
    font-weight: 600;
    background-color: var(--light-color);
}

/* ========================================
   Pagination
   ======================================== */
.pagination .page-link {
    border: none;
    color: var(--text-color);
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991.98px) {
    .hero-slide {
        height: 400px;
    }

    .hero-slide h1 {
        font-size: 2rem;
    }

    .product-img {
        height: 180px;
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: var(--border-radius-lg);
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 767.98px) {
    .hero-slide {
        height: 350px;
        text-align: center;
    }

    .hero-slide h1 {
        font-size: 1.75rem;
    }

    .product-img {
        height: 160px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 575.98px) {
    .hero-slide h1 {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.fw-500 {
    font-weight: 500;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Star Rating
   ======================================== */
.rating {
    color: #fbbf24;
}

.rating .far {
    color: #d1d5db;
}

/* ========================================
   Order Status Badges
   ======================================== */
.badge.bg-pending {
    background-color: #fbbf24 !important;
    color: #92400e;
}

.badge.bg-processing {
    background-color: #60a5fa !important;
    color: white;
}

.badge.bg-shipped {
    background-color: #818cf8 !important;
    color: white;
}

.badge.bg-delivered {
    background-color: #34d399 !important;
    color: white;
}

.badge.bg-cancelled {
    background-color: #f87171 !important;
    color: white;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar, footer, .whatsapp-float, .btn {
        display: none !important;
    }
}
