/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #c0392b;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #e74c3c;
}

.center {
    text-align: center;
    margin-top: 30px;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 10px 0;
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: #e74c3c;
}

nav ul li a.active::after,
nav ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}

.header-icons {
    display: flex;
    align-items: center;
}

.header-icons a {
    margin-left: 20px;
    font-size: 20px;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://source.unsplash.com/random/1920x800/?shopping,market');
    background-size: cover;
    background-position: center;
    background-color: #333; /* Fallback color */
    height: 600px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Featured Products */
.featured {
    padding: 80px 0;
    background-color: #fff;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image:before {
    opacity: 1;
}

.image-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(245, 245, 245, 0.8);
    color: #555;
    font-size: 14px;
    z-index: 1;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-info p {
    color: #777;
    margin-bottom: 10px;
    font-size: 14px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #c0392b;
}

/* Categories Section */
.categories {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card h3 {
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* Products Section */
.products {
    padding: 80px 0;
    background-color: #fff;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-filter {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-filter input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-filter button {
    padding: 10px 15px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.category-filter select,
.sort-filter select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    background-color: #fff;
    min-width: 200px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination button {
    margin: 0 5px;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination button.active,
.pagination button:hover {
    background-color: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image:hover img {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background-color: #fff;
}

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.testimonial-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-image img {
    transform: scale(1.1);
}

.testimonial-text {
    margin-bottom: 20px;
    font-style: italic;
    font-size: 16px;
}

.testimonial-author {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
}

.testimonial-role {
    color: #777;
    font-size: 14px;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.info-item {
    display: flex;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 24px;
    color: #e74c3c;
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #c0392b;
}

/* Newsletter */
.newsletter {
    padding: 60px 0;
    background-color: #e74c3c;
}

.newsletter-content {
    text-align: center;
    color: #fff;
}

.newsletter-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.newsletter-content p {
    margin-bottom: 20px;
}

#newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

#newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

#newsletter-form button {
    padding: 15px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#newsletter-form button:hover {
    background-color: #222;
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    color: #e74c3c;
    font-size: 28px;
    margin-bottom: 20px;
}

.footer-links h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #e74c3c;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ddd;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    font-size: 24px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.quantity-input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.overlay.active {
    display: block;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    .logo {
        margin-bottom: 20px;
    }

    nav {
        margin-bottom: 20px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media screen and (max-width: 576px) {
    .filter-container {
        flex-direction: column;
    }

    .search-filter {
        max-width: 100%;
    }

    .category-filter,
    .sort-filter {
        width: 100%;
    }

    .category-filter select,
    .sort-filter select {
        width: 100%;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }
}

/* Chat Support Styles */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 997;
    transition: all 0.3s ease;
}

.chat-button:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 997;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: scale(0);
    transform-origin: bottom right;
    opacity: 0;
}

.chat-container.active {
    transform: scale(1);
    opacity: 1;
}

.chat-header {
    background-color: #e74c3c;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.4;
    font-size: 14px;
}

.message.user {
    align-self: flex-end;
    background-color: #e74c3c;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.message.bot {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 5px;
}

.message-content {
    word-wrap: break-word;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input button {
    background: #e74c3c;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background-color: #c0392b;
}

.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background-color: #f1f1f1;
    border-radius: 15px;
    align-self: flex-start;
    margin-bottom: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #555;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.4;
}

.typing-indicator span:nth-child(1) {
    animation: typing 1s infinite 0s;
}

.typing-indicator span:nth-child(2) {
    animation: typing 1s infinite 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation: typing 1s infinite 0.4s;
}

@keyframes typing {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.4; transform: scale(1); }
}

/* Image Loading Styles */
.images-loading .category-card img,
.images-loading .about-image img,
.images-loading .product-image,
.images-loading .testimonial-image img {
    animation: imagePulse 1.5s infinite alternate;
}

@keyframes imagePulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Hero gradient pulse animation during loading */
.images-loading .hero:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(231, 76, 60, 0.2), rgba(231, 76, 60, 0));
    animation: gradientMove 2s infinite alternate;
    z-index: 1;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Specific styling for loading indicators */
.image-loader:after {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 