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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===========================
   Header
   =========================== */
.top-bar {
    background-color: #1f2937;
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 20px;
}

.top-bar a {
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 1;
}

.main-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo img {
    height: 50px;
}

.search-bar {
    flex: 1;
}

.search-bar form {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 50px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
}

.search-bar button {
    padding: 0 24px;
    background-color: #6366f1;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #4f46e5;
}

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

.header-action {
    position: relative;
    font-size: 20px;
    color: #374151;
    transition: color 0.3s;
}

.header-action:hover {
    color: #6366f1;
}

.header-action .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Navigation */
.navigation {
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-menu li a:hover {
    color: #6366f1;
    background-color: #f9fafb;
}

.nav-menu .has-dropdown {
    position: relative;
}

.nav-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
}

.nav-menu .has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .dropdown li a {
    padding: 12px 20px;
}

/* ===========================
   Alerts
   =========================== */
.alert {
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
}

.alert-close:hover {
    opacity: 1;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ===========================
   Sections
   =========================== */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.section-link {
    color: #6366f1;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-link:hover {
    text-decoration: underline;
}

/* ===========================
   Categories Grid
   =========================== */
.categories-section {
    background-color: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: #f9fafb;
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

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

.category-icon {
    font-size: 48px;
    color: #6366f1;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.category-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ===========================
   Products Grid
   =========================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

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

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #10b981;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-badge.sale {
    background-color: #ef4444;
}

.product-badge.hot {
    background-color: #f59e0b;
}

.product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    color: #ef4444;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.product-wishlist:hover {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-title a {
    color: #374151;
}

.product-title a:hover {
    color: #6366f1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #f59e0b;
}

.product-rating span {
    color: #6b7280;
    margin-left: 5px;
}

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

.current-price {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
}

.old-price {
    font-size: 18px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* ===========================
   Features
   =========================== */
.features-section {
    background-color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
}

.feature-card i {
    font-size: 48px;
    color: #6366f1;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.feature-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: #1f2937;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #d1d5db;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: #6366f1;
    transform: translateY(-3px);
}

.newsletter h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.newsletter p {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 15px;
}

.newsletter form {
    display: flex;
    gap: 10px;
}

.newsletter input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.newsletter button {
    padding: 10px 20px;
    background-color: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter button:hover {
    background-color: #4f46e5;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    font-size: 14px;
    color: #d1d5db;
}

.footer-bottom-right {
    display: flex;
    gap: 20px;
}

.footer-bottom-right a {
    color: #d1d5db;
    transition: color 0.3s;
}

.footer-bottom-right a:hover {
    color: #fff;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    font-size: 30px;
    color: #d1d5db;
}

.payment-methods span {
    font-size: 14px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .navigation {
        display: none;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f8fafc;
}

.search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.search-item-info {
    flex: 1;
}

.search-item-title {
    display: block;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.search-item-price {
    display: block;
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}
