/**
 * ShopHub E-Commerce Styles
 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    color: var(--gray-800);
    line-height: 1.6;
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
}

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

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

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 10px 24px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

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

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

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

.product-card .product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-card .product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card .product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    transition: bottom 0.3s ease;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.product-card .btn-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--gray-700);
    border: none;
    transition: var(--transition);
}

.product-card .btn-action:hover {
    background: var(--primary-color);
    color: white;
}

.product-card .product-info {
    padding: 20px;
}

.product-card .product-category {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.product-card .original-price {
    font-size: 0.9rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

/* ===== Navbar ===== */
.navbar {
    padding: 15px 0;
}

.navbar-brand {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-form {
    width: 100%;
    max-width: 400px;
}

.search-form .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid var(--gray-200);
    border-right: none;
    padding: 10px 20px;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-700);
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.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 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Hero Section Themes */
.hero-section.theme-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.hero-section.theme-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.hero-section.theme-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.hero-section.theme-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ===== Banner Carousel ===== */
.banner-carousel {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: transparent;
}

.banner-carousel .carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.banner-slide {
    min-width: 100%;
    display: none;
    position: relative;
    background: transparent;
}

.banner-slide.active {
    display: block;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.carousel-control:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicators .indicator.active {
    background: white;
}

@media (max-width: 991px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
    }
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ===== Categories ===== */
.category-card {
    display: block;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.category-name {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.category-count {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

/* ===== Cart ===== */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    margin-left: 20px;
}

.cart-item-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-selector input {
    width: 50px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: var(--gray-800);
}

/* ===== Forms ===== */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
background: #dbeafe;
color: #1e40af;
}

/* ===== Top Bar - Modern Smart Look ===== */
.top-bar {
background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
color: rgba(255, 255, 255, 0.9);
font-size: 0.875rem;
}

.top-bar i {
color: #60a5fa;
}

/* ===== Professional Footer - Smart Dark Theme ===== */
.footer-main {
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
border-top: none;
color: #94a3b8;
}

.footer-title {
color: #f8fafc;
font-weight: 700;
font-size: 1.25rem;
}

.footer-heading {
color: #f1f5f9;
font-weight: 600;
font-size: 1rem;
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.5px;
font-size: 0.875rem;
}

.footer-text {
color: #94a3b8;
line-height: 1.7;
}

.footer-links {
list-style: none;
padding: 0;
margin: 0;
}

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

.footer-links a {
color: #94a3b8;
text-decoration: none;
transition: all 0.2s;
font-size: 0.95rem;
}

.footer-links a:hover {
color: #60a5fa;
padding-left: 5px;
}

.footer-contact {
list-style: none;
padding: 0;
margin: 0;
}

.footer-contact li {
color: #94a3b8;
margin-bottom: 0.75rem;
display: flex;
align-items: flex-start;
gap: 0.75rem;
font-size: 0.95rem;
}

.footer-contact i {
color: #60a5fa;
margin-top: 0.25rem;
width: 16px;
}

.social-links {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
}

.social-icon {
width: 38px;
height: 38px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
color: #94a3b8;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
transition: all 0.3s;
border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
background: #2563eb;
color: white;
border-color: #2563eb;
transform: translateY(-2px);
}

.footer-divider {
border-color: rgba(255, 255, 255, 0.1);
margin: 2rem 0;
}

.footer-copyright {
color: #64748b;
font-size: 0.875rem;
margin: 0;
}

.payment-icon {
filter: grayscale(100%) brightness(1.5);
opacity: 0.7;
transition: all 0.2s;
margin-left: 0.5rem;
}

.payment-icon:hover {
filter: grayscale(0%) brightness(1);
opacity: 1;
}

/* ===== Footer ===== */
footer .hover-white:hover {
color: white !important;
}

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

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

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

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

/* ===== Pagination ===== */
.pagination .page-link {
    border: none;
    color: var(--gray-600);
    font-weight: 500;
    padding: 10px 16px;
    margin: 0 4px;
    border-radius: 8px;
}

.pagination .page-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

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

/* ===== Rating Stars ===== */
.rating-stars {
    display: flex;
    gap: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form {
        max-width: 100%;
        margin: 15px 0;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-details {
        margin: 15px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* ===== Dropdown Animation ===== */
.dropdown-menu.animate {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.dropdown-menu.slideIn {
    animation-name: slideIn;
}

@keyframes slideIn {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Admin Styles ===== */
.admin-sidebar {
    background: var(--gray-900);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    padding: 20px 0;
    z-index: 1000;
}

.admin-sidebar .nav-link {
    color: var(--gray-400);
    padding: 12px 25px;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.admin-content {
    margin-left: 260px;
    padding: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-icon.primary { background: #dbeafe; color: var(--primary-color); }
.stat-icon.success { background: #d1fae5; color: var(--success-color); }
.stat-icon.warning { background: #fef3c7; color: var(--warning-color); }
.stat-icon.danger { background: #fee2e2; color: var(--danger-color); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}
