/*
 Theme Name:   Divi Child
 Theme URI:    https://www.elegantthemes.com/gallery/divi/
 Description:  Divi Child Theme for Sharp Copier Business
 Author:       Your Name
 Author URI:   https://yourwebsite.com
 Template:     Divi
 Version:      1.0.0
 Text Domain:  divi-child
*/

/* Add your custom CSS below this line */

/* Product Catalog Styles */
.product-catalog-wrapper {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.product-filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
}

.product-filters-sidebar h3 {
    margin-top: 0;
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.filter-group label:hover {
    color: #000;
}

.filter-checkbox {
    margin-right: 8px;
    cursor: pointer;
}

.clear-filters-btn {
    width: 100%;
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
}

.clear-filters-btn:hover {
    background: #555;
}

.product-grid-container {
    flex: 1;
}

.product-count {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

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

.product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    /* Changed from 'cover' to 'contain' */
    object-position: center;
    display: block;
    background: #f9f9f9;
    /* Adds subtle background behind images */
    padding: 15px;
    /* Adds padding inside the image area */
}

.product-card h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    color: #333;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #e0e0e0;
    /* Adds separation line between image and title */
}

.product-card.hidden {
    display: none;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-catalog-wrapper {
        flex-direction: column;
    }

    .product-filters-sidebar {
        width: 100%;
        position: static;
    }

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

/* Single Product Page Styles */
.single-product {
    margin: 40px 0;
}

.product-breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.product-breadcrumbs a {
    color: #333;
    text-decoration: none;
}

.product-breadcrumbs a:hover {
    color: #000;
    text-decoration: underline;
}

.product-breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.product-breadcrumbs .current {
    color: #999;
}

/* Product Catalog Breadcrumbs */
.product-catalog-breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.product-catalog-breadcrumbs a {
    color: #333;
    text-decoration: none;
}

.product-catalog-breadcrumbs a:hover {
    color: #000;
    text-decoration: underline;
}

.product-catalog-breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.product-catalog-breadcrumbs .current {
    color: #999;
}

.product-header {
    margin-bottom: 40px;
}

.product-title {
    font-size: 36px;
    margin: 0;
    color: #333;
}

.product-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.product-details {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.product-specs h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.specs-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.specs-table th {
    text-align: left;
    padding: 12px 15px 12px 0;
    font-weight: 600;
    color: #333;
    width: 40%;
}

.specs-table td {
    padding: 12px 0;
    color: #666;
}

.product-features {
    margin-top: 30px;
}

.product-features h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

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

.product-features li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: #666;
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.product-cta {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
    border: 2px solid #333;
}

.product-cta h3 {
    margin-top: 0;
    font-size: 22px;
    color: #333;
}

.product-cta p {
    color: #666;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #555;
}

.product-syndication {
    margin: 50px 0;
    padding: 40px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.product-syndication h2 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
}

.syndication-content {
    line-height: 1.8;
}

.product-description {
    margin: 50px 0;
    line-height: 1.8;
    color: #333;
}

/* Responsive Design for Single Product */
@media (max-width: 1024px) {
    .product-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-images {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 28px;
    }

    .product-details {
        padding: 20px;
    }

    .specs-table th {
        width: 50%;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    /* Remove Divi's sidebar line from custom templates */
    @media (min-width: 981px) {

        body.single-product #main-content .container:before,
        body.page-template-page-product-catalog #main-content .container:before {
            position: static !important;
            display: none !important;
            content: none !important;
        }
    }

    body.single-product #left-area,
    body.page-template-page-product-catalog #left-area {
        width: 100% !important;
        float: none !important;
        padding-right: 0 !important;
        border-right: none !important;
    }

}

/* Smart filter sections - hidden by default when appropriate */
.filter-section {
    transition: opacity 0.3s ease;
}

/* CTA at bottom - completely separate */
.product-cta-wrapper {
    background: #f5f5f5;
    padding: 60px 0;
    margin-top: 60px;
}

.product-cta-wrapper .product-cta {
    background: #fff;
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.product-cta-wrapper .product-cta h3 {
    margin-top: 0;
    font-size: 28px;
    color: #333;
}

.product-cta-wrapper .product-cta p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Remove any old CTA styling */
.product-details .product-cta,
.product-cta-section {
    display: none;
}

/* Placeholder for products without images */
.product-placeholder {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.placeholder-text {
    color: #999;
    font-size: 18px;
    padding: 20px;
    text-align: center;
}