/**
 * B2B Product Plugin Frontend Styles
 *
 * @package B2B_Product_Plugin
 * @since 1.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.b2b-product-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

.col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
    padding: 0 15px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 45px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    color: var(--b2b-background-color, #fff);
    background-color: var(--b2b-primary-color, #007cba);
    border-color: var(--b2b-primary-color, #007cba);
}

.btn-primary:hover {
    background-color: var(--b2b-primary-hover, #005a87);
    border-color: var(--b2b-primary-hover, #005a87);
}

.btn-secondary {
    color: var(--b2b-text-color, #333);
    background-color: var(--b2b-secondary-color, #6c757d);
    border-color: var(--b2b-secondary-color, #6c757d);
}

.btn-secondary:hover {
    background-color: var(--b2b-secondary-hover, #545b62);
    border-color: var(--b2b-secondary-hover, #545b62);
    color: var(--b2b-background-color, #fff);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    min-height: 45px;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--b2b-primary-color, #8BC34A);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(139, 195, 74, 0.25);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* ==========================================================================
   Global Button Styles
   ========================================================================== */

/* Apply uppercase to all buttons */
button,
.btn,
.contact-submit-btn,
.submit-btn,
.inquire-btn,
.view-btn,
.load-more-btn,
.share-btn,
.single-action-btn,
.tab-button,
.floating-button,
.quick-view-btn {
    letter-spacing: 0.5px;
}

#inquiry-form {
	background-color: #fff;
	padding: 40px;
}
/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.b2b-breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 30px;
    font-size: 13px;
}

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.b2b-breadcrumb .breadcrumb a {
    color: #6c757d!important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.b2b-breadcrumb .breadcrumb a:hover {
    color: var(--b2b-primary-color, #007cba);
    text-decoration: underline;
}

.b2b-breadcrumb .breadcrumb .current {
    color: #6c757d;
    font-weight: 500;
}

.b2b-breadcrumb .breadcrumb .separator {
    margin: 0 10px;
    color: #6c757d;
}

/* ==========================================================================
   Layout
   ========================================================================== */

/* Layout */
.b2b-content-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.b2b-sidebar {
    flex: 0 0 250px;
    order: -1;
}

.b2b-main-content {
    flex: 1;
    display: flex;
    gap: 30px;
}

.product-content-area {
    flex: 1;
}

/* Ensure sidebar is on the left */
.b2b-main-content .b2b-sidebar {
    order: -1;
    flex: 0 0 250px;
}

.b2b-main-content .product-content-area {
    flex: 1;
    order: 1;
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

.single-product-wrapper {
    padding: 30px 0;
}

.product-gallery {
    margin-bottom: 30px;
    max-width: 50%;
    width: 100%;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* 使用高优先级选择器覆盖主题样式 */
.product-gallery .main-image-container .main-nav-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    opacity: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    font-family: inherit !important;
    font-weight: normal !important;
    color: transparent !important;
    text-align: center !important;
    vertical-align: middle !important;
    display: block !important;
    box-sizing: border-box !important;
}

.product-gallery .main-image-container:hover .main-nav-btn {
    opacity: 1 !important;
}

.product-gallery .main-image-container .main-nav-btn:hover {
    background-color: #fff !important;
    border-color: var(--b2b-secondary-color) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.product-gallery .main-image-container .main-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.product-gallery .main-image-container .main-prev {
    left: 15px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") !important;
    background-size: 12px 12px !important;
}

.product-gallery .main-image-container .main-next {
    right: 15px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-size: 12px 12px !important;
}

.product-gallery .main-image-container .main-nav-btn:hover.main-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") !important;
}

.product-gallery .main-image-container .main-nav-btn:hover.main-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
}

/* 彻底清除所有可能的伪元素内容 */
.product-gallery .main-image-container .main-nav-btn::before,
.product-gallery .main-image-container .main-nav-btn::after,
.product-gallery .main-image-container .main-prev::before,
.product-gallery .main-image-container .main-prev::after,
.product-gallery .main-image-container .main-next::before,
.product-gallery .main-image-container .main-next::after {
    content: none !important;
    display: none !important;
}

/* Override theme tab styles - remove border radius */
.b2b-product-wrapper .product-tabs .nav-tab,
.b2b-product-wrapper .tab-button,
.product-main-content .tab-button,
.product-tabs .nav-tab,
.nav-tab,
.tab-button {
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Ensure all button elements don't have rounded corners in product area */
.b2b-product-wrapper button,
.b2b-product-wrapper .button,
.b2b-product-wrapper input[type="button"],
.b2b-product-wrapper input[type="submit"],
.product-main-content button,
.product-main-content .button {
    border-radius: 0 !important;
}

.thumbnail-gallery-wrapper {
    width: 100%;
}

.gallery-carousel {
    position: relative;
    width: 100%;
}

.thumbnail-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.gallery-thumb {
    flex-shrink: 0;
    width: calc((100% - 32px) / 5);
    aspect-ratio: 1;
    min-width: 60px;
    max-width: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.gallery-thumb:hover {
    border-color: var(--b2b-secondary-color, #6c757d);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.gallery-thumb.active {
    border-color: var(--b2b-secondary-color, #6c757d);
    box-shadow: 0 0 0 1px var(--b2b-secondary-color, #6c757d);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-gallery {
        max-width: 100%;
    }
    
    .gallery-thumb {
        width: calc((100% - 24px) / 4);
        min-width: 50px;
        max-width: 70px;
    }
}

@media (max-width: 480px) {
    .gallery-thumb {
        width: calc((100% - 16px) / 3);
        min-width: 45px;
        max-width: 60px;
    }
    
    .main-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .main-prev {
        left: 10px;
    }
    
    .main-next {
        right: 10px;
    }
}

.product-info h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Product Short Description Styling */
.product-short-description {
    margin-bottom: 20px;
}

.product-short-description p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.product-short-description p:last-child {
    margin-bottom: 0;
}

.product-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-meta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: #495057;
}

.meta-value {
    color: #333;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #8BC34A;
}

.status.in-stock {
    color: #28a745;
    font-weight: 600;
}

.status.out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.product-actions .btn {
    margin: 0;
    flex: 1;
    min-width: 120px;
    background-color: var(--b2b-secondary-color, #6c757d) !important;
    color: white !important;
}

.product-actions .btn:hover {
    background-color: var(--b2b-secondary-hover, #545b62) !important;
    transform: translateY(-1px);
}

/* Inquire-related buttons: transparent default, primary on hover */
.product-actions .inquire-btn,
.product-actions .add-to-inquire-btn,
.inquire-btn,
.add-to-inquire-btn {
    background-color: transparent !important;
    color: var(--b2b-primary-color) !important;
    border: 1px solid var(--b2b-primary-color);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
}

.product-actions .inquire-btn:hover,
.product-actions .inquire-btn:focus,
.product-actions .inquire-btn:active,
.product-actions .add-to-inquire-btn:hover,
.product-actions .add-to-inquire-btn:focus,
.product-actions .add-to-inquire-btn:active,
.inquire-btn:hover,
.inquire-btn:focus,
.inquire-btn:active,
.add-to-inquire-btn:hover,
.add-to-inquire-btn:focus,
.add-to-inquire-btn:active {
    background-color: var(--b2b-primary-color) !important;
    color: #fff !important;
    border-color: var(--b2b-primary-color);
    transform: translateY(-1px);
}

.social-share {
    margin-bottom: 30px;
}

.social-share h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #fff;
}

.share-btn.facebook {
    background-color: #1877f2;
}

.share-btn.facebook:hover {
    background-color: #166fe5;
    color: white;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.twitter:hover {
    background-color: #1a91da;
    color: white;
}

.share-btn.linkedin {
    background-color: #0077b5;
}

.share-btn.linkedin:hover {
    background-color: #006ba1;
    color: white;
}

.share-btn.email {
    background-color: #6c757d;
}

.share-btn.email:hover {
    background-color: #5a6268;
    color: white;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

/* New platforms & icon image size */
.share-btn .share-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.share-btn.x {
    background-color: #000000;
}

.share-btn.x:hover {
    background-color: #111111;
    color: white;
}

.share-btn.pinterest {
    background-color: #e60023;
}

.share-btn.pinterest:hover {
    background-color: #cc001f;
    color: white;
}

.share-btn.whatsapp {
    background-color: #25d366;
}

.share-btn.whatsapp:hover {
    background-color: #1ebd5a;
    color: white;
}

/* WordPress Widget Areas */
.b2b-category-widgets,
.b2b-detail-widgets {
    margin-top: 20px;
}

.b2b-category-widgets .widget,
.b2b-detail-widgets .widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.b2b-category-widgets .widget-title,
.b2b-detail-widgets .widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.b2b-category-widgets .widget ul,
.b2b-detail-widgets .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.b2b-category-widgets .widget li,
.b2b-detail-widgets .widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.b2b-category-widgets .widget li:last-child,
.b2b-detail-widgets .widget li:last-child {
    border-bottom: none;
}

.b2b-category-widgets .widget a,
.b2b-detail-widgets .widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.b2b-category-widgets .widget a:hover,
.b2b-detail-widgets .widget a:hover {
    color: var(--b2b-primary-color, #007cba);
    text-decoration: none;
}

/* Product Tabs - 覆盖主题圆角样式 */
.product-tabs {
    margin-bottom: 40px;
}

.nav-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

/* 强制覆盖主题的圆角按钮样式 */
.product-tabs .nav-tab,
.b2b-product-wrapper .nav-tab,
.single-b2b-product .nav-tab {
    padding: 12px 20px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666 !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.product-tabs .nav-tab:hover,
.b2b-product-wrapper .nav-tab:hover,
.single-b2b-product .nav-tab:hover {
    color: var(--b2b-primary-color, #8BC34A) !important;
    border-radius: 0 !important;
    background: none !important;
}

.product-tabs .nav-tab.active,
.b2b-product-wrapper .nav-tab.active,
.single-b2b-product .nav-tab.active {
    color: var(--b2b-primary-color, #8BC34A) !important;
    border-bottom-color: var(--b2b-primary-color, #8BC34A) !important;
    border-radius: 0 !important;
    background: none !important;
}

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

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.specifications-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.specifications-table th,
.specifications-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.specifications-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    width: 30%;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 25px;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #8BC34A;
    font-weight: bold;
}

.features-list li:last-child {
    border-bottom: none;
}

/* Related Products */
.related-products {
    margin-top: 50px;
}

.related-products h3 {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

/* ==========================================================================
   Archive/Taxonomy Pages
   ========================================================================== */

.archive-header,
.taxonomy-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.archive-title,
.taxonomy-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.archive-description,
.taxonomy-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.taxonomy-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.taxonomy-meta {
    margin-top: 15px;
}

.product-count {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.child-categories {
    margin-top: 20px;
}

.child-categories h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.child-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.child-category-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.child-category-link:hover {
    background-color: var(--b2b-primary-color, #8BC34A);
    border-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
    text-decoration: none;
}

.child-category-link .count {
    font-size: 12px;
    opacity: 0.8;
}

/* Products Controls */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 24px;
    margin: 0;
}

.products-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.products-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filter {
    position: relative;
}

.search-filter input {
    padding-right: 40px;
    min-width: 200px;
}

.search-filter button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
}

.view-options {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
    background-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
}

.view-btn + .view-btn {
    border-left: 1px solid #dee2e6;
}

.products-results-info {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.active-filters {
    margin-bottom: 20px;
}

.filter-tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.filter-tag .remove {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Products Grid */
.products-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.products-grid.grid-view {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid.grid-view.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid.grid-view.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid.grid-view.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.products-grid.list-view .product-image {
    flex: 0 0 150px;
    margin-bottom: 0;
}

.products-grid.list-view .product-content {
    flex: 1;
}

/* Product Item */
.product-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--b2b-primary-color);
}

.product-image {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 10px;
}

.overlay-actions .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-categories {
    margin-bottom: 8px;
}

.category-tag {
    display: inline-block;
    padding: 2px 6px;
    background-color: #e9ecef;
    color: #666;
    font-size: 11px;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 3px;
}

.category-tag:hover {
    background-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
    text-decoration: none;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover,
.product-title-link:hover {
    color: var(--b2b-primary-color);
    text-decoration: none;
}

/* Enforce primary color on product title hover across archive contexts */
.post-type-archive-b2b_product .product-title a:hover,
.post-type-archive-b2b_product .product-title-link:hover,
.tax-b2b_product_category .product-title a:hover,
.tax-b2b_product_category .product-title-link:hover,
.related-products .product-title a:hover,
.related-products .product-title-link:hover {
    color: var(--b2b-primary-color, #007cba) !important;
}

.product-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    margin-bottom: 15px;
}

.meta-item {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.meta-item strong {
    color: #333;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 8px;
}

/* Load More */
.load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 12px 30px;
    font-size: 16px;
}

/* Pagination */
.products-pagination {
    margin-top: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0 2px;
}

.page-item a,
.page-item span {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-item a:hover {
    background-color: var(--b2b-primary-color, #8BC34A);
    border-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
    text-decoration: none;
}

.page-item.current span {
    background-color: var(--b2b-primary-color, #8BC34A);
    border-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
}

/* No Products Found */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
}

.no-products-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #666;
}

.no-products-content p {
    font-size: 16px;
    color: #999;
    margin-bottom: 25px;
}

/* Related Categories/Tags */
.related-categories,
.related-tags {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.related-categories h3,
.related-tags h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.category-card .category-image {
    height: 120px;
    overflow: hidden;
}

.category-card .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card .category-content {
    padding: 15px;
}

.category-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-card h4 a {
    color: #333;
    text-decoration: none;
}

.category-card h4 a:hover {
    color: var(--b2b-primary-color, #8BC34A);
}

.category-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tag-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: var(--b2b-primary-color, #8BC34A);
    border-color: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, #fff);
    text-decoration: none;
}

.tag-link .count {
    font-size: 12px;
    opacity: 0.8;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

/* Category Widget Styling */

.category-widget h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 8px;
    position: relative;
}

.category-widget h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 44px;
    height: 3px;
    background-color: var(--b2b-primary-color, #007cba);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list > li {
    margin-bottom: 3px;
    background: #f8f9fa;
    overflow: hidden;
}

/* Parent Category Styling */
.category-list > li > a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    background: #e9ecef;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-list > li > a:hover {
    background: var(--b2b-primary-color, #007cba);
    color: var(--b2b-background-color, white);
}

.category-list > li.current-cat > a {
    background: var(--b2b-primary-color, #007cba);
    color: var(--b2b-background-color, white);
}

/* Sub-category Styling */
.category-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
}

.category-list .children li {
    border-top: 1px solid #dee2e6;
}

.category-list .children a {
    display: block;
    padding: 10px 15px 10px 30px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin-top: 3px;
    font-size: 14px;
}

.category-list .children a:hover {
    color: var(--b2b-primary-color, #007cba);
}

.category-list .children a:hover:before {
    content: "- ";
    position: absolute;
    left: 15px;
}

.category-list .children li.current-cat a {
    color: var(--b2b-primary-color, #007cba);
    font-weight: 600;
}

/* Widget Spacing */
.b2b-category-widgets .widget,
.b2b-detail-widgets .widget {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.b2b-category-widgets .widget h3,
.b2b-detail-widgets .widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid var(--b2b-primary-color, #007cba);
    padding-bottom: 8px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-lg {
    max-width: 800px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.close {
    padding: 0;
    background-color: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    cursor: pointer;
}

.close:hover {
    opacity: 0.75;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.b2b-contact-form-section {
    background: #f8f8f8;
}

.contact-us-bg-button {
    background: var(--b2b-primary-color, rgb(0, 124, 186));
}

.product-content {
    gap: 25px;
}

.b2b-sidebar {
    flex: 0 0 260px !important;
}

/* ==========================================================================
   Inquiry Form
   ========================================================================== */

.inquiry-form {
    margin: 0 auto;
}

.inquiry-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: stretch;
}

.inquiry-form .form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form-row {
    display: flex;
    align-items: stretch;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.contact-form-field,
.captcha-field,
.submit-button-field {
    display: flex;
    align-items: center;
    min-height: 45px;
}

.captcha-display {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 10px;
    padding: 0 15px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.contact-submit-btn {
    height: 45px;
    background-color: var(--b2b-primary-color, #007cba);
    color: var(--b2b-background-color, white);
    border: none;
    border-radius: 4px;
    padding: 0 30px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.contact-submit-btn:hover {
    background-color: var(--b2b-primary-hover, #005a87);
}

/* Contact Us Background Button */
.contact-us-bg-button {
    text-align: center;
    padding-top: 10px;
}

.inquiry-form textarea {
    min-height: 100px;
    resize: vertical;
}

.inquiry-form .form-actions {
    text-align: center;
    margin-top: 20px;
}

.inquiry-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.inquiry-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Shortcodes
   ========================================================================== */

.b2b-products-shortcode {
    margin: 30px 0;
}

.b2b-categories-shortcode {
    margin: 30px 0;
}

.b2b-inquiry-form-shortcode {
    margin: 30px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Desktop Layout */
@media (min-width: 1000px) {
    .b2b-content-wrapper {
        display: flex;
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
    }
    
    .b2b-sidebar {
        flex: 0 0 250px;
        order: 1;
        margin-top: 0;
    }
    
    .b2b-main-content {
        flex: 1;
        order: 2;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Mobile First Approach */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .row {
        margin: 0 -10px;
    }
    
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-9,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    /* Breadcrumb mobile optimization */
    .b2b-breadcrumb {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
    }
    
    /* Layout mobile optimization */
    .b2b-content-wrapper {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .b2b-sidebar {
        flex: none !important;
        order: 2 !important;
        margin-top: 30px !important;
    }
    
    .b2b-main-content {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    /* Contact form mobile optimization */
    .contact-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-form-field,
    .captcha-field,
    .submit-button-field {
        width: 100%;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }
    
    .contact-submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    /* Product grid mobile optimization */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .product-item {
        margin-bottom: 20px !important;
    }
    
    /* Sidebar mobile optimization */
    .b2b-category-widgets .widget,
    .b2b-detail-widgets .widget {
        margin-bottom: 15px;
        padding: 15px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .row {
        margin: 0 -15px;
    }
    
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-9 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    /* Product grid tablet optimization */
    .products-grid.grid-view {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .b2b-content-wrapper {
        flex-direction: column !important;
        gap: 25px !important;
    }
    
    .b2b-sidebar {
        order: 2;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .container {
        padding: 0 30px;
    }
    
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .products-grid.grid-view.columns-3,
    .products-grid.grid-view.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .products-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-filter input {
        min-width: 100%;
    }
    
    .products-grid.list-view .product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .products-grid.list-view .product-image {
        flex: none;
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .products-grid.grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* Default desktop view - 3 columns */
@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 767px) {
    /* Hide sidebar on all mobile pages */
    .b2b-sidebar {
        display: none !important;
    }
    
    /* Hide floating contact buttons on mobile */
    .b2b-floating-buttons {
        display: none !important;
    }
    
    /* Mobile H1 font size */
    h1 {
        font-size: 20px !important;
    }
    
    /* Mobile content wrapper - full width without sidebar */
    .b2b-content-wrapper {
        display: block;
    }
    
    .product-content-area {
        width: 100%;
        margin: 0;
    }
    
    /* Mobile product grid columns */
    .products-grid.grid-view.columns-2,
    .products-grid.grid-view.columns-3,
    .products-grid.grid-view.columns-4 {
        grid-template-columns: 1fr;
    }
    
    /* Mobile columns setting - 1 column by default */
    body.mobile-columns-1 .products-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Mobile columns setting - 2 columns option */
    body.mobile-columns-2 .products-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px;
    }
    
    body.mobile-columns-2 .product-item {
        font-size: 14px;
    }
    
    body.mobile-columns-2 .product-title {
        font-size: 16px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .inquiry-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Fix captcha layout on mobile */
    .captcha-field .captcha-row {
        display: flex;
        align-items: last baseline;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .captcha-input {
        flex: 1;
        min-width: 0;
    }
    
    .captcha-display {
        flex-shrink: 0;
        width: 80px;
        height: 40px;
        font-size: 14px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .archive-title,
    .taxonomy-title {
        font-size: 24px;
    }
    
    .single-product-wrapper .product-info h1 {
        font-size: 20px;
    }
    
    /* Related products - 2 columns on mobile */
    .related-products-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px;
    }
    
    .related-products .product-card {
        font-size: 14px;
    }
    
    .related-products .product-title {
        font-size: 14px;
    }
    
    .related-products .product-image {
        height: 150px;
    }
    
    .related-products .product-info {
        padding: 15px;
    }
    
    /* Category header padding adjustment */
    .category-header {
        padding: 0 !important;
    }
    
    /* B2B category page min height */
    .b2b-category-page {
        min-height: 20vh;
    }
    
    /* Contact form section padding */
    .b2b-contact-form-section {
        padding: 40px 0;
    }
    
    /* Related products title font size */
    .related-products h2 {
        font-size: 20px;
    }
    
    /* Product detail tabs - horizontal display on mobile */
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tab {
        flex: 0 0 auto;
        text-align: center;
        min-width: 100px;
        white-space: nowrap;
        padding: 10px 15px;
    }
}

@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    .product-item {
        margin-bottom: 20px;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
    
    .breadcrumb-item + .breadcrumb-item {
        padding-left: 0.3rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        padding-right: 0.3rem;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .tags-cloud {
        gap: 5px;
    }
    
    .tag-link {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .product-overlay,
    .product-actions,
    .social-share,
    .products-controls,
    .load-more-wrapper,
    .products-pagination {
        display: none !important;
    }
    
    .product-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn {
        display: none;
    }
    
    .modal {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn:focus,
.form-control:focus {
    outline: 2px solid var(--b2b-primary-color, #8BC34A);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--b2b-primary-color, #8BC34A);
    color: var(--b2b-background-color, white);
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--b2b-primary-color, #8BC34A);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Icons (using simple CSS shapes as fallback)
   ========================================================================== */

.icon-search::before {
    content: "🔍";
}

.icon-grid::before {
    content: "⊞";
}

.icon-list::before {
    content: "☰";
}

.icon-eye::before {
    content: "👁";
}

.icon-mail::before {
    content: "✉";
}

.icon-search-empty::before {
    content: "🔍";
    font-size: 48px;
    opacity: 0.3;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}