@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding-top: 60px; /* Space for fixed header */
    overflow-x: hidden;
}

/* Header */
.top-header {
    height: 60px;
    z-index: 1030;
}

.logo-img {
    height: 40px;
    object-fit: contain;
}

.search-group {
    border-radius: 20px;
    border: 2px solid #167389;
    overflow: hidden;
    background: #fff;
}

.search-dropdown-btn {
    background-color: #f8f9fa;
    border: none;
    border-right: 1px solid #ddd;
    color: #333;
    padding: 0 15px;
}

.search-dropdown-btn:focus {
    box-shadow: none;
}

.search-input {
    border: none;
    box-shadow: none !important;
}

.search-btn {
    background-color: #167389;
    border: none;
    padding: 0 20px;
    color: white;
}

.search-btn:hover {
    background-color: #125e70;
}

.icon-link {
    color: #333;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s;
}

.icon-link:hover {
    color: #167389;
}

/* Layout */
.main-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1020;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-arrow,
.sidebar.collapsed .sidebar-footer {
    display: none;
}

.sidebar.collapsed .category-list li a {
    text-align: center;
    padding: 15px 0;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .sidebar-icon {
    margin-right: 0;
}

.sidebar-inner {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-list li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s, color 0.3s;
}

.category-list li a:hover, .category-list li.active a {
    background-color: #e6f3f5;
    color: #167389;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    object-fit: contain;
}

.arrow-icon {
    font-size: 10px;
    color: #aaa;
    margin-left: auto;
}

.sidebar-footer {
    margin-top: auto;
}

.action-link {
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    transition: color 0.3s;
}

.action-link:hover {
    color: #167389;
}

.action-icon {
    background: #f0f8ff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: #167389;
    font-size: 16px;
}

/* Main Content */
.content-area {
    flex-grow: 1;
    padding: 20px 30px;
    background-color: #f0f2f5;
    min-width: 0; /* Important for flex child to not overflow */
}

/* Video Card */
.video-card {
    cursor: pointer;
    background: #000;
}

.video-card img {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover img {
    opacity: 1;
}

.video-title {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    font-size: 12px;
}

/* Service Tabs */
.btn-tab {
    background: white;
    border: 1px solid #ddd;
    color: #555;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-tab:hover {
    border-color: #167389;
    color: #167389;
}

.btn-tab.active {
    background-color: #167389;
    color: white;
    border-color: #167389;
}

/* Product Card */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

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

.price {
    color: #e5004f;
    font-weight: 700;
}

.product-title {
    font-size: 13px;
    color: #333;
}

.rating-sold {
    font-size: 11px;
}

.hot-badge {
    font-size: 10px;
    padding: 3px 6px;
}

.see-all-link {
    color: #167389;
    font-size: 14px;
}

/* Product Details Page */
.product-gallery-main {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.product-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}
.product-thumbnails img.active {
    border: 2px solid #167389;
}
.variant-btn {
    border: 1px solid #ddd;
    background: white;
    padding: 5px 15px;
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    transition: all 0.2s;
}
.variant-btn:hover, .variant-btn.active {
    border-color: #167389;
    color: #167389;
    background: #f0f8ff;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
}
.qty-btn {
    border: 1px solid #ddd;
    background: #f8f9fa;
    width: 35px;
}

.btn-add-cart {
    background-color: #167389;
    color: white;
    border: none;
}
.btn-add-cart:hover {
    background-color: #125e70;
    color: white;
}
.btn-buy-now {
    background-color: #2b91c8;
    color: white;
    border: none;
}
.btn-buy-now:hover {
    background-color: #217ba8;
    color: white;
}

.spec-table th {
    width: 30%;
    background-color: #f9f9f9;
    font-weight: 500;
}

/* Dashboard */
.dashboard-menu .list-group-item {
    border: none;
    padding: 12px 20px;
    color: #555;
    border-left: 3px solid transparent;
}
.dashboard-menu .list-group-item:hover, .dashboard-menu .list-group-item.active {
    background-color: #f8f9fa;
    color: #167389;
    border-left-color: #167389;
    font-weight: 500;
}

/* Static Pages (About, Contact, etc) */
.static-page-header {
    background: #fff;
    padding: 40px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
}

/* Footer */
.footer {
    border-top: 1px solid #ddd;
}

.hover-primary:hover {
    color: #167389 !important;
}

.brand-logo {
    object-fit: contain;
}

/* Responsive adjustments */
.sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1015; /* Below sidebar (1020), above content */
    display: none;
}
.sidebar-overlay.show {
    display: block;
}

.mobile-search-bar {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1025;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1020;
        width: 250px !important; /* Ensure it's full width on mobile when open */
    }
    .sidebar.show {
        left: 0;
    }
    .sidebar.collapsed {
        left: -250px; /* Hide completely on mobile even if collapsed class is present */
    }
    .sidebar.collapsed.show {
        left: 0; /* But show it fully if toggled open */
        width: 250px !important;
    }
    .sidebar.collapsed.show .sidebar-text,
    .sidebar.collapsed.show .sidebar-arrow,
    .sidebar.collapsed.show .sidebar-footer {
        display: block; /* Show text on mobile */
    }
    .sidebar.collapsed.show .category-list li a {
        justify-content: flex-start;
        padding: 10px 20px;
    }
    .sidebar.collapsed.show .sidebar-icon {
        margin-right: 15px;
    }

    .content-area {
        padding: 15px 10px;
    }
    
    .product-card .card-img-top {
        height: 140px; /* Smaller images on mobile */
    }
}

