/*
Theme Name: EcommerceTheme
Description: A fully functional e-commerce WordPress theme with WooCommerce integration, Gutenberg page builder, and on-page editing capabilities.
Version: 1.0
Author: Tassawur Abbas
Text Domain: ecommerce-theme
*/

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.site-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.header-top {
    background: #f8f9fa;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9em;
}

.header-main {
    padding: 1rem 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    flex: 1;
}

.header-search {
    flex: 2;
    margin: 0 1rem;
}

.header-cart {
    margin-right: 1rem;
}

.cart-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.cart-icon {
    font-size: 1.5em;
    margin-right: 0.5rem;
}

.cart-count {
    background: #007cba;
    color: #fff;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8em;
}

.main-navigation {
    flex: 1;
}

/* Mega Menu Styles */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    padding: 1rem;
    text-decoration: none;
    color: #333;
    display: block;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 200px;
    z-index: 1000;
}

.main-navigation li:hover .sub-menu {
    display: block;
}

.mega-menu {
    display: flex !important;
    flex-wrap: wrap;
    width: 600px;
}

.mega-menu li {
    flex: 1 1 200px;
    margin: 0;
}

.mega-menu a {
    padding: 0.5rem 1rem;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: #007cba;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

@media (max-width: 767px) {
    .header-main .container {
        flex-direction: column;
    }

    .header-search,
    .header-cart,
    .main-navigation {
        margin: 0.5rem 0;
    }

    .main-navigation ul {
        flex-direction: column;
    }

    .main-navigation .sub-menu {
        position: static;
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation.toggled .sub-menu {
        display: block;
    }
}

/* Main Content */
.main-content {
    padding: 2rem;
}

/* Footer Styles */
.site-footer {
    background: #333;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.footer-widgets {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-widget {
    flex: 1;
    margin: 0 1rem;
}

.footer-widget h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
}

.footer-menu a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
}

.site-info a {
    color: #ccc;
}

.site-info a:hover {
    color: #fff;
}

/* Footer Responsive */
@media (max-width: 767px) {
    .footer-widgets {
        flex-direction: column;
    }

    .footer-widget {
        margin: 1rem 0;
    }
}

/* Responsive Design */

/* Tablet Styles */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .site-header {
        padding: 0.5rem;
    }

    .main-content {
        padding: 1rem;
    }

    .site-footer {
        padding: 0.5rem;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* WooCommerce Responsive */
@media (max-width: 767px) {
    .woocommerce div.product .woocommerce-product-gallery,
    .woocommerce div.product .summary {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce div.product .woocommerce-product-gallery {
        margin-bottom: 20px;
    }

    .woocommerce ul.products li.product {
        width: 100% !important;
        margin: 0 0 20px 0 !important;
    }
}

@media (max-width: 1024px) {
    .woocommerce ul.products li.product {
        width: 48% !important;
        margin: 0 1% 20px 1% !important;
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 1s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.8s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slide-down {
    animation: slideDown 1s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

.animate-bounce-in {
    animation: bounceIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* Sticky Header */
.sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    background: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
    color: #fff;
    max-width: 600px;
    margin: 0 auto;
}

.hero-headline {
    font-size: 3em;
    margin-bottom: 0.5rem;
}

.hero-subheading {
    font-size: 1.5em;
    margin-bottom: 2rem;
}

.hero-cta {
    background: #007cba;
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.category-item {
    text-align: center;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.product-item {
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
}

/* Promo Banner */
.promo-banner {
    background: #f8f9fa;
    padding: 4rem 0;
    text-align: center;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-item i {
    font-size: 3em;
    color: #007cba;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials-slider {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.testimonial-item {
    flex: 1;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

/* Newsletter */
.newsletter {
    background: #007cba;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid,
    .products-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-slider {
        flex-direction: column;
    }

    .hero-headline {
        font-size: 2em;
    }

    .hero-subheading {
        font-size: 1.2em;
    }
}