/* Search suggestions */
.search-container {
    position: relative;
}

.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #f8f9fa;
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    background: #f0f0f0;
}

.suggestion-item .suggestion-info .name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.suggestion-item .suggestion-info .category {
    font-size: 12px;
    color: #888;
}

.suggestion-item .suggestion-info .price {
    font-size: 13px;
    color: #f0a500;
    font-weight: bold;
}

.search-highlight {
    background: #fff3cd;
    border-radius: 3px;
    padding: 0 2px;
}

/* Skeleton Loader */
.skeleton {
    background: #e0e0e0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 400px;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skeleton-img { height: 200px; width: 100%; }
.skeleton-text { height: 20px; width: 80%; }
.skeleton-text.short { width: 40%; }
.skeleton-btn { height: 40px; width: 100%; border-radius: 6px; }

/* Cart Animation */
@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--success); }
}

.cart-animate {
    animation: cart-bounce 0.5s ease;
}

:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --bg: #f8f9fa;
    --card: #ffffff;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--primary);
}

header {
    background: var(--primary);
    color: white;
    padding: 0.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.header-center {
    text-align: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    white-space: nowrap;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    header {
        grid-template-columns: auto 1fr;
        padding: 0.5rem 1rem;
    }
    .header-center {
        display: none;
    }
    .header-right {
        justify-content: flex-end;
    }
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.2rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cart-count,
.notif-count {
    background: var(--danger);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.7rem;
    vertical-align: top;
    margin-left: -8px;
}

.notif-count {
    background: var(--accent);
    margin-left: -5px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #2980b9;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: var(--primary);
}

.btn-outline:hover {
    background: #f0f0f0;
}

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

footer {
    background: var(--primary);
    color: #ecf0f1;
    padding: 4rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: left;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 1.8;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: white;
}

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

.social-links a {
    font-size: 1.5rem;
    transition: 0.3s;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Product Card Improvements */
.rating {
    color: #f1c40f;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 0.9rem;
}

.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    opacity: 0;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Hero Enhancements */
.hero {
    position: relative;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('https://images.unsplash.com/photo-1550009158-9ebf69173e03?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 8rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Nav Icons */
.nav-icon {
    font-size: 1.1rem;
    margin-right: 5px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 3rem;
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #7f8c8d;
}

/* Mobile Search Icon */
.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .mobile-search-btn {
        display: block;
    }
}

/* Mobile Navigation */
.burger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: var(--primary);
        padding: 1rem;
        width: 200px;
        box-shadow: -2px 5px 10px rgba(0, 0, 0, 0.2);
    }

    nav.open {
        display: flex;
    }

    nav a {
        margin: 0.5rem 0;
        font-size: 1rem;
    }
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast {
    padding: 0.75rem 1.25rem;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 0.5rem;
    animation: fadeIn 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}