/* Catalog Page - Modern Design (like Quick Order) */

/* ============================================
   PAGE CONTAINER
   ============================================ */
.wcatalog {
    background: #f8f9fa !important;
    padding: 30px 0 !important;
    min-height: 100vh;
}

.wcatalog .container-fluid {
    padding: 0 20px;
}

/* ============================================
   PAGE TITLE
   ============================================ */
.wcatalog .title.pagetitle {
    margin-bottom: 25px;
    padding: 0;
    border-bottom: none;
    text-align: center;
}

.wcatalog .title.pagetitle h1 {
    font-size: 32px;
    font-weight: 700;
    color: #304b6e;
    margin: 0;
    text-transform: none;
}

/* ============================================
   FILTER SIDEBAR (vetpreparaty.com style)
   ============================================ */
.filter {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.filtertitle {
    display: none !important;
}

#filter-form {
    background-color: transparent !important;
    padding: 0 !important;
}

/* Filter blocks */
.fltr_block {
    margin-bottom: 20px !important;
    border: none !important;
    border-bottom: 1px solid #e9ecef !important;
    padding-bottom: 15px !important;
}

.fltr_block:last-of-type {
    border-bottom: none !important;
}

.fltr_name {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 10px 0 !important;
    margin-bottom: 0 !important;
    font-weight: 700;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.fltr_name:hover {
    background: transparent !important;
    color: #0066cc;
}

.fltr_name::after {
    content: '';
    display: none;
}

.fltr_name .arrow,
.fltr_name i {
    display: none;
}

/* Filter checkbox list */
.fltr_block_checkbox {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    display: block !important;
}

.fltr_block_checkbox::-webkit-scrollbar {
    width: 4px;
}

.fltr_block_checkbox::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.fltr_block_checkbox label {
    display: flex !important;
    align-items: center;
    padding: 6px 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: color 0.2s;
}

.fltr_block_checkbox label:hover {
    color: #0066cc;
}

/* Checkbox styles - clean square */
.jq-checkbox {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    border: 1px solid #ccc !important;
    border-radius: 2px !important;
    background: #fff !important;
    margin-right: 10px !important;
    transition: all 0.15s ease;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.jq-checkbox:hover {
    border-color: #0066cc !important;
}

.jq-checkbox.checked {
    background-color: #0066cc !important;
    border-color: #0066cc !important;
}

.jq-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

.jq-checkbox.checked .jq-checkbox__div {
    display: none !important;
}

/* Filter item count */
.filter-count {
    color: #999;
    font-size: 13px;
    margin-left: auto;
}

/* Filter label text */
.filter-label-text {
    flex: 1;
}

/* Native checkbox - visible Bootstrap style */
.filter-checkbox {
    /* Checkbox is visible using Bootstrap form-check-input styles */
}

/* Additional filters block */
.fltr_block_additional {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-height: none;
    overflow-y: visible;
    margin-bottom: 15px;
}

.fltr_block_additional .fltr_block_checkbox {
    max-height: none !important;
    overflow: visible !important;
}

/* Filter buttons / reset */
.eFiltr_btn_wrapper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.eFiltr_btn_wrapper input[type="submit"],
.addtov {
    display: none !important;
}

.eFiltr_reset {
    text-align: left;
}

.eFiltr_reset a {
    color: #0066cc !important;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: left !important;
    width: auto !important;
}

.eFiltr_reset a:hover {
    text-decoration: underline;
}

/* Filter wrapper */
.filter .col-lg-3 {
    padding-right: 20px;
}

/* Active filters */
.active-filters-block {
    background: #f5f5f5 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px !important;
    margin-bottom: 20px;
    border-left: none !important;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0e0e0 !important;
    border-radius: 3px !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    margin: 3px;
    color: #333;
}

.active-filter-tag .remove-filter {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.active-filter-tag .remove-filter:hover {
    color: #c00;
}

.clear-all-filters {
    display: block;
    margin-top: 10px;
    color: #0066cc;
    font-size: 13px;
    text-decoration: none;
}

.clear-all-filters:hover {
    text-decoration: underline;
}

/* ============================================
   SHOP BAR (Top toolbar)
   ============================================ */
.shop-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shop-bar > div:first-child {
    flex: 1;
    color: #304b6e;
}

.shop-bar > div:first-child i {
    color: #72c224;
    margin-right: 8px;
}

.shop-bar .selector-field {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-bar .selector-field label {
    color: #666;
    font-weight: 500;
    margin: 0;
}

/* ============================================
   QUICK ORDER BUTTON
   ============================================ */
.quick-order-button-wrapper {
    text-align: right;
    margin-bottom: 20px;
    padding: 0;
}

.btn-quick-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: #000 !important;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.btn-quick-order:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #F57C00 100%);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    transform: translateY(-2px);
    color: #000 !important;
    text-decoration: none !important;
}

.btn-quick-order i {
    font-size: 18px;
}

/* ============================================
   TABLE CONTAINER
   ============================================ */
.table-responsive {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: #fff;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.tabcatalog {
    margin-bottom: 0;
    width: 100%;
    background: white;
}

.tabcatalog thead {
    background: linear-gradient(135deg, #304b6e 0%, #3d5f85 100%);
}

.tabcatalog thead th {
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: none !important;
    padding: 15px 12px;
    white-space: nowrap;
}

.tabcatalog thead th a {
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tabcatalog thead th a:hover {
    color: #72c224 !important;
}

.tabcatalog thead th.sortby {
    cursor: pointer;
    transition: background-color 0.2s;
}

.tabcatalog thead th.sortby:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.tabcatalog thead th.sortby.active {
    background: rgba(114, 194, 36, 0.2) !important;
}

.tabcatalog thead th.sortby.active a {
    color: #72c224 !important;
}

/* Table body */
.tabcatalog tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.tabcatalog tbody tr:hover {
    background-color: #f8fffe;
}

.tabcatalog tbody tr:last-child {
    border-bottom: none;
}

.tabcatalog tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
}

/* Product name link */
.tabcatalog tbody td a {
    color: #304b6e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.tabcatalog tbody td a:hover {
    color: #72c224;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.text-success,
.in-stock {
    color: #28a745 !important;
    font-weight: 600;
}

.text-danger,
.out-of-stock {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Stock badge */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-badge.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   CATALOG BUTTONS
   ============================================ */
.catalog-btn {
    font-family: 'Fira Sans Condensed', 'Cuprum', Arial, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    border-radius: 6px !important;
    font-size: 13px !important;
    padding: 10px 18px !important;
    text-transform: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.catalog-btn-buy {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    border: none !important;
    color: #fff !important;
}

.catalog-btn-buy:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.catalog-btn-order {
    background: linear-gradient(135deg, #fd7e14 0%, #e96a00 100%) !important;
    border: none !important;
    color: #fff !important;
}

.catalog-btn-order:hover {
    background: linear-gradient(135deg, #e96a00 0%, #dc6502 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

/* ============================================
   SELECT DROPDOWN
   ============================================ */
.jq-selectbox {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    background: #fff !important;
    min-width: 80px;
}

.jq-selectbox__select {
    padding: 8px 35px 8px 12px !important;
    font-weight: 600;
    color: #304b6e;
}

.jq-selectbox__trigger {
    border-radius: 0 8px 8px 0 !important;
    background: #f8f9fa !important;
    border-left: 1px solid #e9ecef !important;
    width: 30px;
}

.jq-selectbox__trigger-arrow {
    border-top-color: #304b6e !important;
}

.jq-selectbox.opened .jq-selectbox__trigger-arrow {
    border-bottom-color: #304b6e !important;
}

.jq-selectbox__dropdown {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    margin-top: 5px;
}

.jq-selectbox__dropdown li {
    padding: 10px 15px !important;
    transition: background-color 0.2s;
}

.jq-selectbox__dropdown li:hover {
    background-color: #f8f9fa !important;
}

.jq-selectbox__dropdown li.selected {
    background: linear-gradient(135deg, #304b6e 0%, #3d5f85 100%) !important;
    color: #fff;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    margin-top: 30px;
    justify-content: center;
}

.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 4px;
    border: 2px solid #e9ecef;
    color: #304b6e;
    font-weight: 600;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #f8f9fa;
    border-color: #72c224;
    color: #72c224;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #304b6e 0%, #3d5f85 100%);
    border-color: #304b6e;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #adb5bd;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .wcatalog .title.pagetitle h1 {
        font-size: 26px;
    }

    .shop-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .quick-order-button-wrapper {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .wcatalog {
        padding: 15px 0 !important;
    }

    .wcatalog .container-fluid {
        padding: 0 10px;
    }

    .tabcatalog thead th,
    .tabcatalog tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .catalog-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .btn-quick-order {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PRICE COLUMN
   ============================================ */
.price-cell {
    font-weight: 700;
    color: #304b6e;
    white-space: nowrap;
}

.price-cell .currency {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

/* ============================================
   PRODUCT IMAGE IN TABLE
   ============================================ */
.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #72c224;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
