/* ===========================
   Page Header
   =========================== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

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

/* ===========================
   Products Section
   =========================== */
.products-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* ===========================
   Sidebar Filters
   =========================== */
.products-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.filter-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-btn,
.clear-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
}

.filter-btn {
    background: var(--primary-color);
    color: white;
    margin-bottom: 0.75rem;
}

.filter-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.clear-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-color);
}

.clear-btn:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

/* ===========================
   Contact Card
   =========================== */
.contact-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.contact-card h3 {
    color: white;
}

.contact-card p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: white;
    color: var(--primary-color);
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.contact-btn.secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* ===========================
   Products Main
   =========================== */
.products-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.products-header {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.results-info {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Quick Search */
.quick-search {
    position: relative;
    flex: 0 0 300px;
}

.quick-search-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quick-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.quick-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.quick-search-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-suggestion-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

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

.quick-suggestion-item:hover {
    background: var(--bg-light);
}

.quick-suggestion-item .suggestion-title {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.quick-suggestion-item .suggestion-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    gap: 0.75rem;
}

.no-results-small {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===========================
   Products Grid
   =========================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--bg-light);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: var(--text-light);
    font-size: 4rem;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.rx {
    background: #ff6b6b;
    color: white;
}

.product-badge.otc {
    background: #00b894;
    color: white;
}

/* ===========================
   Product Info
   =========================== */
.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-composition {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.product-unit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-outline {
    padding: 0.75rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===========================
   No Products
   =========================== */
.no-products {
    background: white;
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.no-products i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.no-products p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===========================
   Pagination
   =========================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.75rem 1rem;
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        order: 2;
    }
    
    .products-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 3rem 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}
