/**
 * B2B Product Showcase - Frontend Styles
 */

/* ==========================================================================
   General Styles
   ========================================================================== */
.naibabiji-b2b-products-taxonomy-container,
.naibabiji-b2b-products-archive-container {
    max-width: 1290px;
    margin: 40px auto;
    padding: 40px;
    background-color: #ffffff;
}

/* Header Styles */
.naibabiji-b2b-taxonomy-header {
    margin-bottom: 30px;
    text-align: center;
}

.naibabiji-b2b-product-header {
    margin-bottom: 20px;
}

.naibabiji-b2b-taxonomy-title {
    font-size: 20px;
    color: #333333;
    margin-bottom: 15px;
}

.naibabiji-b2b-taxonomy-description {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.naibabiji-b2b-product-short-description {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

/* SEO Content Styles */
.naibabiji-b2b-seo-content {
    line-height: 1.8;
    color: #333333;
}

.naibabiji-b2b-seo-content h2,
.naibabiji-b2b-seo-content h3,
.naibabiji-b2b-seo-content h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #222222;
}

.naibabiji-b2b-seo-content p {
    margin-bottom: 15px;
}

.naibabiji-b2b-seo-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

.naibabiji-b2b-seo-content ul,
.naibabiji-b2b-seo-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.naibabiji-b2b-seo-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.naibabiji-b2b-seo-content a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* SEO Content Responsive Style */
@media screen and (max-width: 768px) {
    .naibabiji-b2b-seo-content {
        margin: 20px 0;
        padding: 15px;
    }

    .naibabiji-b2b-seo-content h2,
    .naibabiji-b2b-seo-content h3,
    .naibabiji-b2b-seo-content h4 {
        font-size: 18px;
        margin-top: 15px;
        margin-bottom: 10px;
    }

    .naibabiji-b2b-seo-content p {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .naibabiji-b2b-seo-content img {
        margin: 10px 0;
    }

    .naibabiji-b2b-seo-content ul,
    .naibabiji-b2b-seo-content ol {
        margin: 10px 0;
        padding-left: 15px;
    }
}

@media screen and (max-width: 480px) {
    .naibabiji-b2b-seo-content {
        margin: 15px 0;
        padding: 12px;
    }

    .naibabiji-b2b-seo-content h2,
    .naibabiji-b2b-seo-content h3,
    .naibabiji-b2b-seo-content h4 {
        font-size: 16px;
    }

    .naibabiji-b2b-seo-content p {
        font-size: 13px;
    }
}

.naibabiji-b2b-taxonomy-meta {
    color: #888888;
    font-size: 14px;
}

/* Breadcrumb Navigation */
.naibabiji-b2b-breadcrumbs {
    margin-bottom: 30px;
    padding: 10px 0;
    font-size: 14px;
    color: #666666;
}

.naibabiji-b2b-breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}

.naibabiji-b2b-breadcrumbs a:hover {
    text-decoration: underline;
}

.naibabiji-b2b-breadcrumbs .separator {
    margin: 0 8px;
    color: #999999;
}

/* Subcategory Buttons */
.naibabiji-b2b-child-categories {
    margin-bottom: 30px;
}

.naibabiji-b2b-child-categories h3 {
    font-size: 16px;
    color: #333333;
    margin-bottom: 12px;
}

.naibabiji-b2b-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.naibabiji-b2b-category-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1;
}

.naibabiji-b2b-category-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.3);
}

@media screen and (max-width: 480px) {
    .naibabiji-b2b-category-buttons {
        gap: 8px;
    }

    .naibabiji-b2b-category-button {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* Product Filters */
.naibabiji-b2b-product-filters {
    padding: 20px 0;
}

/* Product Grid */
.naibabiji-b2b-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Product Card */
.naibabiji-b2b-product-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.naibabiji-b2b-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #0066cc;
}

.naibabiji-b2b-product-thumbnail {
    position: relative;
    overflow: hidden;
    margin: -16px -16px 12px -16px;
    border-radius: 8px 8px 0 0;
}

.naibabiji-b2b-product-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.naibabiji-b2b-product-thumbnail:hover img {
    transform: scale(1.05);
}

.naibabiji-b2b-product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    text-align: center;
}



/* H1-H4 标题固定字号设定 */
h1.naibabiji-b2b-product-title {
    font-size: 28px;
    font-weight: 700;
}

h2.naibabiji-b2b-product-title {
    font-size: 24px;
    font-weight: 600;
}

h3.naibabiji-b2b-product-title {
    font-size: 20px;
    font-weight: 600;
}

h4.naibabiji-b2b-product-title {
    font-size: 18px;
    font-weight: 500;
}

h6.naibabiji-b2b-product-title {
    font-size: 17px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.naibabiji-b2b-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.naibabiji-b2b-product-title a:hover {
    color: #0066cc;
}

/* Section Titles (Related Products, etc.) */
.naibabiji-b2b-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.naibabiji-b2b-product-excerpt {
    color: #666666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.naibabiji-b2b-product-meta {
    font-size: 12px;
    color: #888888;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.naibabiji-b2b-product-category {
    display: flex;
    align-items: center;
}

.naibabiji-b2b-product-category::before {
    content: "🏷️";
    margin-right: 4px;
}

.naibabiji-b2b-product-category a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.naibabiji-b2b-product-category a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.naibabiji-b2b-product-actions {
    margin-top: auto;
}

.naibabiji-b2b-button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Base Unified Button Class */
.naib-b2b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--naibabiji-b2b-border-radius, 8px);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    line-height: 1;
    white-space: nowrap;
    outline: none;
    box-sizing: border-box;
    min-height: 46px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

@media screen and (max-width: 480px) {
    .naib-b2b-btn {
        width: 100%;
    }
}

.naib-b2b-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.naib-b2b-btn:active {
    transform: translateY(0);
}

/* Color Modifiers */
.naib-b2b-btn--primary {
    background: var(--naibabiji-b2b-primary-color, #0066cc);
    color: #ffffff !important;
}

.naib-b2b-btn--inquiry {
    background: #28a745;
    color: #ffffff !important;
}

.naib-b2b-btn--ai {
    background: linear-gradient(135deg, var(--ai-primary, #0A7AFF), var(--ai-indigo, #5856D6));
    color: #ffffff !important;
}

.naibabiji-b2b-view-details-button,
.naibabiji-b2b-inquiry-button {
    /* These now inherit from .naib-b2b-btn in HTML, but keeping selectors for legacy/override */
}

.naibabiji-b2b-view-details-button {
    background-color: #0066cc;
    color: #ffffff;
}

.naibabiji-b2b-view-details-button:hover {
    background-color: #0052a3;
}

.naibabiji-b2b-inquiry-button {
    background-color: #28a745;
    color: #ffffff;
}

.naibabiji-b2b-inquiry-button:hover {
    background-color: #1e7e34;
}

.naibabiji-b2b-button-icon {
    margin-right: 6px;
    font-size: 12px;
}

/* 响应式样式 - 侧边栏优化 */
@media screen and (max-width: 768px) {
    .naibabiji-b2b-product-card {
        padding: 12px;
    }

    .naibabiji-b2b-product-thumbnail {
        margin: -12px -12px 10px -12px;
    }

    .naibabiji-b2b-product-title {
        font-size: 14px;
        -webkit-line-clamp: 1;
    }

    .naibabiji-b2b-product-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }

    .naibabiji-b2b-button-group {
        gap: 6px;
    }

    .naibabiji-b2b-view-details-button,
    .naibabiji-b2b-inquiry-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .naibabiji-b2b-product-card {
        padding: 10px;
        border-radius: 6px;
    }

    .naibabiji-b2b-product-thumbnail {
        margin: -10px -10px 8px -10px;
        border-radius: 6px 6px 0 0;
    }

    .naibabiji-b2b-product-title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .naibabiji-b2b-product-excerpt {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .naibabiji-b2b-product-meta {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .naibabiji-b2b-view-details-button,
    .naibabiji-b2b-inquiry-button {
        padding: 5px 8px;
        font-size: 11px;
    }

    .naibabiji-b2b-button-icon {
        margin-right: 4px;
        font-size: 10px;
    }
}

/* 小容器优化 - 特别适合侧边栏 */
@media (max-width: 300px) {
    .naibabiji-b2b-product-card {
        padding: 8px;
    }

    .naibabiji-b2b-product-thumbnail {
        margin: -8px -8px 6px -8px;
    }

    .naibabiji-b2b-product-title {
        font-size: 12px;
        line-height: 1.2;
        -webkit-line-clamp: 1;
    }

    .naibabiji-b2b-product-excerpt,
    .naibabiji-b2b-product-meta {
        display: none;
        /* 在超小容器中隐藏摘要和元信息 */
    }

    .naibabiji-b2b-view-details-button,
    .naibabiji-b2b-inquiry-button {
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* 产品网格响应式列数 */
.naibabiji-b2b-columns-1 {
    grid-template-columns: 1fr;
}

.naibabiji-b2b-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.naibabiji-b2b-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.naibabiji-b2b-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.naibabiji-b2b-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.naibabiji-b2b-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* 响应式网格调整 */
@media screen and (max-width: 1200px) {
    .naibabiji-b2b-columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }

    .naibabiji-b2b-columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .naibabiji-b2b-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .naibabiji-b2b-columns-4,
    .naibabiji-b2b-columns-5,
    .naibabiji-b2b-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .naibabiji-b2b-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .naibabiji-b2b-columns-2,
    .naibabiji-b2b-columns-3,
    .naibabiji-b2b-columns-4,
    .naibabiji-b2b-columns-5,
    .naibabiji-b2b-columns-6 {
        grid-template-columns: 1fr;
    }
}

/* Pagination Navigation */
.navigation.pagination {
    margin-top: 40px;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 5px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-numbers.current {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.page-numbers:hover:not(.current) {
    background: #f5f5f5;
    border-color: #cccccc;
}

/* No Products Message */
.naibabiji-b2b-no-products {
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
}

.naibabiji-b2b-no-products h2 {
    color: #333333;
    margin-bottom: 15px;
}

.naibabiji-b2b-no-products p {
    color: #666666;
    margin-bottom: 15px;
}

.naibabiji-b2b-no-products a {
    color: #0066cc;
    text-decoration: none;
}

.naibabiji-b2b-no-products a:hover {
    text-decoration: underline;
}

/* Product Detail Page Styles */
.naibabiji-b2b-product-single-container {
    margin: 0 auto;
    padding: 40px 0;
    width: 100%;
    max-width: 1200px;
}

/* Product Detail Area */
.naibabiji-b2b-product-content-wrapper {
    margin-top: 60px;
}

.naibabiji-b2b-product-content {
    margin: 0 auto;
}

.naibabiji-b2b-product-content-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.naibabiji-b2b-product-description {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
}

.naibabiji-b2b-product-inquiry {
    margin-top: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.naibabiji-b2b-inquiry-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.naibabiji-b2b-inquiry-button:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.naibabiji-b2b-button-icon {
    margin-right: 8px;
    font-size: 18px;
}

.naibabiji-b2b-product-main.woocommerce-style {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Product Image Area */
.naibabiji-b2b-product-images {
    position: relative;
}

.naibabiji-b2b-product-featured-image {
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.naibabiji-b2b-featured-image-wrapper {
    position: relative;
    text-align: center;
}

.naibabiji-b2b-featured-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: opacity 0.2s ease-in-out;
}

.naibabiji-b2b-featured-image.loading {
    opacity: 0.6;
}

.naibabiji-b2b-featured-image-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--naibabiji-b2b-primary-color, #0A7AFF);
    border-radius: 50%;
    animation: naibabiji-b2b-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes naibabiji-b2b-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Thumbnail Area */
.naibabiji-b2b-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    position: relative;
}

/* Product Gallery Slider Styles */
.naibabiji-b2b-gallery-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Thumbnail Slider Navigation Button */
.naibabiji-b2b-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.naibabiji-b2b-gallery-nav::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-style: solid;
    border-width: 2px 2px 0 0;
    border-color: #666;
    position: absolute;
    top: 50%;
    left: 50%;
}

.naibabiji-b2b-gallery-nav.prev::before {
    transform: translate(-25%, -50%) rotate(-135deg);
}

.naibabiji-b2b-gallery-nav.next::before {
    transform: translate(-75%, -50%) rotate(45deg);
}

.naibabiji-b2b-gallery-nav.prev {
    left: 5px;
}

.naibabiji-b2b-gallery-nav.next {
    right: 5px;
}

.naibabiji-b2b-gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.naibabiji-b2b-gallery-nav:hover::before {
    border-color: #333;
}

.naibabiji-b2b-gallery-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.naibabiji-b2b-gallery-slider {
    overflow: hidden;
}

.naibabiji-b2b-gallery-thumb {
    position: relative;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    height: auto;
}

.naibabiji-b2b-gallery-thumb.active {
    border-color: var(--naibabiji-b2b-primary-color, #0A7AFF);
}

.naibabiji-b2b-gallery-thumb.active .naibabiji-b2b-thumb-overlay {
    opacity: 1;
}

.naibabiji-b2b-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--naibabiji-b2b-primary-color, #0A7AFF);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.naibabiji-b2b-thumb-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Product Information Area */
.naibabiji-b2b-product-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.naibabiji-b2b-product-header {
    margin-bottom: 20px;
}

.naibabiji-b2b-product-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
    line-height: 1.2;
}

.naibabiji-b2b-product-short-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Product Categories and Tags */
.naibabiji-b2b-product-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.naibabiji-b2b-related-products {
    margin-top: 60px;
    border-radius: 12px;
}

.naibabiji-b2b-related-products h2 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.naibabiji-b2b-products-grid.naibabiji-b2b-columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.naibabiji-b2b-product-categories a,
.naibabiji-b2b-product-tags a {
    color: #007bff;
    text-decoration: none;
}

.naibabiji-b2b-product-categories a:hover,
.naibabiji-b2b-product-tags a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .naibabiji-b2b-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .naibabiji-b2b-taxonomy-title {
        font-size: 28px;
    }

    .naibabiji-b2b-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .naibabiji-b2b-product-info {
        padding: 15px;
    }

    .naibabiji-b2b-product-content {
        padding: 0 20px;
    }

    .naibabiji-b2b-product-content-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .naibabiji-b2b-product-description {
        font-size: 15px;
    }

    /* Product Detail Page Mobile Layout Adjustments */
    .naibabiji-b2b-product-main.woocommerce-style {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .naibabiji-b2b-product-single-container {
        padding: 20px 15px;
    }

    .naibabiji-b2b-product-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    /* Mobile Product Gallery Slider Styles */
    .naibabiji-b2b-gallery-thumbnails {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        justify-content: flex-start;
        margin-top: 15px;
        overflow-x: hidden;
        position: relative !important;
        padding: 0;
        /* Remove possible padding */
        margin-bottom: 0;
        /* Remove bottom margin */
    }

    .naibabiji-b2b-gallery-thumb {
        width: calc(25% - 8px);
        margin-bottom: 0;
        /* Remove bottom margin */
        flex: 0 0 auto;
        height: auto;
        /* Fixed height for mobile */
        position: relative;
    }

    .naibabiji-b2b-gallery-thumb img {
        max-width: 100%;
        max-height: 100%;
        display: block;
        margin: 0 auto;
        object-fit: contain;
    }

    .naibabiji-b2b-gallery-nav {
        width: 25px;
        height: 25px;
        font-size: 18px;
        line-height: 22px;
    }

    .naibabiji-b2b-related-products {
        padding: 20px 15px;
        margin-top: 40px;
    }

    .naibabiji-b2b-products-grid.naibabiji-b2b-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .naibabiji-b2b-products-grid {
        grid-template-columns: 1fr;
    }

    .naibabiji-b2b-taxonomy-title {
        font-size: 24px;
    }

    .naibabiji-b2b-product-title {
        font-size: 20px;
    }

    .naibabiji-b2b-product-meta {
        flex-direction: column;
        gap: 10px;
    }

    /* Small Screen Device Product Gallery Optimization */
    .naibabiji-b2b-gallery-thumb {
        width: calc(33.33% - 7px);
    }

    .naibabiji-b2b-gallery-nav {
        width: 22px;
        height: 22px;
        font-size: 16px;
        line-height: 20px;
    }

    .naibabiji-b2b-product-inquiry {
        padding: 15px;
    }

    .naibabiji-b2b-inquiry-button {
        width: 100%;
        padding: 10px;
    }

    .naibabiji-b2b-products-grid.naibabiji-b2b-columns-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .naibabiji-b2b-related-products {
        padding: 15px 10px;
    }

    .naibabiji-b2b-related-products h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Premium UI System (Unified Panels & Forms)
   ========================================================================== */

/* Shared Overlay */
.naib-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.naib-overlay.active {
    display: block;
    opacity: 1;
}

/* Base Panel (Glassmorphism) */
.naib-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: calc(var(--naibabiji-b2b-border-radius, 12px) * 1.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.naib-panel.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.naib-panel__header {
    padding: 18px 24px;
    background: linear-gradient(to right, rgba(10, 122, 255, 0.05), rgba(88, 86, 214, 0.05));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.naib-panel__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.naib-panel__close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.naib-panel__close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    transform: rotate(90deg);
}

.naib-panel__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Standardized Form Fields */
.naib-field-group {
    margin-bottom: 20px;
}

.naib-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a4e;
    margin-bottom: 8px;
}

.naib-label .required {
    color: #ff3b30;
    margin-left: 2px;
}

.naib-input,
.naib-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1.5px solid #e1e1e6;
    border-radius: var(--naibabiji-b2b-border-radius, 8px);
    font-size: 14px;
    color: #1d1d1f;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.naib-input:focus,
.naib-textarea:focus {
    outline: none;
    border-color: var(--naibabiji-b2b-primary-color, #0a7aff);
    box-shadow: 0 0 0 4px rgba(10, 122, 255, 0.1);
    background: #fff;
}

.naib-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Grid System */
.naib-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.naib-field-full {
    grid-column: span 2;
}

.naib-form-actions,
.naib-form-status {
    grid-column: span 2;
}

@media screen and (max-width: 480px) {
    .naib-form-grid {
        display: block;
        /* Stack on mobile */
    }
}

/* Specialized context header for Inquiry Form */
.naibabiji-b2b-product-context-header {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.naib-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.naib-form-group label .required {
    color: #dc3545;
}

.naib-form-group input[type="text"],
.naib-form-group input[type="email"],
.naib-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.naib-form-group input:focus,
.naib-form-group textarea:focus {
    outline: none;
    border-color: var(--naibabiji-b2b-primary-color, #0a7aff);
    box-shadow: 0 0 0 3px rgba(10, 122, 255, 0.1);
    background: #fff;
}

.naib-form-actions {
    margin-top: 30px;
}

.naibabiji-b2b-submit-button {
    width: 100%;
    background: var(--naibabiji-b2b-primary-color, #0a7aff);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.naibabiji-b2b-submit-button:hover {
    background: var(--naibabiji-b2b-primary-hover, #085fcc);
}

.naibabiji-b2b-submit-button:active {
    transform: scale(0.99);
}

.naibabiji-b2b-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: naib-spin 0.8s linear infinite;
}

@keyframes naib-spin {
    to {
        transform: rotate(360deg);
    }
}

.naib-form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.naib-form-status.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

#naibabiji-b2b-inquiry-success {
    text-align: center;
    padding: 20px 0;
}

#naibabiji-b2b-inquiry-success .success-icon {
    width: 60px;
    height: 60px;
    background: #48bb78;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

#naibabiji-b2b-inquiry-success .success-message {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
}

.naibabiji-b2b-modal-close-btn {
    background: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.naibabiji-b2b-modal-close-btn:hover {
    background: #e2e8f0;
}

/* Mobile Adjustments */
@media screen and (max-width: 480px) {
    .naibabiji-b2b-modal-container {
        width: 95%;
        border-radius: 8px;
    }

    .naibabiji-b2b-modal-body {
        padding: 20px;
    }

    .naib-form-group {
        margin-bottom: 15px;
    }
}