:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f8f9fa;
    --gray: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

/* Header Styles */
.top-bar {
    font-size: 0.875rem;
}

.main-header {
    background: white;
}

.logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.search-form {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
    background: var(--light);
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.main-nav {
    background: white;
}

.main-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: color 0.3s;
}

.main-nav .nav-link:hover {
    color: var(--primary);
}

/* Hero Slider */
.hero-slider {
    height: 500px;
}

.hero-slide {
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-icon {
    color: var(--primary);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    margin-bottom: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.badge-hot {
    background: var(--danger);
    color: white;
}

.badge-sale {
    background: var(--warning);
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    transition: bottom 0.3s;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.product-actions button {
    background: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.product-actions button:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-title a {
    text-decoration: none;
    color: var(--dark);
}

.product-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.875rem;
    margin-left: 10px;
}

.product-rating {
    font-size: 0.875rem;
}

/* Brands Scrolling */
.brands-scroll {
    overflow: hidden;
    position: relative;
}

.scroll-wrapper {
    display: flex;
    animation: scrollLeft 20s linear infinite;
    width: fit-content;
}

.scroll-right {
    animation: scrollRight 20s linear infinite;
}

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

.brand-item {
    display: inline-block;
    margin: 0 20px;
    text-decoration: none;
}

.brand-item img {
    height: 60px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.brand-item:hover img {
    filter: grayscale(0%);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 12px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Product Details Page */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.zoom-container {
    position: relative;
    overflow: hidden;
}

.zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.5);
    cursor: crosshair;
}

.zoom-result {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background-repeat: no-repeat;
    display: none;
    border: 1px solid #d4d4d4;
    z-index: 1000;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}

.thumbnail-item.active {
    border-color: var(--primary);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Cart Page */
.cart-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

/* Checkout Page */
.checkout-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
}

.order-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

/* Mobile Sidebar */
.mobile-menu-btn {
    display: none;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1050;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-body {
    padding: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.overlay.active {
    display: block;
}

/* Toast Animation */
@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-slider,
    .hero-slide {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-title {
        font-size: 0.875rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
    }
    
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        font-weight: bold;
    }
    
    .footer {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-card {
        margin-bottom: 20px;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button Styles */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Animation on Scroll */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Product Card Styles */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;
}

.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);
}

/* Action Icons on Image */
.image-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.image-action-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d2d2d;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-action-btn:hover {
    background: #0a2540;
    color: white;
    transform: scale(1.05);
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.badge-sale {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: white;
}

/* Product Info */
.product-info {
    padding: 15px;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    text-decoration: none;
    color: #2d2d2d;
}

.product-title a:hover {
    color: #0a2540;
}

.product-rating {
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-rating i {
    color: #ffc107;
    font-size: 11px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a2540;
}

.old-price {
    font-size: 0.8rem;
    color: #6c6c6c;
    text-decoration: line-through;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    background: #0a2540;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: #00b4d8;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .image-action-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .product-title {
        font-size: 0.8rem;
        height: 36px;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
    
    .add-to-cart-btn {
        padding: 8px;
        font-size: 0.7rem;
    }
}