﻿/* ====================================
   GlobalSources B2B Marketplace Theme
   ==================================== */

:root {
    /* Neutrals */
    --gs-white: #ffffff;
    --gs-gray-50: #fafafa;
    --gs-gray-100: #f5f5f5;
    --gs-gray-200: #eeeeee;
    --gs-gray-300: #e0e0e0;
    --gs-gray-400: #bdbdbd;
    --gs-gray-500: #9e9e9e;
    --gs-gray-600: #757575;
    --gs-gray-700: #616161;
    --gs-gray-800: #424242;
    --gs-gray-900: #212121;
    /* Persian Green Tones */
    --persian-green-50: #f4faf8;
    --persian-green-100: #e6f4f0;
    --persian-green-200: #c8e6db;
    --persian-green-300: #9bd3bf;
    --persian-green-400: #5eb89e;
    --persian-green-500: #00a693;
    --persian-green-600: #008a7a;
    --persian-green-700: #006d62;
    --persian-green-800: #00574f;
    --persian-green-900: #003d36;
    /* GlobalSources Colors */
    --gs-primary: var(--persian-green-600);
    --gs-primary-hover: var(--persian-green-700);
    --gs-purple: #7b2cbf;
    --gs-blue: #0066cc;
    --gs-orange: #ff6600;
    --gs-green: #28a745;
    --gs-gold: #ffa000;
    /* Backgrounds */
    --bg-body: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f5f5f5;
    /* Text */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    /* Borders */
    --border-color: var(--gs-gray-400);
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.bg-primary {
    background-color: var(--persian-green-600) !important;
}
.bg-brown {
    background-color: #934f22 !important;
}

[data-bs-theme="dark"] {
    --bg-body: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-hover: #404040;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #404040;
}

/* Global */
body {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

/* Prevent iOS Safari auto-zoom on form inputs */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* RTL Layout Fixes */
[dir="rtl"] {
 text-align: right;
}

[dir="rtl"] body,
[dir="rtl"] html {
 margin: 0 !important;
 padding: 0 !important;
 overflow-x: hidden !important;
 max-width: 100vw !important;
}

/* Prevent overflow on all containers in RTL */
[dir="rtl"] .container,
[dir="rtl"] .container-fluid,
[dir="rtl"] .gs-container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

[dir="rtl"] .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* RTL Form Check (Checkbox/Radio) Fixes */
[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
    text-align: right;
}

[dir="rtl"] .form-check-input {
    float: right;
    margin-left: 0.5em;
    margin-right: -1.5em;
}

[dir="rtl"] .form-check-label {
    display: inline-block;
    padding-right: 0.5em;
}

/* RTL Form Check Inline */
[dir="rtl"] .form-check-inline {
    margin-right: 0;
    margin-left: 1rem;
    padding-left: 0;
    padding-right: 0;
}

[dir="rtl"] .form-check-inline .form-check-input {
    margin-right: 0;
    margin-left: 0.3125rem;
}

/* ====================================
   Breadcrumb Styles (Global Site + Identity Views)
   ==================================== */

.breadcrumb {
    background-color: transparent;
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    list-style: none;
    margin-bottom: 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-right: 0.5rem;
    color: var(--text-muted);
    content: var(--bs-breadcrumb-divider, "/");
}

/* RTL breadcrumb fixes - proper direction and spacing */
[dir="rtl"] .breadcrumb {
    direction: rtl;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
    padding-right: 0.5rem;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* Breadcrumb link styling */
.breadcrumb-item a {
    color: var(--gs-blue);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.breadcrumb-item a:hover {
    color: var(--gs-primary);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* ====================================
   End Breadcrumb Styles
   ==================================== */

/* Global icon alignment fix */
i.fas, i.far, i.fab, i.fal, i.fad,
svg.svg-inline--fa {
    vertical-align: middle;
}

/* Ensure proper baseline alignment for icons inside flex containers */
.d-flex i,
.d-inline-flex i,
.flex-row i,
.flex-column i {
 line-height: 1;
}

/* Global text alignment fix for flex containers */
.d-flex,
.d-inline-flex,
button,
.btn,
a[class*="btn"] {
    align-items: center;
}

/* Ensure all child elements in flex containers align properly */
.d-flex > *,
.d-inline-flex > *,
.btn > *,
button > * {
    display: inline-flex;
    align-items: center;
}

[dir="rtl"] body {
    font-family: 'IRANSansX', Arial, sans-serif;
}

main {
    background-color: var(--bg-body);
    min-height: calc(100vh - 200px);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar {
 padding: 0.75rem 1rem;
    background: var(--bg-card) !important;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary) !important;
}

/* Navbar Toggler Button - Fixed visibility in dark/light mode */
.navbar-toggler {
    border: 1px solid var(--border-color);
    background-color: transparent;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.navbar-toggler:hover {
  background-color: var(--bg-hover);
    border-color: var(--gs-primary);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(228, 0, 43, 0.25);
    border-color: var(--gs-primary);
outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28128, 128, 128, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
 display: inline-block;
    width: 1.25em;
    height: 1.25em;
 vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

[data-bs-theme="dark"] .navbar-toggler {
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .navbar-toggler:hover {
    background-color: var(--bg-hover);
    border-color: var(--gs-primary);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    color: var(--text-primary) !important;
    font-size: 14px;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--bg-hover);
    color: var(--gs-primary) !important;
}

/* Hero Banner */
.gs-hero-banner {
    background: linear-gradient(135deg, #9d4EDD 0%, #7b2cbf 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

[data-bs-theme="dark"] .gs-hero-banner {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

.gs-hero-overlay {
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.gs-live-badge {
    display: inline-flex;
    align-items: center;
    background: #ff006e;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1;
}

.gs-live-badge i {
    vertical-align: middle;
    line-height: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.gs-hero-overlay h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.gs-hero-overlay p {
    font-size: 16px;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.gs-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Search Section */
.gs-search-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.gs-search-container {
    max-width: 900px;
    margin: 0 auto;
}

.gs-search-group {
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.gs-search-group:focus-within {
    border-color: var(--gs-primary);
    box-shadow: 0 4px 16px rgba(228, 0, 43, 0.15);
}

.gs-search-input {
    border: none !important;
    padding: 0.875rem 1.25rem;
    font-size: 15px;
    border-radius: 0 !important;
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.gs-search-input:focus {
    box-shadow: none !important;
  outline: none !important;
}

.gs-search-input::placeholder {
    color: var(--text-muted);
}

.gs-search-btn {
    background-color: var(--gs-primary);
    border-color: var(--gs-primary);
    color: white !important;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    border-radius: 0 8px 8px 0 !important;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gs-search-btn:hover {
    background-color: var(--gs-primary-hover);
    border-color: var(--gs-primary-hover);
    transform: scale(1.02);
}

.gs-search-btn i,
.gs-search-btn span {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    vertical-align: middle;
    color: white !important;
}

.gs-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  margin-top: 1rem;
}

.gs-quick-link {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.gs-quick-link:hover {
    color: var(--gs-primary);
    background-color: rgba(228, 0, 43, 0.05);
}

/* Page Layout */
.gs-page-layout {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.gs-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.gs-sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.gs-sidebar-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gs-primary);
    color: var(--text-primary);
}

.gs-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gs-category-list li {
    margin-bottom: 0.5rem;
}

.gs-category-list a {
    color: var(--text-primary);
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1.2;
}

.gs-category-list a i {
    display: inline-flex;
  align-items: center;
    vertical-align: middle;
    line-height: 1.2;
}

.gs-category-list a span {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1.2;
}
.gs-category-list a:hover {
    background: var(--bg-hover);
    color: var(--gs-primary);
}

.gs-sidebar-promo {
    background: linear-gradient(135deg, #9d4EDD 0%, #7b2cbf 100%);
    padding: 1.25rem;
    border-radius: 8px;
    color: white;
    text-align: center;
}

[data-bs-theme="dark"] .gs-sidebar-promo {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

.gs-promo-badge {
    background: #ff006e;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.gs-sidebar-promo h4 {
    font-size: 16px;
    margin-bottom: 0.5rem;
}

.gs-sidebar-promo p {
    font-size: 12px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Right Sidebar - Most Popular */
.gs-right-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.gs-popular-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    /* Removed sticky positioning - sidebar now scrolls with page */
}

.gs-popular-list {
 list-style: none;
    padding: 0;
    margin: 0;
}

.gs-popular-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
    cursor: pointer;
}

.gs-popular-item:last-child {
    border-bottom: none;
}

.gs-popular-item:hover {
    background: var(--bg-hover);
}

.gs-popular-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: var(--gs-gray-100);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
 justify-content: center;
}

[data-bs-theme="dark"] .gs-popular-thumb {
    background: var(--gs-gray-800);
}

.gs-popular-thumb img {
    width: 100%;
 height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.gs-popular-thumb i {
    font-size: 24px;
    color: var(--gs-gray-400);
}

.gs-popular-info {
    flex: 1;
    min-width: 0;
}

.gs-popular-title {
 font-size: 13px;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.25rem;
 display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gs-popular-price {
    color: var(--gs-primary);
    font-weight: bold;
    font-size: 14px;
}

.gs-popular-range {
  color: var(--text-muted);
    font-size: 11px;
}

/* Main Content */
.gs-main-content {
    flex: 1;
    min-width: 0;
}

.gs-section {
    background: var(--bg-card);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.gs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.gs-section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.gs-see-all {
    color: var(--gs-blue);
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    line-height: 1;
}

.gs-see-all i,
.gs-see-all svg {
    vertical-align: middle;
    line-height: 1;
}

.gs-see-all:hover {
    color: var(--gs-primary);
    gap: 0.75rem;
}

.gs-see-all::after {
    content: '→';
    font-size: 16px;
    transition: transform 0.2s;
}

.gs-see-all:hover::after {
  transform: translateX(3px);
}

/* Category Grid */
.gs-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.gs-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.gs-category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gs-purple);
}

.gs-category-icon {
    width: 60px;
    height: 60px;
    background: var(--gs-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 28px;
    color: var(--gs-purple);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .gs-category-icon {
    background: var(--gs-gray-800);
}

[data-bs-theme="dark"] .gs-category-card:hover .gs-category-icon {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

.gs-category-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.gs-category-card p {
    font-size: 12px;
    margin: 0;
}

/* Promo Banners */
.gs-promo-banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.gs-promo-card {
    padding: 1.5rem;
    border-radius: 8px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.gs-promo-purple {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
}

.gs-promo-blue {
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
}

[data-bs-theme="dark"] .gs-promo-purple {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

[data-bs-theme="dark"] .gs-promo-blue {
    background: linear-gradient(135deg, #004c99 0%, #003366 100%);
}

.gs-promo-label {
    background: #ff006e;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.gs-promo-card h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.gs-promo-card p {
    font-size: 13px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Product Grid */
.gs-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.gs-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gs-product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.gs-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gs-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

.gs-badge-new {
    background: #ff6600;
}

.gs-product-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gs-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

[data-bs-theme="dark"] .gs-product-image {
    background: var(--gs-gray-800);
}

.gs-product-image i {
    font-size: 48px;
    color: var(--gs-gray-400);
}

.gs-product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gs-product-title {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.gs-product-price {
    color: var(--gs-primary);
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 0.25rem;
}

.gs-product-moq {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 0.5rem;
}

.gs-product-supplier {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: auto;
    display: flex;
    align-items: center;
    line-height: 1;
}

.gs-product-supplier i {
    vertical-align: middle;
    line-height: 1;
}

/* Supplier Grid */
.gs-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.gs-supplier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.gs-supplier-card:hover {
    box-shadow: var(--shadow-md);
}

.gs-supplier-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gs-supplier-logo {
    width: 60px;
    height: 60px;
    background: var(--gs-gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .gs-supplier-logo {
    background: var(--gs-gray-800);
}

.gs-supplier-logo i {
    font-size: 28px;
    color: var(--gs-purple);
}

.gs-supplier-info h4 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.gs-supplier-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.gs-verified-badge {
    display: inline-flex;
    align-items: center;
    background: #28a745;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.gs-verified-badge i {
    vertical-align: middle;
    line-height: 1;
}

.gs-supplier-stats {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    font-size: 12px;
    text-align: center;
}

.gs-supplier-stats strong {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
}

.gs-supplier-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gs-supplier-thumb {
    aspect-ratio: 1;
    background: var(--gs-gray-100);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .gs-supplier-thumb {
    background: var(--gs-gray-800);
}

.gs-supplier-thumb i {
    font-size: 20px;
    color: var(--gs-gray-500);
}

/* Features Section */
.gs-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gs-feature-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.gs-feature-card:hover {
    box-shadow: var(--shadow-md);
}

.gs-feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 28px;
    color: var(--gs-purple);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .gs-feature-icon {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

.gs-feature-icon i {
    font-size: 36px;
    color: white;
}

.gs-feature-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.gs-feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Buttons */
.btn {
    padding: 0.5rem 0.5rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    vertical-align: middle;
}

/* Fix icon and text vertical alignment in buttons and links */
.btn i,
.btn svg,
.btn span {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    vertical-align: middle;
}

a i,
a svg,
.nav-link i,
.nav-link svg,
.dropdown-item i,
.dropdown-item svg {
    vertical-align: middle;
    line-height: 1;
}

/* Ensure icons don't affect text baseline */
.btn > i:first-child,
.btn > svg:first-child,
a > i:first-child,
a > svg:first-child {
    margin-top: 0;
    margin-bottom: 0;
}

.btn-primary {
    background-color: var(--gs-primary);
    color: white !important;
    border-color: var(--gs-primary);
}

.btn-primary:hover {
    background-color: var(--gs-primary-hover);
    border-color: var(--gs-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--gs-purple);
    border-color: white;
    transform: translateY(-1px);
}

.btn-light {
    background-color: white;
    color: var(--gs-purple);
    border-color: white;
}

.btn-light:hover {
    background-color: var(--gs-gray-100);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
 padding: 0.75rem 2rem;
    font-size: 16px;
border-radius: 8px;
}

.btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 13px;
}

/* Hero CTA Buttons */
.gs-hero-cta .btn {
    min-width: 180px;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Promo Card Buttons */
.gs-promo-card .btn {
    background-color: white;
    color: var(--gs-purple);
    border: none;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
}

.gs-promo-card .btn:hover {
    background-color: var(--gs-gray-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* See All Links */
.gs-see-all {
    color: var(--gs-blue);
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.gs-see-all:hover {
    color: var(--gs-primary);
    gap: 0.75rem;
}

.gs-see-all::after {
    content: '→';
    font-size: 16px;
    transition: transform 0.2s;
}

.gs-see-all:hover::after {
  transform: translateX(3px);
}

/* Search Button */
.gs-search-btn {
    background-color: var(--gs-primary);
    border-color: var(--gs-primary);
    color: white !important;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    border-radius: 0 8px 8px 0 !important;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gs-search-btn:hover {
    background-color: var(--gs-primary-hover);
    border-color: var(--gs-primary-hover);
    transform: scale(1.02);
}

.gs-search-btn i,
.gs-search-btn span {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    vertical-align: middle;
    color: white !important;
}

/* Product Card Buttons */
.gs-product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.gs-btn-inquire {
    flex: 1;
    background-color: var(--gs-primary);
    color: white !important;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.gs-btn-inquire:hover {
    background-color: var(--gs-primary-hover);
    transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.gs-btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
  background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.gs-btn-icon:hover {
    border-color: var(--gs-primary);
    color: var(--gs-primary);
    background: rgba(228, 0, 43, 0.05);
}

.gs-btn-contact {
  flex: 1;
    background: var(--gs-primary);
    color: white;
  border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
  transition: all 0.2s;
}

.gs-btn-contact:hover {
    background: var(--gs-primary-hover);
}

/* Category Card Hover */
.gs-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.gs-category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--gs-purple);
}

.gs-category-card:hover .gs-category-icon {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    color: white;
    transform: scale(1.1);
}

.gs-category-icon {
    width: 60px;
    height: 60px;
    background: var(--gs-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 28px;
    color: var(--gs-purple);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .gs-category-icon {
    background: var(--gs-gray-800);
}

.gs-product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

/* Footer */
footer {
    background: var(--bg-card);
  color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1rem;
    margin-top: 2rem;
    font-size: 13px;
}

footer a {
    color: var(--gs-blue);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
  color: var(--gs-primary);
}

/* Footer Styles */
.gs-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.gs-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gs-footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
 margin-bottom: 2rem;
}

.gs-footer-column {
    text-align: start;
}

[dir="rtl"] .gs-footer-column {
    text-align: start;
}

.gs-footer-column h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gs-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gs-footer-links li {
    margin-bottom: 0.5rem;
}

.gs-footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    padding: 0.25rem 0;
}

.gs-footer-links a:hover {
    color: var(--gs-primary);
    padding-inline-start: 0.25rem;
}

.gs-footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

[dir="rtl"] .gs-footer-bottom {
    flex-direction: row-reverse;
}

.gs-footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

/* Ensure proper text direction */
.gs-footer-column h4,
.gs-footer-links a,
.gs-footer-copyright {
    direction: inherit;
}

/* RTL Support */
[dir="rtl"] .file-item {
    text-align: right;
}

[dir="rtl"] .uploader-actions {
    justify-content: flex-start;
}

/* Footer RTL Support */
[dir="rtl"] .gs-footer-column {
    text-align: right;
}

[dir="rtl"] .gs-footer-links a {
    text-align: right;
}

[dir="rtl"] .gs-footer-links a:hover {
    padding-inline-start: 0.25rem;
    padding-inline-end: 0;
}

[dir="rtl"] .gs-footer-copyright {
    text-align: right;
}

/* Cards - Enhanced Dark Mode Support */
[data-bs-theme="dark"] .card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--bg-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .card-body {
  background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .card-footer {
 background-color: var(--bg-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .card-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .card-text {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* Form controls dark mode */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea.form-control {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea.form-control:focus {
    background-color: var(--bg-card) !important;
    border-color: var(--gs-primary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-label {
    color: var(--text-primary) !important;
}

/* Global dropdown theming (root site) */
.dropdown-menu {
 background-color: var(--bg-card) !important;
 border-color: var(--border-color) !important;
 color: var(--text-primary) !important;
 box-shadow: var(--shadow-sm) !important;
}

/* RTL Dropdown Alignment - Exclude flyout menus */
[dir="rtl"] .dropdown-menu:not(.flyout-menu):not([class*="flyout"]) {
    text-align: right !important;
}

/* RTL Dropdown positioning - Only for header dropdowns, not flyout */
[dir="rtl"] .gs-header-actions .dropdown-menu,
[dir="rtl"] .gs-utility-actions .dropdown-menu,
[dir="rtl"] .gs-account .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.dropdown-item {
 color: var(--text-primary) !important;
 font-size: 9pt;
}

/* RTL Dropdown Item Alignment - Exclude flyout menus */
[dir="rtl"] .dropdown-menu:not(.flyout-menu):not([class*="flyout"]) .dropdown-item {
    text-align: right !important;
}

[dir="rtl"] .dropdown-menu:not(.flyout-menu):not([class*="flyout"]) .dropdown-item i {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
 background-color: var(--bg-hover) !important;
 color: var(--text-primary) !important;
}

.dropdown-item.active,
.dropdown-item:active {
 background-color: var(--gs-blue) !important;
 color: #fff !important;
}

.dropdown-divider {
 border-top-color: var(--border-color) !important;
}

.dropdown-header {
 color: var(--text-muted) !important;
}

/* RTL Dropdown Header Alignment - Exclude flyout menus */
[dir="rtl"] .dropdown-menu:not(.flyout-menu):not([class*="flyout"]) .dropdown-header {
    text-align: right !important;
}

/* Responsive adjustments - corrected and refined */
@media (max-width:1199.98px) {
 .gs-page-layout { padding: 1rem; gap: 1rem; }
 .gs-right-sidebar { width: 260px; }
 .gs-sidebar { width: 200px; }
 .gs-hero-overlay { padding: 2.25rem 1.5rem; }
 .gs-hero-overlay h1 { font-size: 28px; }
 .gs-promo-banners { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
 
 /* RTL Container fixes */
 [dir="rtl"] body,
 [dir="rtl"] html {
 overflow-x: hidden !important;
        max-width: 100vw !important;
 }
}

@media (max-width:991.98px) {
 /* Stack columns */
 .gs-page-layout { flex-direction: column; max-width: 100%; }
 .gs-sidebar, .gs-right-sidebar { width: 100%; }
 .gs-sidebar, .gs-main-content, .gs-right-sidebar { margin-inline: 0; }

 /* Grids tighten */
 .gs-category-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); }
 .gs-product-grid { grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); }
 .gs-supplier-grid { grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); }
 .gs-promo-banners { grid-template-columns: repeat(2,1fr); }

 /* Navbar container width */
 .navbar .container-fluid { max-width: 100% !important; padding-inline: 1rem; }

 /* Search controls - maintain consistent sizing with other elements */
 .gs-search-input { padding: 0.75rem 1rem; font-size: 14px; }
 .gs-search-btn { padding: 0.75rem 1.5rem; font-size: 14px; }
 
 /* RTL Container fixes */
 [dir="rtl"] body,
 [dir="rtl"] html {
 overflow-x: hidden !important;
 max-width: 100vw !important;
 }
 
 [dir="rtl"] .container,
 [dir="rtl"] .container-fluid,
 [dir="rtl"] .gs-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
  margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
 }
 
 [dir="rtl"] .navbar .container-fluid {
 padding-left: 1rem !important;
 padding-right: 1rem !important;
 }
}

@media (max-width:767.98px) {
 .gs-hero-overlay { padding: 1.75rem 1rem; }
 .gs-hero-overlay h1 { font-size: 24px; }
 .gs-hero-overlay p { font-size: 14px; }
 .gs-hero-cta .btn { min-width: 140px; }

 .gs-promo-banners { grid-template-columns: 1fr; }
 .gs-category-grid { grid-template-columns: repeat(2,1fr); }
 .gs-product-grid { grid-template-columns: repeat(2,1fr); }
 .gs-supplier-grid { grid-template-columns: 1fr; }

 .gs-footer-columns { grid-template-columns: repeat(2,1fr); }
 .gs-footer-bottom { flex-direction: column; align-items: flex-start; }

 /* Search controls - consistent with button sizing on this breakpoint */
 .gs-search-input { padding: 0.625rem 0.875rem; font-size: 13px; }
 .gs-search-btn { padding: 0.625rem 1.25rem; font-size: 13px; }
 
 /* RTL Container fixes */
 [dir="rtl"] body,
 [dir="rtl"] html {
 overflow-x: hidden !important;
 width: 100% !important;
 max-width: 100vw !important;
 }
 
 [dir="rtl"] .container,
 [dir="rtl"] .container-fluid,
 [dir="rtl"] .gs-container {
 padding-left: 0.75rem !important;
 padding-right: 0.75rem !important;
 margin-left: auto !important;
 margin-right: auto !important;
 max-width: 100% !important;
 overflow-x: hidden !important;
 }
 
 [dir="rtl"] .row {
 margin-left: 0 !important;
 margin-right: 0 !important;
 width: 100% !important;
 max-width: 100% !important;
 }
 
 [dir="rtl"] [class*="col-"] {
 padding-left: 0.5rem !important;
 padding-right: 0.5rem !important;
 }
 
 /* Ensure no horizontal scroll on main containers */
 [dir="rtl"] main,
 [dir="rtl"] header,
 [dir="rtl"] footer {
 max-width: 100vw !important;
 overflow-x: hidden !important;
 }
}

@media (max-width:575.98px) {
 .gs-page-layout { padding: 0.75rem; }
 .gs-hero-cta .btn { width: 100%; min-width: 0; }
 .gs-category-grid { grid-template-columns: 1fr; }
 .gs-product-grid { grid-template-columns: 1fr; }
 .navbar-brand { font-size: 20px; }
 .nav-link { padding: 0.5rem 0.75rem; }
 
 /* Search controls - maintain minimum readable size */
 .gs-search-group { border-width: 1px; }
 .gs-search-input { padding: 0.5rem 0.75rem; font-size: 13px; }
 .gs-search-btn { padding: 0.5rem 1rem; font-size: 13px; }
 .gs-search-btn i { font-size: 12px; }
 
 /* RTL Container fixes for small mobile */
 [dir="rtl"] body,
 [dir="rtl"] html {
 overflow-x: hidden !important;
 max-width: 100vw !important;
 }
 
 [dir="rtl"] .container,
 [dir="rtl"] .container-fluid,
 [dir="rtl"] .gs-container {
 padding-left: 0.75rem !important;
 padding-right: 0.75rem !important;
 max-width: 100% !important;
 }
 
 /* Ensure no element creates horizontal scroll */
 [dir="rtl"] * {
 max-width: 100%;
 }
 
 [dir="rtl"] .gs-page-layout,
 [dir="rtl"] .gs-section {
 width: 100% !important;
 max-width: 100% !important;
 overflow-x: hidden !important;
 }
}

/* Logical padding utility for custom containers without touching Bootstrap grid */
.gs-container-padding { padding-inline: 1rem; }
@media (max-width:575.98px){ .gs-container-padding { padding-inline: 0.75rem; } }

/* ====================================
   End GlobalSources B2B Marketplace Theme
   ==================================== */
