/**
 * Product Sidebar Styles
 * React/Tailwind-inspired design - minimal and clean
 */

.tp-product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Section Title */
.tp-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1E82E9 50%, #18BBEF 100%);
    border: 1px solid #1e8f3f;
    border-radius: 5px;
}

/* 1. Categories Section */
.tp-categories-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 1rem;
}

.tp-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tp-category-item {
    border-radius: 5px;
    transition: all 0.2s ease;
}

.tp-category-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.tp-category-main:hover {
    background-color: #f9fafb;
}

.tp-category-link {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.tp-category-link:hover {
    color: #111827;
}

.tp-category-toggle {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    color: #6b7280;
}

.tp-category-toggle:hover {
    background-color: #f3f4f6;
}

.tp-category-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.tp-category-children {
    display: none;
    flex-direction: column;
    gap: 0.125rem;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.tp-category-item.expanded .tp-category-children,
.tp-category-children.show {
    display: flex;
}

.tp-category-child-link {
    display: block;
    padding: 0.375rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.813rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.tp-category-child-link:hover {
    background-color: #f9fafb;
    color: #374151;
}

/* 2. Featured Products Section */
.tp-featured-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 10px;
}

.tp-featured-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tp-featured-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.tp-featured-item:hover {
    background-color: #f9fafb;
}

.tp-featured-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.tp-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-featured-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.tp-featured-title {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.tp-featured-title:hover {
    color: #111827;
}

.tp-featured-price {
    color: #059669;
    font-weight: 600;
    font-size: 0.938rem;
}

.tp-featured-price .amount {
    font-size: 0.938rem;
}

/* 3. Latest Posts Section */
.tp-posts-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 1rem;
}

.tp-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tp-post-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.tp-post-item:hover {
    background-color: #f9fafb;
}

.tp-post-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.tp-post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: #9ca3af;
    font-size: 1.5rem;
}

.tp-post-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.tp-post-title {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.tp-post-title:hover {
    color: #111827;
}

/* Product Update Notice (in Product Info Column) */
.tanphat-product-update-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 5px;
}

.tanphat-product-update-notice .tp-update-notice-content {
    color: #166534;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: left;
}

.tanphat-product-update-notice .tp-update-notice-content p {
    margin: 0;
}

.tanphat-product-update-notice .tp-update-notice-content strong {
    font-weight: 600;
    color: #15803d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tp-product-sidebar {
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .tp-section-title {
        font-size: 0.938rem;
    }

    .tp-featured-image,
    .tp-post-image {
        width: 50px;
        height: 50px;
    }

    .tp-featured-title,
    .tp-post-title {
        font-size: 0.813rem;
    }
}