:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f3f4f6;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: var(--dark);
}

/* Header Styles */
.top-bar {
    background: var(--dark);
    color: white;
    font-size: 13px;
}

.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo img {
    max-height: 50px;
}

.search-form {
    position: relative;
}

.search-form .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-form input {
    border: none;
    padding: 12px 20px;
}

.search-form button {
    border-radius: 0;
    padding: 0 25px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #e5e7eb;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-action {
    text-decoration: none;
    color: var(--dark);
    text-align: center;
    font-size: 12px;
    position: relative;
}

.header-action i {
    display: block;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Navigation */
.navbar {
    padding: 0;
}

.navbar-nav .nav-link {
    padding: 15px 18px;
    font-weight: 500;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: var(--light);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

.product-badge.new {
    background: var(--success);
}

.product-badge.campaign {
    background: var(--warning);
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

.stock-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    z-index: 1;
}

.stock-badge.out {
    background: var(--danger);
}

.stock-badge.low {
    background: var(--warning);
}

.product-info {
    padding: 15px;
}

.product-category {
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-info h5 {
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

.product-info h5 a {
    color: var(--dark);
    text-decoration: none;
}

.short-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
}

.rating {
    margin-bottom: 8px;
    font-size: 12px;
}

.price {
    margin-bottom: 10px;
}

.price .current-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

.price .old-price {
    font-size: 13px;
    text-decoration: line-through;
    color: #9ca3af;
    margin-left: 8px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-wishlist, .btn-quickview {
    background: var(--light);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-wishlist:hover {
    background: var(--danger);
    color: white;
}

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

/* Category Card */
.category-card {
    display: block;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

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

.category-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.category-icon img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Campaign Banner */
.campaign-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.timer-box {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

/* Cart Page */
.cart-table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px;
}

.cart-summary {
    background: white;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

/* Checkout */
.payment-methods {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-method {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.payment-method.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.payment-method img {
    height: 40px;
    margin-bottom: 8px;
}

/* Order Timeline */
.order-timeline {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
}

.timeline-step {
    text-align: center;
    flex: 1;
    position: relative;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: white;
}

.timeline-step.completed .timeline-icon {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.timeline-step:not(:last-child):before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}

.timeline-step.completed:not(:last-child):before {
    background: var(--success);
}

.timeline-label {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 500;
}

/* Rating Input */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 25px;
    color: #ddd;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #f5b301;
}

/* Footer */
.footer {
    background: var(--dark);
    margin-top: 50px;
}

.footer a {
    transition: color 0.3s;
}

.footer a:hover {
    color: white !important;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    transition: all 0.3s;
}

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

/* Notification */
#notification-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.notification {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    margin-top: 10px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.warning {
    background: var(--warning);
}

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

/* Responsive */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-info h5 {
        font-size: 13px;
    }
    
    .price .current-price {
        font-size: 14px;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 10px;
    }
    
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px;
        border: none;
    }
    
    .cart-table td:before {
        content: attr(data-label);
        font-weight: bold;
    }
    
    .order-timeline {
        flex-direction: column;
        gap: 15px;
    }
    
    .timeline-step:not(:last-child):before {
        display: none;
    }
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: all 0.3s;
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}