/*
Theme Name: Beaver Builder Child Theme
Theme URI: http://www.wpbeaverbuilder.com
Version: 1.0
Description: An example child theme that can be used as a starting point for custom development.
Author: The Beaver Builder Team
Author URI: http://www.fastlinemedia.com
Template: bb-theme
*/

/* Accordion */
.accordion-top-bar {
    display: grid;
    grid-template-columns:40px 1fr 2fr 0.5fr 0.5fr 0.5fr 0.5fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: #f5f5f5;
    font-size: 14px;
    text-align: start;
}

button:hover.accordion-toggle {
    background-color: var(--light-blue);
    border: none;
}
 button:active.accordion-toggle, button:focus.accordion-toggle{
    background-color: unset!important;
    border: none;
}
.accordion-top-bar h3{
    font-size:20px;
}
.accordion-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}
.accordion-wrapper .accordion-content .specs-container ul::before{
    content: none;
    display: none;
}

.toggle-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border: solid var(--primary-blue);
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    transition: transform 0.3s ease;
}

.accordion-toggle[aria-expanded="true"] .toggle-icon::before {
    transform: translate(-50%, -50%) rotate(-135deg);
}

.accordion-content {
    display: none;
    padding: 8px;
    border: 1px solid #ddd;
    border-top: none;
}

.accordion-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {
    padding: 1rem;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 500px;
}
/* Category Header Styles */
.category-header {
    max-width: 1200px!important;
    margin:auto;
}
.category-header-columns {
    display: grid;
    width: 100%;
    grid-template-columns: auto 1fr;
    align-items: center;

    margin-bottom: 20px;
}
h1.category-title-responsive{
    display: none;
}
.category-image {
    max-width: 400px;
    margin-right: 20px;
}
.category-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.category-info {
    flex: 2 1 500px;
}
h1.category-title, h1.category-title-responsive {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--dark-purple);
}
h1.category-title-responsive{
    text-align: center;
}
.category-overview {
    font-size: 1.2em;
    line-height: 1.6;
}
.category-body {
    font-size: 1em;
    line-height: 1.6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    margin: 20px 0;
}
.category-body:has(.category-body-content:only-child),
.category-body:has(.category-body-image:only-child) {
    grid-template-columns: 1fr;
}
.category-body-content {
    width: 100%;
}
.category-body-image {
    width: 100%;
    text-align: center;
}
.category-body-image img {
    max-height: 500px;
    width: auto;
    margin: auto;
}
.material h4 {
    font-size: 20px!important;}
/* Hide responsive toggle on desktop */
.responsive-container{
    display: none;
}


.shop-layout {
    display: flex;
    gap: 20px; /* Add space between sidebar and main content */
}

.shop-sidebar {
    flex: 1; /* Sidebar takes up 1 part of the layout */
    max-width: 300px; /* Optional: Fixed width for sidebar */
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
}

.shop-main-content {
    flex: 3; /* Main content takes up the remaining space */
}




/* Specs Container */
.specs-container {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.specs-container ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.specs-container li {

    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}
/* Basic Tab Styling (Desktop) - No changes here */
.category-tabs {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

/* Single Product Layout */
tr.cart_item{
    margin-block: 2rem;
   border: 1px solid var(--light-green);

}
td.cart_item {
    border: none!important;
}
.woocommerce table.shop_table, .woocommerce-page table.shop_table{
    border: none!important;
}
.cart_item .product-name a{
    font-size:16px;
    font-weight: 600;
    color: var(--dark-purple);
}
.custom-product-layout img{
width: auto;
height:100%;
max-height: 400px;
}
/* Grid container styles */
.custom-category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Individual card styles */
.custom-category-card {
    text-align: center;
    border: 1px solid var(--light-green);
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-category-card:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow-cool);
}

/* Image wrapper styles */
.custom-category-card .image-wrapper {
    position: relative;
    width: 100%;
    height: 200px; /* Fixed height container */
    overflow: hidden;
    margin-bottom: 10px;
}

/* Image styles */
.custom-category-card .image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Title styles */
.custom-category-card h3 {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
    font-weight: bold;
}



.tab-navigation {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 15px;
    border: none;
    background-color: var(--dark-blue);
    cursor: pointer;
    border-radius: 0px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin-right: 5px;
    color: white;
    min-width: 100px;
}
.tab-button:hover {
    background-color: var(--primary-green);
    color: white;
}

.tab-button.active {
    background-color: var(--dark-green);
    color: white;
    
}

.tab-contents {
    border: 1px solid #ddd;
    padding: 20px;
    border-top: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    min-height: 200px; 
    display: block;
}

/* Responsive Accordion Styling (Corrected) */
@media (max-width: 768px) {
    .category-tabs {
        flex-direction: column; /* Stack tabs and content */
    }
    h1.category-title-responsive{
        display: block;
    }
    .tab-navigation {
        flex-direction: column; /* Stack tab buttons */
        border-bottom: none; /* Remove bottom border */
    }

    .tab-button {
        width: 100%;
        text-align: left;
        padding: 15px;
        border: 1px solid #ddd;
        border-bottom: none;
        margin-bottom: 0;
        position: relative;
        cursor: pointer;
    }
    .tab-button:last-of-type{
        border-bottom: 1px solid #ddd;
    }

    .tab-button::after {
        content: "+";
        position: absolute;
        right: 10px;
        transition: transform 0.3s ease;
    }

    .tab-button.active::after {
        content: "-";
        transform: rotate(180deg);
    }

    .tab-content {
        
        border: 1px solid #ddd;
        border-top: none;
        padding: 0 15px; /* Add padding here */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        margin-bottom: 10px; /* Add margin between accordions */
    }

    .tab-content.active {
        min-height: 200px; /* Or 'none' if needed */
        padding: 15px; /* Restore padding when active */
    }
}

@media screen and (max-width: 768px) {
    .accordion-content.active {
        grid-template-columns: 1fr;
    }
}

.table-header {
    background-color: var(--primary-green);
    color: white;
    display: grid;
    grid-template-columns:40px 1fr 2fr 0.5fr 0.5fr 0.5fr 0.5fr 1fr;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.table-header-qty{
    text-align: center;
    font-size: 12px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .accordion-toggle,
    .table-header {
        grid-template-columns: 1fr 1.5fr 0.5fr 0.5fr 0.5fr 0.5fr 0.5fr 0.8fr;
        gap: 0.75rem;
        padding: 0.875rem;
        font-size: 0.95rem;
    }
 
    

}

@media screen and (max-width: 768px) {
    .accordion-toggle,
    .table-header {
        grid-template-columns: 1fr 1fr 0.5fr 0.5fr 0.8fr;
        gap: 0.5rem;
    }
    .table-header-qty{
        display: none;
    }
    .price-qty-a,
    .price-qty-b,
    .price-qty-c, .buy-button, .stock-status{
        display: none;
    }

    .responsive-container{
        display: grid;
       grid-template-columns: 1fr 1fr;
    }
    .responsive-description,
    .responsive-part-no, .responsive-container .price-qty-a,
    .responsive-container .price-qty-b,
    .responsive-container .price-qty-c, .responsive-container .buy-button, .responsive-container .stock-status{
        display: block;
    }
    .accordion-content{
        grid-template-columns: 1fr;
    }
    h3.product-title {
    font-size: 18px;
 }
 .description{
    font-size: 14px;
 }
 button.accordion-toggle{
    padding: 0;
 }
 .accordion-toggle{
    width: 20px;
    height: 20px;
 }
 h1.category-title{
    display: none;
}


@media screen and (max-width: 480px) {
    .accordion-toggle {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .table-header{
        grid-template-columns: 20px 1fr 1fr;
    }
    .accordion-top-bar {
        display: grid;
        grid-template-columns:20px 1fr 1fr;
        gap: 1rem;
        align-items: center;
        padding: 1rem;
        background-color: #f5f5f5;
      
        text-align: start;
    }

    
    .accordion-toggle::after {
        right: 10px;
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }
    .accordion-content.active {
        grid-template-columns: 1fr!important;
    }
    .category-header-columns {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .category-image {
        max-width: 100%;
        width: auto;
        margin-right: 0;
        margin-bottom: 20px;
    }
    .shop-layout {
        flex-direction: column; /* Stack sidebar and content */
    }

    .shop-sidebar {
        max-width: 100%; /* Sidebar spans full width on smaller screens */
    }


}

@media (max-width: 768px) {
    .category-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Category Cards Grid */
.custom-category-cards-grid {
    display: grid; 
    gap: 20px; 
    max-width: 1200px; 
    margin: 0 auto;
}

.custom-category-card {
    text-align: center;
}

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

.custom-category-card .image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates a square aspect ratio */
    overflow: hidden;
}

.custom-category-card .image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    object-fit: cover;
}
}
/* Modal responsive styles */
@media (max-width: 768px) {
    #addToCartModal > div {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }
    
    #addToCartModal button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #cartItemDetails {
        padding: 15px;
    }
    
    #cartItemDetails > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    #cartItemDetails > div:last-child {
        flex-direction: column;
        gap: 5px;
    }
    
    #cartItemDetails > div:last-child span {
        margin-left: 0 !important;
    }
}

/* Animation for modal */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

#addToCartModal > div {
    animation: modalFadeIn 0.3s ease-out;
}