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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

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

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
    position: relative;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--bg-light);
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* Products Section */
.products {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    margin-top: 2rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-list i {
    color: var(--success-color);
    font-size: 1.2rem;
}

.about-image .image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

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

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Blog Section on Home Page */
.blog-section {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.home-blog-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image .blog-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    transition: transform 0.3s;
}

.home-blog-card:hover .blog-placeholder {
    transform: scale(1.1);
}

.blog-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-body h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}

.home-blog-card:hover .read-more {
    color: var(--primary-dark);
}

.blog-cta-button {
    text-align: center;
    margin-top: 2rem;
}

.blog-cta-button .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

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

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .blog-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-card-image .blog-placeholder {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .blog-card-body h3 {
        font-size: 1.1rem;
    }
}

/* Search Modal Styles */
.search-modal-content {
    max-width: 700px;
    max-height: 85vh;
    width: 95%;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

#search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: var(--text-color);
}

#search-results {
    max-height: 55vh;
    overflow-y: auto;
}

.search-placeholder,
.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.search-placeholder i,
.search-no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-placeholder p,
.search-no-results p {
    margin: 0.5rem 0;
}

.search-hint {
    font-size: 0.875rem;
    margin-top: 1rem;
}

.search-results-header {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.search-results-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
}

.search-result-item:hover {
    background-color: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    line-height: 1.4;
}

.search-result-title mark {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.search-result-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-result-category {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 500;
}

.search-result-icon {
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.search-result-item:hover .search-result-icon {
    color: var(--primary-color);
    transform: translateX(4px);
}

.search-results-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    text-align: center;
}

.search-results-footer p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Search Modal Responsive */
@media (max-width: 768px) {
    .search-modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 0;
    }

    #search-results {
        max-height: 65vh;
    }

    .search-result-item {
        padding: 0.875rem;
    }

    .search-result-title {
        font-size: 0.9375rem;
    }

    .search-result-description {
        font-size: 0.8125rem;
    }
}
