/* ==========================================================================
   Rec Industrial Components - Main Stylesheet
   Color Palette (from logo):
   - Primary Dark: #1a1a2e (navy/dark background)
   - Primary Orange: #f5a623 (orange diamond fill)
   - Accent Red: #e60000 (bright red border/accents)
   - Brand Green: #006400 (dark green REC text)
   - Light Peach: #fcc978 (light orange fill)
   - White: #ffffff
   - Light Gray: #f8f9fa
   ========================================================================== */

:root {
    --primary-dark: #1a1a2e;
    --primary-orange: #f5a623;
    --accent-red: #e60000;
    --brand-green: #006400;
    --light-peach: #fcc978;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-dark: #2d2d2d;
    --text-muted: #6c757d;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-gray);
}

a {
    text-decoration: none;
    color: var(--brand-green);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-red);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--light-peach);
}

.top-bar a:hover {
    color: var(--primary-orange);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-right a {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-green);
    line-height: 1.2;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.search-bar form {
    display: flex;
    border: 2px solid var(--medium-gray);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.search-bar form:focus-within {
    border-color: var(--primary-orange);
}

.search-bar input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary-orange);
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--accent-red);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.header-actions a:hover {
    color: var(--primary-orange);
}

.cart-badge {
    background: var(--accent-red);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-nav {
    background: var(--brand-green);
}

.main-nav .container {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    width: 100%;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 14px 18px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: rgba(255,255,255,0.15);
    color: var(--light-peach);
}

/* Dropdown */
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-hover);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 100;
}

@media (min-width: 769px) {
    .main-nav li:hover .dropdown-menu {
        display: block;
    }
}

.main-nav .dropdown-menu a {
    color: var(--text-dark);
    padding: 10px 18px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--medium-gray);
}

.main-nav .dropdown-menu a:hover {
    background: var(--light-peach);
    color: var(--brand-green);
}

/* ==========================================================================
   HERO / SLIDER SECTION
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #16213e 100%);
    padding: 60px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245,166,35,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-text h1 span {
    color: var(--primary-orange);
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.hero-image {
    flex: 0 0 400px;
    text-align: center;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245,166,35,0.3);
}

.btn-secondary {
    background: var(--brand-green);
    color: var(--white);
}

.btn-secondary:hover {
    background: #155a2b;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
}

.btn-outline:hover {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-orange);
    margin-top: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.category-card i {
    font-size: 2rem;
    color: var(--brand-green);
    margin-bottom: 10px;
    display: block;
}

.category-card h4 {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ==========================================================================
   ADVANTAGES SECTION
   ========================================================================== */
.advantages-section {
    background: linear-gradient(135deg, var(--brand-green), #155a2b);
    color: var(--white);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 20px;
}

.advantage-item .icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
}

.advantage-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.advantage-item p {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ==========================================================================
   PRODUCT CARDS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.product-card-image {
    height: 150px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.product-card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    min-height: 32px;
    align-items: center;
}
    gap: 5px;
}

.badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-stock {
    background: #d4edda;
    color: #155724;
}

.badge-rohs {
    background: #cce5ff;
    color: #004085;
}

.badge-aec {
    background: #fff3cd;
    color: #856404;
}

.product-card-body {
    padding: 15px;
}

.product-card-body h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.product-card-body .sku {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.product-card-body .manufacturer {
    font-size: 0.8rem;
    color: var(--brand-green);
    font-weight: 500;
    margin-bottom: 12px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
}

.product-card-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* ==========================================================================
   MANUFACTURERS SECTION
   ========================================================================== */
.manufacturers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.manufacturer-card {
    background: var(--white);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
    overflow: hidden;
    padding: 0;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.manufacturer-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-orange);
}

.manufacturer-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.manufacturer-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 5px;
    margin: 0;
}

/* ==========================================================================
   FAQ & NOTICES SIDEBAR
   ========================================================================== */
.home-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-card-header {
    background: var(--brand-green);
    color: var(--white);
    padding: 12px 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-card-header a {
    color: var(--light-peach);
    font-size: 0.8rem;
}

.sidebar-card-body {
    padding: 15px;
}

.sidebar-card-body ul {
    list-style: none;
}

.sidebar-card-body ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 0.9rem;
}

.sidebar-card-body ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h3 {
    color: var(--primary-orange);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer ul li a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-contact p {
    font-size: 0.88rem;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-contact i {
    color: var(--primary-orange);
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--brand-green);
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.auth-card .btn {
    width: 100%;
    margin-top: 10px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash-message {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==========================================================================
   PRODUCT FILTERS
   ========================================================================== */
.filters-bar {
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 50px;
    background: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 50px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* ==========================================================================
   INQUIRY CART
   ========================================================================== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-table th {
    background: var(--brand-green);
    color: var(--white);
    padding: 14px 18px;
    text-align: left;
    font-size: 0.9rem;
}

.cart-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 0.9rem;
}

.cart-table tr:hover td {
    background: var(--light-gray);
}

.quantity-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    text-align: center;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .active {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
}

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */
.page-header {
    background: linear-gradient(135deg, var(--brand-green), #155a2b);
    color: var(--white);
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.page-header .breadcrumb {
    font-size: 0.9rem;
    opacity: 0.8;
}

.page-header .breadcrumb a {
    color: var(--light-peach);
}

/* ==========================================================================
   PRODUCT DETAIL
   ========================================================================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-detail-image {
    background: var(--light-gray);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 250px;
}

.product-detail-info h1 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.product-detail-info .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.product-detail-info .description {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.8;
}

/* ==========================================================================
   BOM PAGE
   ========================================================================== */
.bom-upload-area {
    background: var(--white);
    border: 2px dashed var(--medium-gray);
    border-radius: var(--radius);
    padding: 50px;
    text-align: center;
    transition: var(--transition);
}

.bom-upload-area:hover {
    border-color: var(--primary-orange);
}

.bom-upload-area i {
    font-size: 3rem;
    color: var(--primary-orange);
    margin-bottom: 15px;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light-gray);
}

.faq-answer {
    padding: 0 20px 18px;
    color: var(--text-muted);
    display: none;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--brand-green);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-image { display: none; }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .home-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
    }
    .main-nav ul.show { display: flex; }
    .main-nav .dropdown-menu {
        position: static;
        box-shadow: none;
    }
    .search-bar { display: none; }
    .header .container {
        flex-wrap: nowrap;
        padding: 12px 15px;
    }
    .logo img { height: 45px; }
    .logo-text { font-size: 1rem; }
    .logo-text span { font-size: 0.7rem; }
    .header-actions { gap: 12px; }
    .header-actions a { font-size: 1.1rem; }
    .header-actions a span:not(.cart-badge) { display: none; }
    .header-actions .cart-badge {
        position: relative;
        top: -2px;
    }
    .fav-link-desktop { font-size: 1.2rem; margin-right: 0; }
    .mobile-toggle { font-size: 1.3rem; }
    .top-bar .container {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        font-size: 0.75rem;
    }
    .top-bar-right { display: none; }
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-card { padding: 15px 8px; overflow: hidden; }
    .category-card p { font-size: 0.72rem; word-break: break-word; }
    .advantages-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .hero-text h1 { font-size: 1.8rem; }

    /* Mobile Nav Overlay */
    .main-nav ul.show {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--brand-green);
        z-index: 9999;
        padding: 60px 20px 20px;
        overflow-y: auto;
    }
    .main-nav ul.show li a {
        padding: 16px 20px;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }
    .main-nav ul.show .dropdown-menu {
        background: rgba(0,0,0,0.15);
        border-radius: 6px;
        margin: 5px 0;
        display: none;
    }
    .main-nav ul.show .dropdown-menu.open {
        display: block;
    }
    .main-nav ul.show .dropdown-menu a {
        color: rgba(255,255,255,0.85);
        font-size: 0.9rem;
        padding: 12px 30px;
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .auth-card { padding: 25px; }
    .section { padding: 40px 0; }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.d-flex { display: flex; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-full { width: 100%; }

/* ==========================================================================
   PRODUCT DETAIL - ENHANCED LAYOUT
   ========================================================================== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.product-detail-left {
    align-self: start;
}

.product-detail-right {
    min-width: 0;
}

.product-detail-title {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medium-gray);
}

.product-attributes {
    margin-bottom: 15px;
}

.product-attributes h3 {
    font-size: 0.95rem;
    color: var(--brand-green);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--medium-gray);
}

.attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.attributes-table tr {
    border-bottom: 1px solid var(--light-gray);
}

.attributes-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.attributes-table td:first-child {
    width: 130px;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--light-gray);
}

.attributes-table td:last-child {
    font-weight: 500;
}

.stock-price-box {
    background: var(--light-gray);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 15px;
    border-left: 4px solid var(--brand-green);
}

.stock-price-box h3 {
    font-size: 0.9rem;
    color: var(--brand-green);
    margin-bottom: 8px;
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-actions .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
}

/* ==========================================================================
   TABS
   ========================================================================== */
.product-tabs {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: var(--light-gray);
    border-bottom: 2px solid var(--medium-gray);
}

.tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--brand-green);
    background: rgba(29,107,53,0.05);
}

.tab-btn.active {
    color: var(--brand-green);
    border-bottom-color: var(--brand-green);
    background: var(--white);
}

.tab-content {
    display: none;
    padding: 25px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Datasheet items */
.datasheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--light-gray);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.datasheet-item span {
    flex: 1;
    font-size: 0.9rem;
}

.login-required-badge {
    color: var(--accent-red);
    font-size: 0.85rem;
    font-weight: 500;
}

.login-required-badge a {
    color: var(--accent-red);
    text-decoration: underline;
}

.specifications-content {
    line-height: 2;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Product list table for category pages */
.product-list-table {
    overflow-x: auto;
}

.product-list-table code {
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Responsive for product detail */
@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    .product-detail-left {
        position: static;
    }
    .tab-header {
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 10px;
        font-size: 0.8rem;
    }
    .product-actions {
        flex-direction: column;
    }
    .product-actions .btn {
        width: 100%;
    }
    .attributes-table td:first-child {
        width: 110px;
    }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   RoHS ICON IMAGE
   ========================================================================== */
.rohs-icon {
    height: 28px;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
}

.badge-rohs {
    background: transparent;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
}

.product-detail-right .rohs-icon {
    height: 32px;
}

.attributes-table .rohs-icon {
    height: 30px;
    margin-right: 5px;
}

/* ==========================================================================
   CATEGORY PAGE - ENHANCED LAYOUT (matching reference)
   ========================================================================== */
.category-filter-bar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--medium-gray);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--light-gray);
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    user-select: none;
    border: 1px solid var(--medium-gray);
}

.filter-checkbox:hover {
    border-color: var(--brand-green);
    background: var(--white);
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand-green);
}

.filter-dropdown {
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid var(--medium-gray);
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding-right: 30px;
}

.filter-dropdown:focus {
    border-color: var(--brand-green);
    outline: none;
}

.filter-dropdown-brand {
    background-color: var(--white);
}

.filter-search {
    display: flex;
    margin-left: auto;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    overflow: hidden;
}

.filter-search input {
    padding: 8px 14px;
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 180px;
}

.filter-search button {
    padding: 8px 14px;
    background: var(--brand-green);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-search button:hover {
    background: #155a2b;
}

/* Category Product Table */
.category-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-product-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    min-width: 800px;
}

.category-product-table thead {
    background: var(--brand-green);
}

.category-product-table thead th {
    padding: 14px 16px;
    text-align: left;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.category-product-table tbody tr {
    border-bottom: 1px solid var(--medium-gray);
    transition: var(--transition);
}

.category-product-table tbody tr:hover {
    background: #f0fdf4;
}

.category-product-table td {
    padding: 16px;
    vertical-align: middle;
    font-size: 0.88rem;
}

/* Table cells */
.td-image {
    width: 80px;
}

.td-image img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    padding: 4px;
    background: var(--light-gray);
}

.td-part .part-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.td-part .part-link:hover {
    color: var(--brand-green);
}

.td-manufacturer {
    color: var(--text-muted);
    font-weight: 500;
}

.td-rohs {
    text-align: center;
}

.td-rohs .rohs-icon {
    height: 32px;
    display: block;
    margin: 0 auto 6px;
}

.datasheet-link {
    margin-top: 4px;
}

.ds-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
    background: #d4380d;
    color: var(--white);
    border-radius: 3px;
    font-weight: 500;
    transition: var(--transition);
}

.ds-btn:hover {
    background: #b82e0a;
    color: var(--white);
}

.ds-btn.ds-locked {
    background: #6c757d;
}

.ds-btn.ds-locked:hover {
    background: #555;
    color: var(--white);
}

.td-quantity .qty-text {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.85rem;
}

.td-stock .stock-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.stock-available {
    color: var(--brand-green);
}

.stock-request {
    color: var(--primary-orange);
}

.btn-inquiry {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 16px;
    background: var(--brand-green);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-inquiry:hover {
    background: #155a2b;
    transform: translateY(-1px);
}

.td-mpq {
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Responsive category table */
@media (max-width: 768px) {
    .category-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-search {
        margin-left: 0;
    }
    .filter-search input {
        width: 100%;
        flex: 1;
    }
    .category-product-table {
        min-width: 600px;
    }
    .td-image img {
        width: 50px;
        height: 50px;
    }
}

/* ==========================================================================
   SLIDE CART PANEL
   ========================================================================== */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.cart-overlay.show {
    display: block;
}

.cart-slide-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-slide-panel.show {
    right: 0;
}

.cart-slide-header {
    padding: 16px 20px;
    background: var(--brand-green);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-slide-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-slide-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 5px;
}

.cart-slide-body {
    overflow-y: auto;
    padding: 15px;
    flex: 0 1 auto;
}

.cart-slide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--medium-gray);
}

.cart-slide-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--light-gray);
}

.cart-slide-item-info {
    flex: 1;
    min-width: 0;
}

.cart-slide-item-info h4 {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.cart-slide-item-info small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.cart-slide-item .remove-btn {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}

.cart-slide-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.cart-slide-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
}

.cart-slide-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-slide-footer .btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   INQUIRY CART PAGE - MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        display: none;
    }
    .cart-table th, .cart-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .cart-table .quantity-input {
        width: 55px;
    }
}

/* RFQ form responsive */
@media (max-width: 768px) {
    .rfq-form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Cart link: show desktop, hide mobile */
.cart-link-mobile { display: none !important; }
@media (max-width: 768px) {
    .cart-link-desktop { display: none !important; }
    .cart-link-mobile {
        display: flex !important;
        align-items: center;
        color: var(--brand-green);
        font-size: 2rem;
        position: relative;
        margin-right: 25px;
    }
    .cart-link-mobile .cart-badge {
        position: absolute;
        top: -6px;
        right: -12px;
        font-size: 0.6rem;
        padding: 3px 6px;
        min-width: 18px;
        text-align: center;
        border-radius: 50%;
    }
}

/* ==========================================================================
   BRANDS PAGE (Oneyac-style alphabetical grid)
   ========================================================================== */
.brand-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 15px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    justify-content: center;
}

.brand-letter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.brand-letter-link.active {
    background: var(--brand-green);
    color: var(--white);
}

.brand-letter-link.active:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.brand-letter-link.disabled {
    color: var(--medium-gray);
    cursor: default;
}

.brand-letter-section {
    margin-bottom: 30px;
    scroll-margin-top: 80px;
}

.brand-letter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--primary-dark);
    color: var(--white);
    border-radius: 6px 6px 0 0;
}

.brand-letter-header span {
    font-size: 1.1rem;
    font-weight: 700;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.brand-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.brand-card:hover {
    border-color: var(--brand-green);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.brand-card-logo {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.brand-card-logo img {
    max-height: 32px;
    max-width: 90px;
    object-fit: contain;
}

.brand-card-initial {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-green);
    background: var(--light-gray);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-card-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-featured-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--primary-orange);
    font-size: 0.6rem;
}

@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .brand-alphabet-nav {
        gap: 3px;
        padding: 10px;
    }
    .brand-letter-link {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   PRODUCT CARD - Redesigned
   ========================================================================== */
.product-card-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--white);
    background: var(--brand-green);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.product-card-body h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-card-body h3 a {
    color: var(--text-dark);
}

.product-card-body h3 a:hover {
    color: var(--brand-green);
}

.product-card-mpn {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.product-card-mpn strong {
    color: var(--text-dark);
}

.product-card-brand {
    font-size: 0.8rem;
    color: var(--brand-green);
    font-weight: 500;
    margin-bottom: 8px;
}

.product-card-brand i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.product-card-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    min-height: 22px;
}

.cert-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cert-tag.cert-rohs {
    background: #d4edda;
    color: #155724;
}

.cert-tag.cert-aec {
    background: #d1ecf1;
    color: #0c5460;
}

.cert-tag.cert-leadfree {
    background: #fff3cd;
    color: #856404;
}

.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 0;
    border-top: 1px solid var(--medium-gray);
    font-size: 0.78rem;
}

.product-card-datasheet {
    color: var(--accent-red);
    font-weight: 600;
    font-size: 0.75rem;
}

.product-card-datasheet:hover {
    color: var(--primary-dark);
}

.product-card-datasheet i {
    margin-right: 3px;
}

.product-card-moq {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
}

.product-card-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.product-card-actions .btn-sm {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    padding: 6px 8px;
}

/* Badge updates */
.badge-leadfree {
    background: #fff3cd;
    color: #856404;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Category table certifications */
.td-certs {
    white-space: nowrap;
}

.td-certs .cert-tag {
    margin-right: 2px;
}

.td-datasheet .ds-btn {
    color: var(--accent-red);
    font-size: 1rem;
}

.td-datasheet .ds-btn:hover {
    color: var(--primary-dark);
}

.td-datasheet .ds-locked {
    color: var(--text-muted);
}

.td-action .btn-inquiry {
    font-size: 0.72rem;
    padding: 5px 10px;
}

/* Brand card description and auth badge */
.brand-card-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-auth-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--brand-green);
    background: #d4edda;
    padding: 1px 6px;
    border-radius: 3px;
    text-decoration: none;
}

.brand-auth-badge i {
    margin-right: 2px;
}

/* Brand List Grid (Oneyac-style text list) */
.brand-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px 20px;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-bottom: 20px;
}

.brand-list-item {
    display: inline-block;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--brand-green);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-list-item:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.brand-list-count {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-left: 2px;
}

/* Featured brand logo row */
.featured-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    min-width: 140px;
    height: 60px;
    transition: var(--transition);
    text-decoration: none;
    overflow: hidden;
    padding: 0;
}

.featured-brand-logo:hover {
    border-color: var(--brand-green);
    box-shadow: var(--shadow);
}

.featured-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-brand-logo span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px 20px;
}

@media (max-width: 768px) {
    .brand-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px 10px;
    }
}

/* Featured Brands Auto-Scrolling Slider (Bottom to Top with pause) */
.featured-brands-slider-vertical {
    overflow: hidden;
    position: relative;
    height: 144px;
}

.featured-brands-track-vertical {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: scrollBrandsUp 15s ease-in-out infinite;
}

.featured-brands-track-vertical:hover {
    animation-play-state: paused;
}

@keyframes scrollBrandsUp {
    0%, 40% {
        transform: translateY(0);
    }
    50%, 90% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Brand Gallery Grid */
.brand-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.brand-gallery-item {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition);
}

.brand-gallery-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.brand-gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.brand-gallery-caption {
    padding: 8px 10px;
    text-align: center;
}

.brand-gallery-caption strong {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dark);
}

.brand-gallery-caption span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .brand-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .brand-gallery-item img {
        height: 110px;
    }
}

/* ==========================================================================
   FEATURED MANUFACTURERS PAGE
   ========================================================================== */
.mfr-hero {
    background: linear-gradient(135deg, var(--brand-green) 0%, #004d00 50%, var(--primary-dark) 100%);
    padding: 50px 0;
    text-align: center;
    color: var(--white);
}

.mfr-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.mfr-search-box {
    max-width: 450px;
    margin: 0 auto;
}

.mfr-search-box form {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mfr-search-box input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    font-size: 0.9rem;
    outline: none;
}

.mfr-search-box button {
    padding: 12px 25px;
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.mfr-search-box button:hover {
    background: var(--accent-red);
}

/* Gallery Grid */
.mfr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 15px;
}

.mfr-gallery-card {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition);
}

.mfr-gallery-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.mfr-gallery-img {
    height: 160px;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.mfr-gallery-img img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.mfr-gallery-label {
    padding: 10px 12px;
    border-top: 1px solid var(--medium-gray);
    text-align: center;
}

.mfr-gallery-label strong {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.mfr-gallery-label span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Bottom Logos Slider */
.mfr-logos-bar {
    background: var(--light-gray);
    border-top: 1px solid var(--medium-gray);
    padding: 20px 0;
    overflow: hidden;
}

.mfr-logos-track {
    display: flex;
    gap: 30px;
    align-items: center;
    animation: mfrLogosScroll 25s linear infinite;
    width: max-content;
}

.mfr-logos-track:hover {
    animation-play-state: paused;
}

.mfr-logo-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 45px;
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.mfr-logo-item:hover {
    opacity: 1;
}

.mfr-logo-item img {
    max-height: 35px;
    max-width: 110px;
    object-fit: contain;
    filter: grayscale(50%);
    transition: var(--transition);
}

.mfr-logo-item:hover img {
    filter: grayscale(0%);
}

.mfr-logo-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

@keyframes mfrLogosScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .mfr-hero { padding: 30px 0; }
    .mfr-hero h1 { font-size: 1.3rem; }
    .mfr-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .mfr-gallery-img { height: 120px; }
}

/* ==========================================================================
   FLOATING SIDEBAR (Oneyac Style - Right Side Quick Actions)
   ========================================================================== */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: var(--brand-green);
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.floating-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
    width: 52px;
}

.floating-btn:first-child {
    border-radius: 6px 0 0 0;
}

.floating-btn:last-child {
    border-radius: 0 0 0 6px;
}

.floating-btn-whatsapp {
    background: #25D366;
}

.floating-btn-whatsapp:hover {
    background: #128C7E;
}

@media (max-width: 768px) {
    .floating-sidebar {
        bottom: 0;
        top: auto;
        right: 0;
        left: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    .floating-btn {
        flex: 1;
        height: 42px;
        border-radius: 0;
        font-size: 1rem;
    }
    .floating-btn:first-child { border-radius: 0; }
    .floating-btn:last-child { border-radius: 0; }
    .floating-btn:hover { width: auto; }
}

/* Favourite Button */
.btn-fav {
    background: none;
    border: 1px solid var(--medium-gray);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
    vertical-align: middle;
    margin-left: 4px;
}

.btn-fav:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.btn-fav.fav-active,
.btn-fav.fav-active:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    background: #fff0f0;
}

/* Header Favourites Link */
.fav-link-desktop {
    color: var(--accent-red);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: var(--transition);
}

.fav-link-desktop:hover {
    color: var(--primary-dark);
    transform: scale(1.2);
}

/* BOM Page - Mobile Full Width Inputs */
@media (max-width: 768px) {
    .bom-upload-area { padding: 20px !important; }
    
    section [style*="grid-template-columns: 1fr 1fr"],
    section [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Contact Page - Mobile Responsive */
@media (max-width: 768px) {
    section [style*="grid-template-columns:2fr 1fr"],
    section [style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Floating sidebar - Instagram & YouTube */
.floating-btn-instagram {
    background: #E1306C;
}
.floating-btn-instagram:hover {
    background: #C13584;
}
.floating-btn-youtube {
    background: #FF0000;
}
.floating-btn-youtube:hover {
    background: #CC0000;
}

/* Prevent horizontal overflow on mobile */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .container { overflow-x: hidden; }
    .category-card { max-width: 100%; }
}

/* Categories Compact List Layout */
.categories-compact {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 25px;
}

.categories-list-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px 15px;
}

.category-list-link {
    display: block;
    padding: 6px 8px;
    font-size: 0.85rem;
    color: var(--brand-green);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-list-link:hover {
    background: var(--light-gray);
    color: var(--accent-red);
}

.category-list-link i {
    font-size: 0.65rem;
    margin-right: 4px;
    opacity: 0.5;
}

.cat-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .categories-list-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .categories-list-grid { grid-template-columns: repeat(2, 1fr); }
    .category-list-link { font-size: 0.8rem; padding: 5px 6px; }
}
