/* 1. Basic Reset */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}

/* 2. Main Header Layout */
.main-header {
    background: #ffffff;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
}

/* 3. Branding Section */
.brand-box { display: flex; align-items: center; gap: 12px; flex: 1; }
.main-logo { height: 50px; width: auto; transition: transform 0.3s ease; }
.main-logo:hover { transform: scale(1.05); }
.brand-name { 
    font-size: 20px; 
    font-weight: 800; 
    color: #1e3a8a; 
    white-space: nowrap; 
    letter-spacing: -0.5px;
}

/* 4. Centered Search Bar */
.search-wrapper { flex: 2; display: flex; justify-content: center; padding: 0 50px; }
.search-bar { position: relative; width: 100%; max-width: 700px; }
.search-bar input {
    width: 100%; 
    padding: 12px 60px 12px 25px;
    border: 2px solid #e5e7eb; 
    border-radius: 50px;
    font-size: 15px; 
    outline: none; 
    transition: all 0.3s ease;
    background: #f9fafb;
}
.search-bar input:focus { 
    border-color: #1e3a8a; 
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}
.search-submit {
    position: absolute; right: 6px; top: 6px;
    background: #1e3a8a; 
    color: white; 
    border: none;
    width: 40px; height: 40px; 
    border-radius: 50%; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.search-submit:hover { background: #111827; }

/* 5. User Action Buttons */
.user-actions { flex: 1; display: flex; justify-content: flex-end; gap: 12px; }
.btn { 
    padding: 10px 24px; 
    border-radius: 6px; 
    border: none; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 14px;
    transition: 0.2s;
}
.login-btn { background: #f3f4f6; color: #374151; }
.login-btn:hover { background: #e5e7eb; }
.register-btn { background: #ff6600; color: white; }
.register-btn:hover { background: #e65c00; box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2); }

/* 6. Sub Navigation */
.sub-nav { background: #1e3a8a; padding: 8px 0; }
.sub-nav-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* 7. Product Gallery (Home Page) */
.product-gallery {
    padding: 50px 0;
    background-color: #f9f9f9;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.product-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.product-image {
    position: relative;
    height: 220px;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.product-info { padding: 20px; }
.product-name { font-size: 18px; font-weight: 700; color: #222; margin-bottom: 8px; }
.price { font-size: 20px; font-weight: 800; color: #1e3a8a; }

/* 8. Product Details Page (Show Page) */
.product-details { padding: 60px 0; background: #fff; }
.details-wrapper { display: flex; flex-wrap: wrap; gap: 50px; align-items: flex-start; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Left Side: Fixed 400px Image */
.product-visuals { flex: 0 0 400px; }
.product-visuals img {
    width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* Right Side: Content */
.product-content { flex: 1; min-width: 300px; }
.breadcrumb { font-size: 14px; color: #888; margin-bottom: 10px; }
.product-title { font-size: 32px; font-weight: 800; color: #111827; margin-bottom: 15px; }
.product-price { font-size: 30px; color: #1e3a8a; font-weight: 800; margin-bottom: 20px; }

/* Action Buttons */
.action-buttons { display: flex; gap: 15px; margin-top: 35px; }
.add-to-cart-btn {
    background: #ff9f00;
    color: white;
    padding: 16px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}
.add-to-cart-btn:hover { background: #e68a00; }

.order-now-btn {
    background: #fb641b;
    color: white;
    padding: 16px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}
.order-now-btn:hover { background: #e55310; }

/* 9. Success Card & Misc */
.stock-status { margin-bottom: 15px; }
.in-stock { color: #16a34a; font-weight: 700; background: #f0fdf4; padding: 4px 10px; border-radius: 4px; font-size: 14px; }

/* Responsive Mobile */
@media (max-width: 992px) {
    .product-visuals { flex: 0 0 100%; display: flex; justify-content: center; }
    .product-visuals img { width: 100%; max-width: 400px; }
}
@media (max-width: 768px) {
    .action-buttons { flex-direction: column; }
    .header-container { flex-direction: column; gap: 15px; }
    .search-wrapper { padding: 0; width: 100%; }
}

/* Modal Form Styling */
.popup-form label {
    font-weight: 600;
    color: #4b5563;
    display: block;
    margin-bottom: 5px;
}

.popup-form input, .popup-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
}

.modal-header {
    background: #1e3a8a;
    color: white;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* স্লাইডারের উচ্চতা এবং রেসপন্সিভ সাইজ */
.slider-fixed-height {
    height: 380px !important; /* আপনি চাইলে ৩৫০px থেকে ৪৫০px এর মধ্যে রাখতে পারেন */
    object-fit: cover !important; /* ছবি চ্যাপ্টা হবে না, ক্রপ হয়ে ফিট হবে */
}

/* টাইটেল এবং ক্যাপশন ডিজাইন */
.carousel-caption {
    background: rgba(0, 0, 0, 0.45); /* কালো হালকা আবরণ যেন টেক্সট পরিষ্কার দেখা যায় */
    padding: 15px 25px;
    border-radius: 10px;
    bottom: 12% !important;
    left: 10%;
    text-align: left;
    width: fit-content;
    max-width: 80%;
}

.carousel-caption h5 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffc107; /* সোনালী কালার টাইটেল */
    margin-bottom: 5px;
}

/* মোবাইলের জন্য স্লাইডার ছোট করা */
@media (max-width: 768px) {
    .slider-fixed-height {
        height: 200px !important;
    }
    .carousel-caption h5 {
        font-size: 1rem;
    }
    .col-md-5 {
        display: none; /* মোবাইলে সাইড অ্যাড লুকিয়ে রাখা ভালো, অথবা নিচে নিতে পারেন */
    }
}

/* Product Detail Container */
.product-detail-container {
    padding: 40px 0;
    background-color: #ffffff;
}

/* Image Gallery Styling */
.main-product-img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
}

.thumb-img-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.thumb-img:hover, .thumb-img.active {
    border-color: #1e3a8a;
}

/* Product Info Styling */
.product-title-detail {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.product-price-detail {
    font-size: 24px;
    color: #1e3a8a;
    font-weight: 800;
    margin-bottom: 20px;
}

.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    color: #555;
    font-size: 15px;
}

.payment-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-box {
    border: 2px solid #e2e8f0;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
    position: relative;
}

.payment-box input {
    position: absolute;
    opacity: 0;
}

.payment-box.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.payment-box:hover {
    border-color: #cbd5e1;
}

/* স্টিকি হওয়ার স্টাইল */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff; /* আপনার থিমের সাথে মিল রেখে কালার দিন */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* হালকা শ্যাডো যাতে আলাদা বোঝা যায় */
    transition: all 0.3s ease; /* স্মুথ ট্রানজিশন */
}

/* হেডার ফিক্সড হলে নিচের কন্টেন্ট যেন উপরে উঠে না যায় তার জন্য প্যাডিং */
.content-padding {
    padding-top: 80px; /* আপনার হেডারের হাইট অনুযায়ী এটি অ্যাডজাস্ট করুন */
}

/* Live Search Results Dropdown */
#search-results {
    position: absolute;
    top: 100%; /* সার্চ বারের ঠিক নিচ থেকে শুরু হবে */
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.search-results-list li:last-child {
    border-bottom: none;
}

.search-results-list li:hover {
    background: #f9fafb;
}

.search-results-list li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #374151;
}

.search-results-list li img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.search-results-list li span {
    font-size: 14px;
    font-weight: 600;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    z-index: 9999; /* যেন এটি স্লাইডারের উপরে থাকে */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Action Icons Styling */
.action-item {
    position: relative;
    font-size: 22px;
    color: #1e3a8a;
    text-decoration: none;
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.action-item:hover {
    transform: scale(1.1);
    color: #ff6600; /* হোভার করলে আপনার ব্র্যান্ডের কমলা রঙ হবে */
}

/* Badge Styling (সংখ্যা দেখানোর জন্য) */
.action-item .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff6600;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid #fff;
}