/* গ্লোবাল স্টাইল ও রিসেট */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}
.store-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header h1 {
    color: #1a202c;
    margin: 0;
    font-size: 28px;
}
.store-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.category-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    background: #1a202c;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
}
.category-menu-button:hover,
.category-menu-button:focus-visible {
    background: #2d3748;
    transform: translateY(-1px);
}
.menu-icon {
    font-size: 18px;
    line-height: 1;
}

/* লাইভ সার্চ বার স্টাইল */
#liveSearchBar {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 40px;
    outline: none;
    transition: border-color 0.2s;
}
#liveSearchBar:focus {
    border-color: #3182ce;
}

/* ক্যাটাগরি সেকশন ও হেডার */
.category-section {
    margin-bottom: 40px;
}
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.category-title {
    font-size: 22px;
    color: #2d3748;
    margin: 0;
}
.view-all-link {
    color: #3182ce;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}
.view-all-link:hover {
    text-decoration: underline;
}

/* হরাইজন্টাল প্রোডাক্ট স্লাইডার (এক লাইনে ৪টি পণ্য) */
.product-slider {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.product-slider::-webkit-scrollbar {
    height: 6px;
}
.product-slider::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

/* প্রোডাক্ট কার্ড ডিজাইন */
.product-slider .product-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 250px;
}
.product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.product-image {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
}
.product-name {
    font-size: 16px;
    margin: 12px 0;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price-container {
    margin: 10px 0 15px 0;
    font-size: 15px;
}
.sale-price {
    font-weight: bold;
    color: #e53e3e;
}
.regular-price {
    text-decoration: line-through;
    color: #a0aec0;
    margin-left: 8px;
    font-size: 13px;
}
.details-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
}
.details-btn:hover {
    background: #2b6cb0;
}

/* ২-কলামের অল-প্রোডাক্ট সার্চ গ্রিড เลआউট */
.all-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.all-product-grid .product-card {
    flex: none;
    min-width: 0;
    width: 100%;
}

/* লোডার স্টাইল */
.loader {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    color: #718096;
}

/* অফ-ক্যানভাস ক্যাটাগরি ড্রয়ার */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(15, 23, 42, 0.45);
}
.category-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 21;
    display: flex;
    flex-direction: column;
    width: min(360px, 88vw);
    height: 100vh;
    box-sizing: border-box;
    padding: 24px;
    background: #fff;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}
.category-drawer.is-open {
    transform: translateX(0);
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
}
.drawer-header h2 {
    margin: 0;
    color: #1a202c;
    font-size: 22px;
}
.drawer-close-button {
    border: 0;
    background: transparent;
    color: #4a5568;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    padding: 4px 8px;
}

/* ড্রয়ার স্ক্রল কন্টেইনার */
.category-drawer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-bottom: 20px;
}
.category-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 12px;
    border-radius: 7px;
    color: #2d3748;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.category-drawer-link:hover,
.category-drawer-link:focus-visible {
    background: #ebf8ff;
    color: #2b6cb0;
}
.drawer-link-arrow {
    color: #718096;
    font-size: 18px;
}
.drawer-status {
    color: #718096;
    margin: 0;
    text-align: center;
    padding: 15px;
}

/* মোবাইল ও আইওএস এর জন্য প্রফেশনাল বডি স্ক্রল লক */
.drawer-is-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* মোবাইল রেস্পনসিভ স্টাইল */
@media (max-width: 600px) {
    .all-product-grid {
        grid-template-columns: 1fr;
    }
    .store-heading {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 10px;
    }
    header h1 {
        font-size: 22px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .category-menu-button {
        width: auto;
        padding: 9px 14px;
        font-size: 14px;
    }
}

/* ==========================================================================
   🌟 কার্ট কনফার্মেশন পপ-আপ সম্পূর্ণ ফিক্সড স্টাইল (ডেস্কটপ ও মোবাইল)
   ========================================================================== */
.cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6); /* হালকা ডার্ক ব্যাকড্রপ ইফেক্ট */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 99999; /* যেন পেজের সবকিছুর উপরে থাকে */
    backdrop-filter: blur(4px); /* ব্যাকগ্রাউন্ড হালকা ব্লার করার জন্য আধুনিক ইফেক্ট */
    animation: fadeIn 0.2s ease-out;
}

.cart-popup-box {
    background: #ffffff; 
    padding: 30px; 
    border-radius: 12px;
    max-width: 420px; 
    width: 90%; 
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    animation: slideUp 0.25s ease-out;
}

.cart-popup-box h3 { 
    margin-top: 0; 
    color: #1a202c; 
    font-size: 22px;
    font-weight: 700;
}

.cart-popup-box p {
    color: #4a5568;
    font-size: 15px;
    margin: 10px 0 20px 0;
}

.cart-popup-actions { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
}

/* বাটন স্টাইল */
.popup-btn-secondary { 
    background: #edf2f7; 
    color: #4a5568; 
    border: 0; 
    padding: 12px 20px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 15px;
    transition: background 0.2s;
}
.popup-btn-secondary:hover {
    background: #e2e8f0;
}

.popup-btn-primary { 
    background: #3182ce; 
    color: #ffffff; 
    border: 0; 
    padding: 12px 20px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 15px;
    text-decoration: none; 
    transition: background 0.2s;
}
.popup-btn-primary:hover {
    background: #2b6cb0;
}

/* স্মুথ অ্যানিমেশন ইফেক্ট */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 📱 মোবাইল স্ক্রিনের জন্য বিশেষ রেস্পনসিভ অ্যাডজাস্টমেন্ট */
@media (max-width: 480px) {
    .cart-popup-box {
        padding: 24px 20px;
    }
    .cart-popup-box h3 {
        font-size: 19px;
    }
    .cart-popup-actions {
        flex-direction: column; /* মোবাইলে বাটন নিচে নিচে আসবে */
        gap: 10px;
    }
    .popup-btn-secondary, .popup-btn-primary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}
