/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f9fc;
    color: #333;
}

/* Header Styling */
header {
    background-color: #0288d1; 
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 4%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Logo & Text Container Styling */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none; 
    color: white;
    gap: 15px; 
}

/* কম্পিউটারের জন্য লোগো সর্বোচ্চ বড় করা হলো */
#site-logo {
    height: 90px !important; 
    width: auto !important;
    max-height: 90px !important;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 28px; 
    font-weight: bold;
    letter-spacing: 0.5px;
    white-space: nowrap; 
}

/* Navigation Menu */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 10px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-weight: 500;
    font-size: 16px;
    transition: 0.3s;
}

.nav-links a:hover, .cart-icon-btn:hover {
    background-color: #00b0ff; 
    border-radius: 4px;
}

.cart-icon-btn {
    background: #00b0ff;
    border-radius: 4px;
    margin-left: 5px;
    padding: 10px 15px !important;
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 150px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    z-index: 10;
    border-radius: 4px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
}

.dropdown-content a:hover {
    background-color: #e1f5fe;
    color: #0288d1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main Content Layout */
.main-container {
    display: flex;
    width: 100%; 
    padding: 25px 4%;
    gap: 30px;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    color: #0288d1;
    border-bottom: 2px solid #b3e5fc;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 18px;
}

.sidebar-section a {
    display: block;
    color: #555;
    text-decoration: none;
    padding: 8px 5px;
    font-size: 15px;
    transition: 0.2s;
    border-radius: 4px;
}

.sidebar-section a:hover {
    background-color: #e1f5fe;
    color: #0288d1;
    padding-left: 10px;
}

/* Product Content Area */
.content {
    flex: 1;
}

#category-title {
    margin-bottom: 20px;
    color: #0288d1;
    font-size: 24px;
}

/* Desktop Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e1f5fe;
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(2, 136, 209, 0.2);
}

.product-card img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
}

.product-card h4 {
    margin: 12px 0 5px 0;
    font-size: 16px;
}

.product-card .price {
    color: #0288d1;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 12px;
}

.buy-btn {
    background-color: #0288d1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: 0.3s;
}

/* Sliding Cart Sidebar & Modal */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1500;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.cart-sidebar.open {
    right: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    position: relative;
}

form input, form textarea, form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #b3e5fc;
    border-radius: 4px;
}

/* =======================================================
   MOBILE RESPONSIVE SCREEN RULES (মোবাইলের জন্য বিশেষ কোড)
   ======================================================= */
@media (max-width: 768px) {
    header {
        flex-direction: column; 
        gap: 15px;
        padding: 15px 2%;
        text-align: center;
    }

    nav {
        width: 100%;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 5px;
    }

    .nav-links a {
        padding: 6px 8px;
        font-size: 14px; 
    }

    /* মোবাইলের জন্যও লোগোটি সর্বোচ্চ বড় (80px) করা হলো */
    #site-logo {
        height: 80px !important; 
        max-height: 80px !important;
    }

    .logo-text {
        font-size: 26px;
    }

    .main-container {
        flex-direction: column; 
        padding: 15px 3%;
        gap: 20px;
    }

    .sidebar {
        width: 100%; 
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px;
    }

    .product-card {
        padding: 10px;
    }

    .product-card img {
        height: 130px; 
    }

    .product-card h4 {
        font-size: 13px;
    }
    
    .product-card .price {
        font-size: 15px;
    }
}