/* assets/css/style.css */
:root {
    --primary-color: #000;
    --secondary-color: #f37320;
    --success-color: #198754;
}

/* Category Menu Styles */
.category-menu {
   /* max-height: 500px;
    overflow-y: auto;*/
}

.category-item {
    position: relative;
}

.category-item > a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
}

.category-item > a:hover {
    background-color: #f8f9fa;
}

.submenu {
    display: none;
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.category-item:hover > .submenu {
    display: block;
}

.submenu li {
    position: relative;
}

.submenu li a {
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    display: block;
    font-size: 0.9rem;
}

.submenu li a:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.level-3, .level-4 {
    font-size: 0.85rem;
}

/* Product Card Styles */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 15px;
    background: #f37320;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header .btn-close {
    filter: brightness(0) invert(1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-details h6 {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.cart-item-controls .cart-quantity {
    width: 70px;
}

.cart-item-price {
    font-weight: bold;
    color: #f37320;
    margin-left: auto;
}

.cart-footer {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.cart-overlay.show {
    display: block;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Line Items Table Styles */
#lineItemsTable td {
    vertical-align: middle;
}

.quantity-input {
    width: 100px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    #lineItemsTable {
        font-size: 0.9rem;
    }
    
    #lineItemsTable .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 5px;
}

.suggestions-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
}

.suggestions-header {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.suggestions-list {
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.product-item .product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.suggestion-content {
    flex: 1;
}

.product-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.product-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.product-price {
    font-weight: 600;
    color: #0d6efd;
    margin-right: 10px;
}

.category-item {
    padding: 8px 15px;
    font-size: 0.95rem;
}

.category-item i {
    width: 20px;
}

.suggestions-footer {
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.no-results {
    color: #6c757d;
}

/* Mobile search suggestions */
.mobile-search-suggestions {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1040;
    overflow-y: auto;
}

.mobile-search-suggestions .suggestions-container {
    border: none;
    border-radius: 0;
    max-height: none;
    min-height: 100%;
}

/* Highlight */
strong {
    color: #000;
}

/* Responsive */
@media (min-width: 992px) {
    .search-form {
        position: relative;
    }
    
    .search-suggestions {
        width: 100%;
    }
}