/*
Theme Name: Ecommerce Theme
Theme URI: http://example.com/ecommerce-theme
Author: Mohamed Khalaf
Author URI: http://example.com
Description: A simple and modern E-Commerce WordPress theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecommerce-theme
*/

/* Reset styles */
body, h1, h2, h3, p, ul, ol {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Header styles */
.site-header {
    padding: 15px;
    

}

/* Logo styling */
.site-logo img {
    width: 20%; /* Logo set to 20% of its original size */
    display: block;
    float: left; /* Align the logo to the left */
}

/* Main content area */
.site-main {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    
}

/* Footer styles */
.site-footer {
    text-align: center;
    padding: 10px;
    
}

/* Buttons */
button, .btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

button:hover, .btn:hover {
    background-color: #45a049;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-main {
        padding: 10px;
    }

    .site-header {
        padding: 10px;
    }

    .site-logo img {
        width: 30%; /* Adjust logo size for smaller screens */
    }
}
/* Header container */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    
}

/* Logo styling */
.site-logo img {
    width: 100%; /* Logo size reduced to 20% */
    display: block;
    float: left; /* Align logo to the left */
}

/* Title and tagline styling */
.site-title-tagline {
    flex-grow: 1;
    padding-left: 20px;
}

.site-title {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.site-description {
    font-size: 14px;
    color: #666;
}

/* Navigation menu */
.main-navigation {
    margin-left: auto;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-start; /* Ensure left-aligned on desktop */
}

#primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center; /* Align items vertically at the center */
}

#primary-menu li {
    margin: 0 15px;
    position: relative; /* Needed for absolute positioning of dropdown */
}

#primary-menu a {
    text-decoration: none;
    color: #dbdbdb;
    font-size: 16px;
    padding: 8px 0;
    display: inline-block; /* Ensure links are inline-block for padding */
}

#primary-menu a:hover {
    color: #0073aa;
}

/* Hide dropdown menus by default */
#primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%; /* Position it just below the parent item */
    left: 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: 200px; /* Set a fixed width for the dropdown */
}

#primary-menu li:hover .sub-menu {
    display: block;
}

/* Dropdown menu items */
#primary-menu .sub-menu li {
    width: 100%; /* Make dropdown items take full width */
    margin: 0;
}

#primary-menu .sub-menu a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

#primary-menu .sub-menu a:hover {
    background-color: #f1f1f1;
    color: #0073aa;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-logo img {
        width: 30%;
        margin-bottom: 20px;
    }

    .main-navigation {
        width: 100%;
        justify-content: flex-start;
    }

    #primary-menu {
        flex-direction: column; /* Stack items vertically on mobile */
        width: 100%;
        padding-left: 0;
    }

    #primary-menu li {
        margin: 10px 0; /* Space between items on mobile */
        width: 100%;
    }

    #primary-menu a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 20px;
        font-size: 18px;
    }

    #primary-menu a:hover {
        background-color: #f1f1f1;
        color: #0073aa;
    }

    /* Hide dropdown on mobile */
    #primary-menu .sub-menu {
        display: none;
    }
}

/* Footer Container */
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 15px; /* Reduced padding */
   
    background-color: #f9f9f9;
    text-align: left;
    height: auto; /* Ensure footer height adjusts with content */
    min-height: 80px; /* Set a minimum height to prevent it from expanding too much */
    margin: 0; /* Remove any default margin */
}

/* Footer Logo */
.footer-logo img {
    width: 100%; /* Reduced width of the logo */
    margin-bottom: 0px; /* Reduced space below the logo */
    max-height: 70px; /* Limit the height of the logo */
}

/* Footer Widgets */
.footer-widgets {
    margin: 5px 0; /* Reduced widget spacing */
    width: 100%;
}

/* Footer Widget Area */
.footer-widget-area {
    font-size: 12px; /* Reduced font size */
    color: #666;
    margin-bottom: 5px; /* Reduced margin */
}

/* Footer Credits */
.footer-credits {
    font-size: 11px; /* Reduced font size for credits */
    color: #999;
    margin-top: 5px;
    width: 100%;
}

/* Footer Links */
.footer-widget-area a, .footer-credits a {
    color: #0073aa;
    text-decoration: none;
}

.footer-widget-area a:hover, .footer-credits a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Responsive Adjustments for smaller screens */
@media (max-width: 768px) {
    .footer-container {
        padding: 5px; /* Reduced padding for mobile */
    }

    .footer-logo img {
        width: 100%; /* Adjust logo for smaller screens */
        max-height: 50px; /* Ensure logo doesn’t take up too much space */
    }

    .footer-widget-area {
        font-size: 12px; /* Smaller font size for mobile */
        margin-bottom: 5px; /* Reduced margin between widgets */
    }

    .footer-credits {
        font-size: 10px; /* Smaller font size for credits */
    }
}

/* Styling for the submenu toggle button */
.sub-menu-toggle {
    background: none;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    color: #333; /* Default color for the plus */
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Hover effect on the toggle button */
.sub-menu-toggle:hover {
    color: #FF4F33; /* Change to your primary red color */
}

/* Styling for the plus symbol */
.sub-menu-toggle .icon-plus {
    display: block;
    transition: transform 0.3s ease;
    font-size: 20px;
}

/* When the submenu is expanded, change the plus to minus */
.sub-menu-toggle[aria-expanded="true"] .icon-plus {
    transform: rotate(45deg); /* Rotate the plus to create a cross (minus symbol) */
}

/* Accessibility for screen readers */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

/* Optional: Add a subtle animation for smooth opening and closing of submenu */
.sub-menu-toggle {
    transition: color 0.3s ease-in-out;
}

.sub-menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 79, 51, 0.5); /* Focus ring for accessibility */
}
/* Container for the products */
.woocommerce ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 20px !important; /* Adds space between items */
    padding: 0 !important;
    list-style: none !important;
    max-width: 1200px !important;
    margin: 0 auto !important; /* Center the container */
}

/* Individual product styling */
.woocommerce ul.products li.product {
    flex: 0 1 calc(20% - 20px) !important; /* Adjust the width of the products to be smaller */
    padding: 15px !important; /* Add more padding for spacing */
    background-color: #fff !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important; /* Ensure padding does not affect overall width */
}

/* Hover effect */
.woocommerce ul.products li.product:hover {
    transform: scale(1.03) !important; /* Slightly smaller scale */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Product images */
.woocommerce ul.products li.product img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    margin-bottom: 10px !important;
}

/* Product titles */
.woocommerce ul.products li.product h2 {
    font-size: 16px !important; /* Slightly smaller title */
    margin-top: 10px !important;
    color: #333 !important;
}

/* Product price */
.woocommerce ul.products li.product .price {
    font-size: 14px !important; /* Slightly smaller price */
    color: #28a745 !important;
    margin-top: 5px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        flex: 0 1 calc(33.33% - 20px) !important; /* 3 products per row on medium screens */
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products li.product {
        flex: 0 1 calc(50% - 20px) !important; /* 2 products per row on smaller screens */
    }
}
