.shop-container {
    overflow-y: auto;
}

.shop-filters {
    border: 1px solid var(--base-gray-percent);
    background-color: var(--base-gray-percent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    min-width: 240px;
    max-width: 260px;
} 

.shop-filters .filters-header, .products-header, .filter-drawer .drawer-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-filters h6, .filter-drawer h6 {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.filter-btn {
    background-color: var(--base-gray);
    border: 1px solid var(--base-gray-percent);
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    background-color: var(--base-dark-gray);
}

.filter-dropdown-menu {
    width: 280px;
    background-color: var(--base-bg);
    border: 1px solid var(--base-gray-percent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.filter-dropdown-menu h6 {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.filter-dropdown-menu .dropdown-menu, .options-dropdown {
    background-color: var(--base-gray);
    border: 1px solid var(--base-gray-percent);
    margin-top: 0.25rem;
}

.filter-drawer {
    left: 0;
    right: 0;
    background-color: var(--base-bg);
    border-top: 1px solid var(--base-gray-percent);
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.filter-drawer.show {
    transform: translateY(0);
}

.drawer-close {
    cursor: pointer;
}

.filter-button {
    background-color: var(--action-green);
    border: 1px solid var(--action-green);
}

.filter-button:hover {
    background-color: var(--action-hover-green);
}

.dropdown-item {
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: var(--base-dark-gray);
    color: white;
}

.dropdown-divider {
    border-color: var(--base-gray-percent);
}

.filter-dropdown {
    box-shadow: none !important;
    height: 36px;
}

.products-header div:not(.filter-dropdown-menu):not(.filter-dropdown-menu *) {
    max-height: 36px;
}

.view-mode-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--base-gray);
    border: 1px solid var(--base-gray-percent);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.view-mode-btn:hover {
    background-color: var(--base-dark-gray);
    color: white;
}

.view-mode-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.products-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.products-grid .product-image {
    height: 120px;
    overflow: hidden;
}

.products-grid .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.products-grid .product-card {
    cursor: pointer;
    position: relative;
}

.products-grid .product-description {
    -webkit-line-clamp: 1;
    opacity: 0.8;
    font-size: 0.8rem;
}

.products-grid .product-card:hover .product-description {
    opacity: 1;
    visibility: visible;
}

.products-grid .product-actions .btn-add-cart {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--action-green);
    border: none;
    transition: background-color 0.2s;
}

.products-grid .product-actions .btn-add-cart:hover {
    background-color: var(--action-hover-green);
}

.products-grid .btn-view-details {
    display: none;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.products-list .product-card {
    display: flex;
    height: 220px;
    width: 100%;
    position: relative;
}

.products-list .product-image {
    width: 45%;
    height: 100%;
    position: relative;
}

.products-list .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.products-list .product-info {
    flex: 1;
    min-width: 0; 
    display: flex;
    flex-direction: column;
    padding: 0.75rem !important;
}

.products-list .product-title {
    height: auto;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 1;
    font-size: 0.95rem;
}

.products-list .price-label {
    margin-top: auto;
    margin-bottom: 0.75rem !important;
    justify-content: flex-start !important;
    gap: 16px;
}

.products-list .price-label .price-title {
    display: inline;
}

.products-list .product-actions {
    margin-top: auto;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.75rem !important;
}

.products-list .product-actions button {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 0.35rem 0.75rem !important;
}

.form-control, .form-select {
    background-color: var(--base-gray);
    border: 1px solid var(--base-gray-percent);
    color: white;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    background-color: var(--base-gray);
    border-color: var(--primary);
    color: white;
    box-shadow: none;
}

.form-control.filter-dropdown:hover {
    background-color: var(--base-dark-gray);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.price-input {
    width: calc(50% - 10px);
}

.price-inputs span {
    opacity: 0.7;
}

.book-search .form-control {
    padding-right: 32px;
}

.book-search {
    position: relative;
}

.book-search::after {
    content: '\e8b6';
    font-family: 'tabler-icons';
    position: absolute;
    left: 10px;
    top: 34px;
    opacity: 0.5;
    font-size: 1rem;
}

.author-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.author-list::-webkit-scrollbar {
    width: 6px;
}

.author-list::-webkit-scrollbar-track {
    background: var(--base-gray);
}

.author-list::-webkit-scrollbar-thumb {
    background: var(--base-gray-percent);
    border-radius: 3px;
}

.author-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.9;
}

.author-checkbox:hover {
    opacity: 1;
}

.product-card {
    border: 1px solid var(--base-gray-percent);
    background: var(--base-gray-percent); 
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-info {
    padding: 0.5rem !important;
}

.product-title {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    height: 4em;
    overflow: hidden;
    /* display: -webkit-box; */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem !important;
}

.price-label .product-price {
    font-size: 0.85rem;
}

.product-actions {
    gap: 0.35rem !important;
}

.product-actions button {
    flex: 1;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem;
}

.btn-add-cart, .btn-view-details {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-add-cart {
    background-color: var(--action-green);
}

.btn-add-cart:hover {
    background-color: var(--action-hover-green);
}

.btn-view-details {
    background-color: var(--inactive-step-gray);
    color: var(--dashboard-step-title);
}

.btn-view-details:hover {
    background-color: var(--icon-gray);
}

.no-products-message {
    text-align: center;
    grid-column: 1 / -1;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.products-grid .price-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0 !important;
}

.products-grid .price-label .price-title {
    display: none;
}

.products-grid .product-actions {
    margin: 0;
}

.products-grid .product-actions .btn-add-cart {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--action-green);
    border: none;
    transition: background-color 0.2s;
}

.products-grid .product-actions .btn-add-cart:hover {
    background-color: var(--action-hover-green);
}

.products-grid .btn-view-details {
    display: none;
}

.products-list .price-label {
    margin-top: auto;
    margin-bottom: 0.75rem !important;
}

.products-list .price-label .price-title {
    display: inline;
}

.products-list .product-actions {
    margin-top: auto;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.75rem !important;
}

.products-list .product-actions button {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 0.35rem 0.75rem !important;
}

@media (max-width: 768px) {
    .products-grid .product-image {
        height: 100px;
    }
    .products-list .product-card {
        height: 120px;
    }
    .products-list .product-image {
        width: 85px;
        min-width: 85px;
    }
    .products-list .product-info {
        padding: 0.5rem !important;
    }
    .products-list .product-title {
        font-size: 0.85rem;
    }
    .products-list .product-actions button {
        min-width: 100px;
        padding: 0.25rem 0.5rem !important;
    }
    .product-actions {
        flex-direction: column;
        gap: 0.25rem !important;
    }
}

.cart-btn {
    background-color: var(--base-gray);
    border: 1px solid var(--base-gray-percent);
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-btn:hover {
    background-color: var(--base-dark-gray);
}

.cart-count {
    transform: translate(25%, -25%) !important;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
}

.out-of-stock-label {
    font-size: 0.85rem;
    opacity: 0.8;
    padding: 0.25rem 0.5rem;
    background-color: var(--base-dark-gray);
    border-radius: 4px;
}

.products-grid .out-of-stock-label {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
}

.product-description {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.products-list .product-description {
    -webkit-line-clamp: 3;
}
