/* === GL BIOCHEM — PRODUCTS & PRICE LIST (Modern 2024) === */

.products-section { padding: 2rem 0 4rem; background: var(--gray-50); }

/* === TOOLBAR === */
.products-toolbar {
    display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem;
}
.category-filters {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.cat-filter-btn {
    display: inline-flex; align-items: center;
    padding: 0.5rem 1.125rem; font-size: 0.8125rem; font-weight: 600;
    border: 1px solid var(--gray-200); border-radius: var(--radius-full);
    text-decoration: none; color: var(--gray-600); background: var(--white);
    transition: all var(--transition-fast); white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.cat-filter-btn:hover { border-color: var(--primary-200); color: var(--primary); background: var(--primary-50); text-decoration: none; }
.cat-filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); box-shadow: 0 2px 8px rgba(44,48,112,0.2); }
.search-bar { display: flex; max-width: 480px; }
.search-input {
    flex: 1; padding: 0.75rem 1.125rem; font-size: 14px;
    border: 1.5px solid var(--gray-200); border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    outline: none; font-family: var(--font-family);
    background: var(--white);
    transition: border-color var(--transition-fast);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
    padding: 0 1.25rem; background: var(--primary); color: var(--white);
    border: 1.5px solid var(--primary); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    cursor: pointer; transition: background var(--transition-fast);
}
.search-btn:hover { background: var(--primary-dark); }

/* === RESULTS INFO === */
.results-info {
    font-size: 14px; color: var(--gray-500);
    margin-bottom: 1.25rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

/* === PRODUCTS TABLE === */
.products-table-wrap {
    overflow-x: auto; border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200); background: var(--white);
    box-shadow: var(--shadow-sm);
}
.products-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
.products-table thead { background: var(--gray-50); }
.products-table th {
    padding: 0.875rem 1rem; text-align: left; font-weight: 700;
    color: var(--gray-700); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.products-table td {
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}
.products-table tbody tr { transition: background var(--transition-fast); }
.products-table tbody tr:hover { background: var(--primary-50); }
.products-table tbody tr:nth-child(even) { background: var(--gray-50); }
.products-table tbody tr:nth-child(even):hover { background: var(--primary-50); }
.products-table tbody tr:last-child td { border-bottom: none; }
.products-table .cat-no { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--gray-500); white-space: nowrap; }
.products-table .product-name { font-weight: 600; color: var(--gray-800); }
.products-table .formula { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--gray-500); }
.products-table .price { font-weight: 700; color: var(--primary); white-space: nowrap; }
.purity-badge {
    display: inline-block; padding: 0.2rem 0.625rem;
    font-size: 0.75rem; font-weight: 700; color: var(--success);
    background: #ecfdf5; border-radius: var(--radius-full);
    border: 1px solid #a7f3d0;
}
.table-link {
    font-size: 0.8125rem; font-weight: 700; color: var(--blue);
    text-decoration: none; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 0.25rem;
    letter-spacing: 0.02em;
}
.table-link i { font-size: 0.625rem; transition: transform var(--transition-fast); }
.table-link:hover { color: var(--blue-dark); }
.table-link:hover i { transform: translateX(3px); }

.products-table.compact th { padding: 0.625rem 0.75rem; }
.products-table.compact td { padding: 0.625rem 0.75rem; }

/* === NO RESULTS === */
.no-results {
    text-align: center; padding: 4rem 1.5rem;
    background: var(--white); border-radius: var(--radius-xl);
    border: 1px dashed var(--gray-300);
}
.no-results p { color: var(--gray-500); font-size: 16px; }

/* === PAGINATION === */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 0.375rem;
    margin-top: 2rem; padding: 1rem 0; flex-wrap: wrap;
}
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.75rem;
    font-size: 0.875rem; font-weight: 600; color: var(--gray-600);
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); text-decoration: none;
    transition: all var(--transition-fast); gap: 0.25rem;
    box-shadow: var(--shadow-sm);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); text-decoration: none; }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); pointer-events: none; box-shadow: 0 2px 8px rgba(44,48,112,0.2); }
.page-btn i { font-size: 0.625rem; }
.page-info { font-size: 0.8125rem; color: var(--gray-400); margin-left: 0.75rem; }
@media (max-width: 640px) { .page-info { display: none; } }

/* === PRICE LIST CATEGORY === */
.pricelist-category { margin-bottom: 3rem; }
.pricelist-category-title {
    font-size: 1.25rem; font-weight: 700; color: var(--gray-900);
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.625rem;
    padding-bottom: 0.625rem; border-bottom: 2px solid var(--primary-200);
}
.pricelist-category-title i { color: var(--blue); font-size: 1rem; }

/* === CRYPTO REMINDER === */
.crypto-reminder {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 1.5rem 2rem; border-radius: var(--radius-xl);
    margin-bottom: 2rem; color: var(--gray-300);
}
.crypto-reminder strong { color: var(--gold-light); display: block; margin-bottom: 0.25rem; }
.crypto-reminder p { font-size: 13px; margin: 0; color: rgba(255,255,255,0.6); }
.crypto-reminder .btn { margin-left: auto; flex-shrink: 0; }

/* === PRODUCT DETAIL === */
.product-detail-section { padding: 2.5rem 0 4rem; background: var(--gray-50); }
.product-detail-grid {
    display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 768px) { .product-detail-grid { grid-template-columns: 1.5fr 1fr; } }
.product-detail-header {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
}
.product-detail-name {
    font-size: 1.875rem; font-weight: 800; color: var(--gray-900); margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}
.product-detail-meta-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 640px) { .product-detail-meta-grid { grid-template-columns: repeat(3, 1fr); } }
.meta-item {
    padding: 1.125rem; background: var(--white); border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200); transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.meta-item:hover { border-color: var(--primary-200); background: var(--primary-50); box-shadow: var(--shadow-md); }
.meta-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.375rem; }
.meta-value { display: block; font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.meta-value.formula { font-family: var(--font-mono); font-size: 0.875rem; }
.meta-value.price { color: var(--primary); font-size: 1.25rem; }

/* === ORDER SIDEBAR === */
.order-card {
    background: var(--white); border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xl); padding: 2rem;
    position: sticky; top: 120px;
    box-shadow: var(--shadow-lg);
}
.order-card h3 {
    font-size: 1.125rem; font-weight: 700; color: var(--gray-900);
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem;
}
.order-card h3 i { color: var(--blue); }
.order-card-price {
    text-align: center; padding: 1.5rem; background: var(--primary-50);
    border-radius: var(--radius-xl); margin-bottom: 1.25rem;
    border: 1px solid var(--primary-200);
}
.order-price-label { display: block; font-size: 0.8125rem; color: var(--gray-500); font-weight: 500; margin-bottom: 0.375rem; }
.order-price-value { display: block; font-size: 2.5rem; font-weight: 900; color: var(--primary); letter-spacing: -0.03em; }
.order-card-crypto {
    padding: 1.25rem; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius-xl); margin-bottom: 1.5rem; text-align: center;
}
.crypto-label { font-size: 0.8125rem; font-weight: 700; color: var(--gold-light); display: block; margin-bottom: 0.5rem; }
.crypto-coins-row {
    display: flex; gap: 0.375rem; justify-content: center; flex-wrap: wrap;
}
.crypto-coins-row span {
    font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06); padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}
.order-card-actions { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 1rem; }
.order-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.875rem 1rem; border-radius: var(--radius-lg);
    font-weight: 700; font-size: 14px;
    text-decoration: none; transition: all var(--transition-fast);
    text-align: center;
}
.order-action-btn:hover { text-decoration: none; transform: translateY(-1px); }
.order-action-btn.tg { background: #e0f2fe; color: #0284c7; }
.order-action-btn.tg:hover { background: #bae6fd; }
.order-action-btn.wa { background: #dcfce7; color: #16a34a; }
.order-action-btn.wa:hover { background: #bbf7d0; }
.order-action-btn.email { background: var(--primary-50); color: var(--primary); }
.order-action-btn.email:hover { background: var(--primary-100); }
.order-card-note { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.6; }

/* === RELATED === */
.related-section { margin-top: 3rem; padding-top: 2.5rem; border-top: 2px solid var(--gray-200); }
.related-section .section-heading { font-size: 1.25rem; margin-bottom: 1.5rem; }
.related-section .section-heading::after { display: none; }

/* === PRICELIST SEARCH === */
.pricelist-search-wrap {
    position: relative; margin-bottom: 2rem;
}
.pricelist-search-box {
    display: flex; align-items: center; position: relative;
    background: var(--white); border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl); overflow: hidden;
    transition: border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.pricelist-search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,48,112,0.08); }
.pricelist-search-icon { position: absolute; left: 18px; color: var(--gray-400); font-size: 16px; pointer-events: none; }
.pricelist-search-input {
    flex: 1; padding: 16px 16px 16px 48px; font-size: 15px;
    border: none; outline: none; background: transparent;
    font-family: var(--font-family); color: var(--gray-800);
}
.pricelist-search-input::placeholder { color: var(--gray-400); }
.pricelist-search-count {
    font-size: 12px; font-weight: 700; color: var(--primary);
    padding-right: 12px; white-space: nowrap;
}
.pricelist-search-clear {
    background: none; border: none; cursor: pointer;
    padding: 0 16px; color: var(--gray-400); font-size: 16px;
    transition: color var(--transition-fast);
}
.pricelist-search-clear:hover { color: var(--gray-700); }

/* Dropdown */
.pricelist-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
    max-height: 420px; overflow-y: auto; z-index: 100;
    display: none;
}
.pricelist-dropdown.active { display: block; }
.pricelist-dd-item {
    display: block; padding: 14px 18px; text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition-fast);
}
.pricelist-dd-item:last-child { border-bottom: none; }
.pricelist-dd-item:hover { background: var(--primary-50); text-decoration: none; }
.pricelist-dd-item.fuzzy { border-left: 3px solid var(--gold); }
.pricelist-dd-name {
    font-size: 14px; font-weight: 700; color: var(--gray-800);
    margin-bottom: 4px; line-height: 1.3;
}
.pricelist-dd-name mark { background: #fef08a; color: var(--gray-900); padding: 0 2px; border-radius: 2px; }
.pricelist-dd-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 12px; color: var(--gray-500); font-family: var(--font-mono);
}
.pricelist-dd-meta mark { background: #fef08a; color: var(--gray-700); padding: 0 2px; border-radius: 2px; }
.pricelist-dd-price { font-weight: 700; color: var(--primary); font-family: var(--font-family); }
.pricelist-dd-fuzzy {
    font-size: 10px; font-weight: 700; color: var(--gold-dark);
    background: #fef3c7; padding: 2px 8px; border-radius: var(--radius-full);
    font-family: var(--font-family);
}
.pricelist-dd-empty {
    padding: 32px 18px; text-align: center;
    font-size: 14px; color: var(--gray-500);
}
.pricelist-dd-empty i { margin-right: 6px; color: var(--gray-400); }

/* === RESPONSIVE — MOBILE === */
@media (max-width: 767px) {
    .products-section { padding: 1.25rem 0 2.5rem; }
    .products-toolbar { gap: 0.75rem; margin-bottom: 1.25rem; }
    .search-bar { max-width: 100%; }
    .search-input { padding: 0.625rem 0.875rem; font-size: 14px; }

    /* Category filters horizontal scroll */
    .category-filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; gap: 6px; }
    .category-filters::-webkit-scrollbar { display: none; }
    .cat-filter-btn { padding: 0.4rem 0.875rem; font-size: 0.75rem; flex-shrink: 0; }

    /* Table compact */
    .products-table-wrap { border-radius: var(--radius-lg); }
    .products-table { font-size: 0.8125rem; }
    .products-table th { padding: 0.625rem 0.5rem; font-size: 10px; }
    .products-table td { padding: 0.5rem; }
    .products-table .cat-no { font-size: 0.6875rem; }
    .table-link { font-size: 0.6875rem; }
    .purity-badge { font-size: 0.625rem; padding: 0.125rem 0.5rem; }

    /* Pagination */
    .pagination { gap: 4px; margin-top: 1.25rem; }
    .page-btn { min-width: 34px; height: 34px; font-size: 0.8125rem; }

    /* Detail page */
    .product-detail-section { padding: 1.5rem 0 2.5rem; }
    .product-detail-name { font-size: 1.375rem; margin-bottom: 1rem; }
    .product-detail-meta-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .meta-item { padding: 0.875rem; border-radius: var(--radius-lg); }
    .meta-label { font-size: 0.6875rem; margin-bottom: 0.25rem; }
    .meta-value { font-size: 0.875rem; }
    .meta-value.price { font-size: 1.125rem; }

    /* Order card — show at top on mobile */
    .product-detail-sidebar { order: -1; }
    .order-card { padding: 1.25rem; position: static; border-radius: var(--radius-lg); }
    .order-card h3 { font-size: 1rem; }
    .order-card-price { padding: 1rem; border-radius: var(--radius-lg); }
    .order-price-value { font-size: 2rem; }
    .order-card-crypto { padding: 1rem; border-radius: var(--radius-lg); }
    .order-action-btn { padding: 0.75rem; font-size: 13px; }

    /* Crypto reminder */
    .crypto-reminder { flex-direction: column; align-items: flex-start; padding: 1rem; border-radius: var(--radius-lg); gap: 0.75rem; }
    .crypto-reminder .btn { margin-left: 0; width: 100%; }

    /* Price list */
    .pricelist-category { margin-bottom: 2rem; }
    .pricelist-category-title { font-size: 1.0625rem; }

    /* Search */
    .pricelist-search-box { border-radius: var(--radius-lg); }
    .pricelist-search-input { padding: 12px 12px 12px 42px; font-size: 14px; }
    .pricelist-search-icon { left: 14px; font-size: 14px; }
    .pricelist-dropdown { border-radius: var(--radius-lg); max-height: 340px; }
    .pricelist-dd-item { padding: 10px 14px; }
    .pricelist-dd-name { font-size: 13px; }
    .pricelist-dd-meta { font-size: 11px; gap: 8px; }
}
