/**
 * 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: 32px;
    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 {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    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;
}

/* 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: 20px;
}

.naibabiji-b2b-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.naibabiji-b2b-product-thumbnail {
    position: relative;
    overflow: hidden;
}

.naibabiji-b2b-product-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.naibabiji-b2b-product-summary {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
}

.naibabiji-b2b-product-title {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.naibabiji-b2b-product-title a {
    color: #333333;
    text-decoration: none;
}

.naibabiji-b2b-product-title a:hover {
    color: #0066cc;
}

.naibabiji-b2b-product-excerpt {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.naibabiji-b2b-product-meta {
    font-size: 13px;
    color: #888888;
    margin-bottom: 0;
    margin-top: auto;
}

.naibabiji-b2b-product-category a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.naibabiji-b2b-product-category a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.naibabiji-b2b-product-actions {
    display: flex;
    margin-top: auto;
}

.naibabiji-b2b-view-details-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0066cc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.naibabiji-b2b-view-details-button:hover {
    background-color: #0052a3;
    color: #ffffff;
}

/* 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;
    background: #f9f9f9;
    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: 28px;
    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: #007bff;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.naibabiji-b2b-inquiry-button:hover {
    background: #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;
}

/* 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: #007bff;
}

.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: 32px;
    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;
    background: #f8f9fa;
    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: 24px;
        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;
    }
}