/* Products Page Styles */

/* Mobile-first responsive fix */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* Search form styles */
.sidebar-search {
    margin-bottom: 20px;
    width: 100%;
}

.search-form-sidebar {
    display: flex;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-form-sidebar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-right: none;
    font-size: 0.9rem;
    outline: none;
}

.search-form-sidebar button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form-sidebar button:hover {
    background: var(--secondary-color);
}

.search-results-info {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-results-info p {
    margin: 0;
    margin-right: 15px;
}

.search-results-info #search-query-display {
    font-weight: bold;
    color: var(--primary-color);
}

.btn-clear-search {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-clear-search:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

/* Products page specific styles */
.products-container {
    display: flex;
    padding-top: 20px;
    min-height: calc(100vh - 85px);
}

/* Banner section styles */
.banner-section {
    width: 100%;
    margin-top: 85px;
    position: relative;
    background-color: #f8f9fa;
}

.philosophy-container {
    display: flex;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.philosophy-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 40%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.philosophy-text h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.philosophy-text p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--dark-color);
    font-weight: 500;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix header height and positioning */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo styling */
.logo {
    position: relative;
    z-index: 2;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color, #0056b3);
    transition: all 0.3s ease;
    margin: 0;
}

/* Navigation menu styles */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 10px;
}

.main-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--dark-color, #333);
    font-weight: 500;
    position: relative;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--primary-color, #0056b3);
}

/* Mobile menu styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color, #333);
    padding: 10px;
    z-index: 1001;
    transition: all 0.3s ease;
    outline: none;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.mobile-menu-toggle.active {
    color: var(--primary-color, #0056b3);
}

/* Prevent scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background-color: #f8f9fa;
    padding: 30px 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow-y: visible;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--dark-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 16px;
    cursor: pointer;
}

.category-list a:hover, .category-list a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Ensure categories are visible */
.category-list li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.products-grid {
    flex: 1;
    padding: 30px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.products-header h2 {
    color: var(--primary-color);
    margin: 0;
    transition: all 0.3s ease;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card a {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    height: 200px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.product-info h3 {
    margin: 0 0 10px 0;
    color: var(--dark-color);
    font-size: 18px;
}

.product-category {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    flex-grow: 1;
    min-height: 20px;
}

.product-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    margin-top: 10px;
}

.product-link:hover {
    background-color: var(--secondary-color);
}

.no-products {
    text-align: center;
    padding: 50px;
    color: #6c757d;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .sidebar-search {
        margin-bottom: 15px;
    }

    .search-form-sidebar input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .search-form-sidebar button {
        padding: 0 12px;
    }

    .search-results-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .search-results-info p {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .btn-clear-search {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .philosophy-container {
        height: auto;
        flex-direction: column;
    }

    .philosophy-text {
        position: relative;
        width: 100%;
        padding: 30px 20px;
        height: auto;
        order: 2;
        box-shadow: none;
        background-color: #fff;
    }

    .philosophy-text h2 {
        font-size: 22px;
        text-align: center;
    }

    .philosophy-text p {
        font-size: 16px;
        text-align: center;
    }

    .banner-image {
        height: 250px;
        order: 1;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        padding: 80px 20px 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }

    .main-nav.active {
        display: block;
        animation: fadeIn 0.3s ease forwards;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 15px 0;
        text-align: center;
    }

    .main-nav a {
        font-size: 18px;
        padding: 12px 20px;
        display: inline-block;
        width: 100%;
        transition: all 0.3s ease;
    }

    .main-nav a:hover, .main-nav a.active {
        color: var(--primary-color, #0056b3);
        background-color: rgba(0, 86, 179, 0.05);
        border-radius: 4px;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .products-container {
        flex-direction: column;
        padding-top: 0;
    }

    .sidebar {
        width: 100%;
        order: 1;
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
    }

    .sidebar h3 {
        font-size: 18px;
        text-align: center;
        margin-bottom: 15px;
        position: relative;
    }

    .category-list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .category-list::-webkit-scrollbar {
        height: 4px;
    }

    .category-list::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }

    .category-list li {
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    .category-list a {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
        background-color: #f1f3f5;
    }

    .products-grid {
        order: 2;
        padding: 20px 15px;
    }

    .products-header {
        margin-bottom: 20px;
        justify-content: center;
    }

    .products-header h2 {
        font-size: 20px;
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .product-card {
        margin-bottom: 15px;
        height: 100%;
    }

    .product-image {
        height: 160px;
    }

    .product-info {
        padding: 15px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .product-category {
        min-height: 35px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .philosophy-text {
        padding: 20px 15px;
    }

    .philosophy-text h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .philosophy-text p {
        font-size: 14px;
    }

    .banner-image {
        height: 200px;
    }

    .products-list {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 140px;
    }

    .products-header h2 {
        font-size: 18px;
    }

    .category-list a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 10px;
        justify-content: center;
    }
}

