/*
Theme Name: CGI Chandawalla Theme
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: A custom WordPress theme for CGI Chandawalla Group of Industries
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cgi-chandawalla
Tags: custom-theme
*/

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: #0073aa;
}

a:hover {
    color: #005177;
}

/* Container */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    padding: 0;
}

/* Header Top */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

/* Site Branding */
.site-branding {
    flex: 1;
}

.site-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #333;
}

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

/* Social Media */
.social-media {
    display: flex;
    align-items: center;
    gap: 15px;
}

.follow-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #fff;
}

.social-icon.facebook {
    background-color: #1877f2;
}

.social-icon.twitter {
    background-color: #1da1f2;
}

.social-icon.linkedin {
    background-color: #0077b5;
}

.social-icon.youtube {
    background-color: #ff0000;
}

.social-icon:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Main Navigation */
.main-navigation {
    background-color: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-navigation ul li {
    margin: 0;
    position: relative;
}

.main-navigation ul li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: #ccc;
}

.main-navigation ul li a {
    display: block;
    padding: 12px 18px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
    color: #003366;
    background-color: transparent;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 306px; /* Match banner height */
    background: #fff;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.slide.active {
    display: flex;
}

.slide-content {
    text-align: center;
    color: #fff;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-overlay {
    background: rgba(0, 51, 102, 0.7);
    padding: 30px 50px;
    border-radius: 5px;
    max-width: 80%;
}

.slide-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #fff;
}

.slide-content p {
    font-size: 18px;
    opacity: 0.9;
    color: #fff;
}

.slider-controls {
    display: none; /* Hide arrow navigation */
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.slider-dot {
    width: 40px;
    height: 3px;
    background: rgba(139, 69, 19, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.slider-dot.active {
    background: #8B4513;
    width: 50px;
}

.slider-dot:hover {
    background: rgba(139, 69, 19, 0.8);
}

/* Home Layout */
.home-layout {
    display: flex;
    gap: 30px;
    padding: 0;
}

.home-sidebar {
    width: 280px;
    flex-shrink: 0;
    order: 1;
}

.home-main {
    flex: 1;
    order: 2;
}

/* Page Layout */
.page-layout {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.page-main {
    flex: 1;
    order: 1;
    min-width: 0; /* Prevent flex items from overflowing */
}

.page-main .post {
    background: #fff;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-main .post-title {
    font-size: 32px;
    color: #003366;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-main .post-content {
    line-height: 1.8;
    color: #333;
}

.page-main .post-content p {
    margin-bottom: 20px;
}

.page-main .post-content h2,
.page-main .post-content h3 {
    color: #003366;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-main .post-content ul,
.page-main .post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.page-main .post-content li {
    margin-bottom: 10px;
}

.page-sidebar {
    width: 280px;
    flex-shrink: 0;
    order: 2;
}

/* Search Widget */
.search-widget {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-left: 4px solid #003366;
}

.search-widget h3 {
    font-size: 18px;
    color: #003366;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
    font-weight: 600;
}

.search-widget .search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-widget .search-field {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-widget .search-field:focus {
    outline: none;
    border-color: #003366;
}

.search-widget .search-submit {
    background: #003366;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-widget .search-submit:hover {
    background: #004488;
}

/* Introduction Section */
.intro-section {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.intro-section h2 {
    color: #003366;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
}

.intro-content {
    line-height: 1.8;
    color: #555;
}

/* Why CGI Section */
.why-cgi-section {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.why-cgi-section h2 {
    color: #003366;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
}

.why-cgi-list {
    list-style: none;
    padding: 0;
}

.why-cgi-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid #eee;
}

.why-cgi-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #003366;
    font-weight: bold;
    font-size: 18px;
}

.why-cgi-list li:last-child {
    border-bottom: none;
}

/* Products Section */
.our-products-section {
    background: #fff;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.our-products-section h2 {
    font-size: 28px;
    color: #003366;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #003366;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.product-card {
    background: #fff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
}

.product-image:empty {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

.product-image:empty::before {
    content: "No Image";
}

.product-info {
    padding: 20px;
}

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

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.widget-title {
    color: #003366;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
}

/* Product Categories Widget */
.product-categories-widget {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-left: 4px solid #003366;
}

.product-categories-widget h3 {
    font-size: 18px;
    color: #003366;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
    font-weight: 600;
}

.product-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.product-categories-list li:last-child {
    border-bottom: none;
}

.product-categories-list li:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.product-categories-list a {
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.product-categories-list a:hover {
    color: #003366;
}

/* Product Count Styling */
.category-count {
    background: #003366;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Sub-menu Styling */
.product-categories-list .sub-menu {
    list-style: none;
    padding-left: 20px;
    margin: 8px 0 0 0;
}

.product-categories-list .sub-menu li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.product-categories-list .sub-menu li:last-child {
    border-bottom: none;
}

.product-categories-list .sub-menu a {
    font-size: 14px;
}

/* Parent menu item indicator */
.product-categories-list .menu-item-has-children > a {
    font-weight: 600;
}

/* Quick Contact Widget */
.quick-contact-widget {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-left: 4px solid #003366;
}

.quick-contact-widget h3 {
    font-size: 18px;
    color: #003366;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
    font-weight: 600;
}

.quick-contact-form .form-group {
    margin-bottom: 15px;
}

.quick-contact-form input,
.quick-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.quick-contact-form input:focus,
.quick-contact-form textarea:focus {
    outline: none;
    border-color: #003366;
}

.quick-contact-form textarea {
    height: 100px;
    resize: vertical;
}

.quick-contact-form button {
    background: #003366;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
}

.quick-contact-form button:hover {
    background: #004488;
}

/* Main Content */
.content-wrapper {
    display: flex;
    gap: 30px;
}

main {
    flex: 1;
    padding: 40px 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.post {
    background: #fff;
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-title {
    font-size: 32px;
    color: #003366;
    margin-bottom: 20px;
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.8;
    color: #333;
}

/* Default Widget Styling */
.widget {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-left: 4px solid #003366;
}

.widget .widget-title {
    font-size: 18px;
    color: #003366;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
    font-weight: 600;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #003366;
}

/* Sidebar */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

/* Footer */
footer {
    background: #003366;
    color: #fff;
    padding: 40px 0;
    margin-top: 40px;
}

footer .container {
    text-align: center;
}

/* WooCommerce Product Styling */
.woocommerce .products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
    width: 100%;
}

.woocommerce ul.products {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.woocommerce ul.products li.product {
    list-style: none;
    /* float: left; */
    /* margin: 0 3.8% 2.992em 0; */
    padding: 0;
    position: relative;
    /* width: 22.05%; */
    margin-left: 0;
}

.woocommerce-page ul.products li.product {
    /* float: left; */
    /* margin: 0 3.8% 2.992em 0; */
    padding: 0;
    position: relative;
    /* width: 22.05%; */
    margin-left: 0;
}

.woocommerce .product {
    background: #fff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    min-width: 0; /* Prevent content from breaking grid */
    width: 100%;
}

.woocommerce .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.woocommerce .product .product-image {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce .product img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 0;
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
}

.woocommerce .product .product-image:empty,
.woocommerce .product .product-image .no-image {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    min-height: 200px;
    width: 100%;
    border-radius: 5px;
}

.woocommerce .product .product-image .no-image {
    padding: 0;
}

.woocommerce .product .product-info {
    padding: 20px;
}

.woocommerce .product h2.woocommerce-loop-product__title {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.woocommerce .product h2.woocommerce-loop-product__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woocommerce .product h2.woocommerce-loop-product__title a:hover {
    color: #003366;
}

.woocommerce .product .price {
    font-size: 18px;
    color: #003366;
    font-weight: 700;
    margin-bottom: 15px;
}

.woocommerce .product .button {
    background: #003366;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
    text-align: center;
}

.woocommerce .product .button:hover {
    background: #004488;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 20px;
    color: #333;
}

.woocommerce .woocommerce-pagination {
    margin-top: 30px;
    text-align: center;
}

.woocommerce .woocommerce-pagination a,
.woocommerce .woocommerce-pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
}

.woocommerce .woocommerce-pagination a:hover,
.woocommerce .woocommerce-pagination span.current {
    background: #003366;
    color: #fff;
    border-color: #003366;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top,
    .header-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .header-top {
        gap: 15px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-navigation ul li {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation ul li:last-child {
        border-bottom: none;
    }
    
    .home-layout,
    .page-layout {
        flex-direction: column;
    }
    
    .home-sidebar,
    .home-main,
    .page-sidebar,
    .page-main {
        width: 100%;
        order: unset;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 20px;
    }
}

.woocommerce .products ul::after, .woocommerce .products ul::before, .woocommerce ul.products::after, .woocommerce ul.products::before {
    content: " ";
    display: none;
}

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
    float: left;
    margin: 0 3.8% 2.992em 0;
    padding: 0;
    position: relative;
    width: 100%;
    margin-left: 0;
}

.woocommerce-loop-category__title{
    text-align: center;
}

.woocommerce-loop-product__title{
    text-align: center;
}

.product-info .product-title{
    text-align: center;
}

/* Contact Details Styling */
.contact-details-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.contact-detail-item {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.contact-detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-detail-item h4 {
    color: #003366;
    font-size: 18px;
    font-weight: 600;
}

.contact-detail-item p {
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.contact-detail-item a {
    color: #003366;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-detail-item a:hover {
    color: #004488;
    text-decoration: underline;
}

/* Related Products Styling */
.related.products {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.related.products h2 {
    font-size: 24px;
    color: #003366;
    margin-bottom: 30px;
    font-weight: 600;
}

.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
}

.related.products ul.products li.product {
    overflow: visible;
    height: auto;
    min-height: auto;
}

.related.products .product {
    height: auto;
    min-height: auto;
    overflow: visible;
}

.woocommerce .product .product-image {
    min-height: 200px;
    height: 200px;
}

.woocommerce .product .product-info {
    padding: 15px;
}

/* Sidebar Improvements */
.product-categories-list li {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-categories-list li:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

.product-categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    line-height: 1.5;
}

.category-count {
    background: #003366;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.quick-contact-widget {
    margin-top: 20px;
}

.quick-contact-widget h3 {
    margin-bottom: 15px;
}
