/* ===== PRODUCT PAGE SIDEBAR ===== */

/* hide wlr message here */
span.wlr-product-message {
    display: none !important;
}

.single-product-container-with-sidebar {
    margin: 0 auto;
    padding: 30px;
    max-width: 100%;
}

.single-product-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: start;
}

/* Product Main Content - No additional constraints */
.product-main-content {
    min-width: 0;
    width: 100%;
}

/* Product Sidebar */
.product-sidebar {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--product-sidebar-shadow);
}

/* Back to Shop Button */
.back-to-shop-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.back-to-shop-btn:hover {
    background: var(--primary-color);
    filter: brightness(1.1);
    color: #000;
}

.back-to-shop-btn svg {
    transition: transform 0.3s ease;
}

.back-to-shop-btn:hover svg {
    transform: translateX(-4px);
}

/* Product Categories Widget */
.product-categories-widget {
    padding: 20px 0;
}

.product-categories-widget .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0 20px;
    color: var(--text-color);
}

/* Category List */
.product-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    position: relative;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Category Toggle Button */
.category-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-toggle:hover {
    background: rgba(254, 185, 0, 0.1);
}

.category-toggle .chevron-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.category-item.expanded>.category-header .category-toggle .chevron-icon {
    transform: rotate(90deg);
}

/* Category Link */
.category-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.category-item:not(.has-children) .category-link {
    padding-left: 20px;
}

.category-link:hover {
    background: rgba(254, 185, 0, 0.05);
    color: var(--primary-color);
}

.category-item.active>.category-header .category-link {
    background: rgba(254, 185, 0, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 5px;
    margin-right: 5px;
}

.product-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Category Children (Subcategories) */
.category-children {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--product-sidebar-children-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: none;
}

.category-children.expanded {
    display: block;
}

.category-children .category-item {
    border-bottom: none;
}

.category-children .category-link {
    padding-left: 50px;
    font-size: 0.9rem;
}

.category-children .category-item.active .category-link {
    background: rgba(254, 185, 0, 0.15);
}

/* Product Main Content */
.product-main-content {
    min-width: 0;
}

/*focus on input correct border radius to match style*/
input.search-field:focus {
    border-radius: 25px !important;
}

/*margines dolny sekcji na product page*/
.woocommerce-js div.product .woocommerce-tabs {
    margin-bottom: 0;
    padding-top: 0;
}

/*hide empty div*/
.clear,
form.cart:before,
form.cart:after {
    display: none !important;
}

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

@media (max-width: 1200px) {
    .single-product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-sidebar {
        display: none;
    }

    .product-main-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .single-product-container-with-sidebar {
        padding: 20px 15px;
    }

    .back-to-shop-btn {
        font-size: 0.9rem;
        padding: 15px 18px;
    }

    .category-link {
        font-size: 0.9rem;
        padding: 10px 15px 10px 8px;
    }

    .category-children .category-link {
        padding-left: 35px;
        font-size: 0.85rem;
    }
}