

/* =========================================
   ১. ভেরিয়েবল এবং বেসিক রিসেট
   ========================================= */
:root {
    --brand-color: #F42790; /* ইমোশনাল পিংক */
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--gray);
    color: var(--dark);
    
    /* [CRITICAL FIX] হেডার ফিক্সড হওয়ার কারণে কন্টেন্ট যাতে নিচে না যায় */
    padding-top: 80px;  
    
    /* মোবাইলে নিচের নেভিগেশনের জন্য জায়গা */
    padding-bottom: 80px; 
}

/* কন্টেইনার সেটআপ */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   ২. মেইন হেডার ডিজাইন (ইউনিভার্সাল)
   ========================================= */
.main-header {
    background: var(--brand-color);
    color: white;
    padding: 0; /* প্যাডিং ফ্লেক্স দিয়ে হ্যান্ডেল হবে */
    box-shadow: 0 2px 10px rgba(244, 39, 144, 0.3);
    
    /* হেডার ফিক্সড রাখার কোড */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* ফিক্সড হাইট */
    z-index: 1000;
    
    /* আইটেমগুলো মাঝখানে রাখার জন্য */
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* কন্টেইনারের পুরোটা নিবে */
}

.logo h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

/* ডেস্কটপ মেনু লিংক */
.desktop-menu a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    font-size: 16px;
    transition: 0.3s;
}

.desktop-menu a:hover, .desktop-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
}

.desktop-icons a {
    color: white;
    margin-left: 15px;
    font-size: 18px;
    position: relative;
    text-decoration: none;
}

/* =========================================
   ৩. মোবাইল বটম নেভিগেশন (ফিক্সড)
   ========================================= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--light);
    height: 65px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.nav-item {
    text-decoration: none;
    color: #888;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.nav-item.active {
    color: var(--brand-color);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

/* নোটিফিকেশন ব্যাজ (লাল গোল্লা) */
.badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: white;
    color: var(--brand-color);
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: bold;
    min-width: 15px;
    text-align: center;
}

/* =========================================
   ৪. হোমপেজ স্টাইল (কার্ড ও গ্রিড)
   ========================================= */
.hero-section {
    padding: 20px 0;
    text-align: center;
}

.hero-section h3 {
    color: var(--brand-color);
    margin-bottom: 5px;
}

/* প্রোডাক্ট গ্রিড - মোবাইলে ২ কলাম */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    padding-bottom: 20px;
}

/* প্রোডাক্ট কার্ড */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(244, 39, 144, 0.2);
    border-color: var(--brand-color);
}

.product-image {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand-color);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
}

.product-info {
    padding: 12px;
    text-align: center;
}

.product-info h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    margin-bottom: 10px;
}

.new-price {
    font-weight: bold;
    color: var(--brand-color);
    font-size: 16px;
    margin-right: 5px;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

.add-to-cart-btn {
    background: var(--dark);
    color: white;
    border: none;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* =========================================
   ৫. প্রোডাক্ট ডিটেইলস পেজ ডিজাইন
   ========================================= */

/* ডিটেইলস কন্টেইনার */
.product-details-container {
    padding-bottom: 150px; /* মোবাইলে নিচে বাটনের জন্য জায়গা */
}

/* ডিটেইলস ইমেজ */
.detail-image {
    width: 100%;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    padding: 10px;
    border: 1px solid #eee;
}

.detail-image img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

/* ডিটেইলস টেক্সট */
.p-title {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--dark);
}

.p-price-box {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.p-new-price {
    font-size: 26px;
    font-weight: bold;
    color: var(--brand-color);
    margin-right: 10px;
}

.p-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-right: 15px;
}

.stock-status {
    background: #fff0f0;
    color: #e74c3c;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.p-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ডেলিভারি বক্স */
.delivery-info {
    display: inline-flex; /* লেখার মাপে */
    gap: 15px;
    margin: 20px 0;
    background: white;
    padding: 12px 20px;
    border-radius: 10px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.d-item {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.d-item i {
    color: var(--brand-color);
}

/* অ্যাকশন বাটন এরিয়া - ডিফল্ট (মোবাইল) */
.action-buttons-area {
    position: fixed;
    bottom: 65px; /* বটম বারের উপরে */
    left: 0;
    width: 100%;
    background: white; 
    padding: 10px 15px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    z-index: 900;
    border-top: 1px solid #eee;
}

.btn-cart, .btn-buy {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-cart {
    background: #fdf0f6;
    color: var(--brand-color);
    border: 1px solid var(--brand-color);
}

.btn-buy {
    background: var(--brand-color);
    color: white;
}

.btn-cart:active, .btn-buy:active {
    transform: scale(0.98);
}

/* =========================================
   ৬. কার্ট পেজ ডিজাইন
   ========================================= */
.cart-page {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.page-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark);
    margin-top: 20px;
}

.empty-cart {
    text-align: center;
    padding: 50px 0;
    color: #888;
}

.cart-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.c-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
}

.c-img img { width: 100%; height: 100%; object-fit: cover; }

.c-info { flex: 1; }
.c-info h4 { font-size: 14px; margin-bottom: 5px; }
.c-price { font-size: 12px; color: #666; }
.c-total { font-weight: bold; color: var(--brand-color); font-size: 13px; }

.remove-btn {
    color: #e74c3c;
    background: #fff0f0;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    text-decoration: none;
}

/* কার্ট সামারি (টোটাল) - মোবাইলে ফিক্সড */
.cart-summary {
    background: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    position: fixed;
    bottom: 65px; /* মেনুর উপরে */
    left: 0;
    width: 100%;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 900;
}

.total-row {
    display: flex; justify-content: space-between;
    font-size: 18px; font-weight: bold;
    margin-bottom: 15px;
}
.total-amount { color: var(--brand-color); }

/* অ্যানিমেশন */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* =========================================
   ৭. রেসপন্সিভ ডিজাইন (Media Queries)
   ========================================= */

/* --- ডেস্কটপ এবং ল্যাপটপ (min-width: 769px) --- */
@media (min-width: 769px) {
    /* ১. মোবাইল বটম মেনু এবং মোবাইল টপ বার লুকানো */
    .mobile-only, .mobile-bottom-nav {
        display: none !important;
    }

    /* ২. ডেস্কটপ হেডার দেখানো */
    .desktop-only {
        display: block !important;
    }

    /* ৩. বডি প্যাডিং ফিক্স (ডেস্কটপে নিচের মেনু নেই) */
    body {
        padding-top: 90px; /* হেডার একটু বড় হতে পারে */
        padding-bottom: 0;
    }

    /* ৪. প্রোডাক্ট গ্রিড - ৪ কলাম */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    /* ৫. প্রোডাক্ট ডিটেইলস পেজ */
    .product-details-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 30px;
        padding-bottom: 50px;
    }

    .detail-image {
        height: 500px;
    }

    /* ডেস্কটপে বাটন ফিক্স হবে না, লেখার নিচে থাকবে */
    .action-buttons-area {
        position: static;
        box-shadow: none;
        padding: 0;
        margin-top: 30px;
        border: none;
        width: auto;
        background: transparent;
    }

    .btn-cart, .btn-buy {
        flex: none;
        width: 200px;
    }

    /* ৬. কার্ট পেজ ডেস্কটপ */
    .cart-summary {
        position: static;
        margin-top: 20px;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }
}

/* --- মোবাইল ডিভাইস (max-width: 768px) --- */
@media (max-width: 768px) {
    /* ১. ডেস্কটপের মেনু ও আইকন লুকানো */
    .desktop-menu, .desktop-icons {
        display: none !important;
    }

    /* ২. লোগো মাঝখানে আনা */
    .header-content {
        justify-content: center !important;
    }

    /* ৩. লোগো সাইজ কমানো */
    .logo h2 {
        font-size: 18px;
    }
    
    /* ৪. বডি প্যাডিং মোবাইলের হেডারের জন্য কমানো */
    body {
        padding-top: 70px; /* মোবাইল হেডারের উচ্চতা + একটু গ্যাপ */
    }
    
    .main-header {
        height: 60px; /* মোবাইল হেডারের উচ্চতা */
    }
}

/* =========================================
   ৮. স্কয়ার ইমেজ ফিক্স (Square Image Fix)
   ========================================= */

/* হোমপেজের প্রোডাক্ট ইমেজ স্কয়ার করা */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* ১:১ রেশিও মানেই স্কয়ার */
    height: auto; /* আগের ফিক্সড হাইট বাতিল */
}

/* ডিটেইলস পেজের ইমেজ স্কয়ার করা */
.detail-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    padding: 0; /* প্যাডিং থাকলে স্কয়ার নষ্ট হতে পারে */
}

/* কার্ট পেজের ইমেজ স্কয়ার করা */
.c-img {
    width: 80px;
    height: 80px; /* হাইট এবং উইডথ সমান */
    flex-shrink: 0;
}

/* সব ছবি যেন চ্যাপ্টা না হয়ে যায় */
.product-image img, 
.detail-image img, 
.c-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ছবি ক্রপ করে স্কয়ারে ফিট করবে */
}


/* =========================================
   ৯. মডার্ন কার্ট কন্ট্রোল (Quantity Buttons)
   ========================================= */

/* কার্ট আইটেম সাজানো */
.cart-item {
    display: flex;
    align-items: flex-start; /* উপরে সমান থাকবে */
    padding: 15px;
    gap: 15px;
}

.c-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* কোয়ান্টিটি এবং ডিলেট গ্রুপ */
.qty-action-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

/* প্লাস-মাইনাস বাটনের বক্স (Capsule Design) */
.qty-control {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 2px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

/* প্লাস-মাইনাস বাটন */
.qty-btn {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.qty-btn:active {
    transform: scale(0.9);
    background: var(--brand-color);
    color: white;
}

/* মাঝখানের সংখ্যা */
.qty-val {
    width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--dark);
}

/* ডিলিট আইকন */
.remove-icon {
    color: #999;
    font-size: 16px;
    padding: 5px;
    transition: 0.3s;
}

.remove-icon:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

/* আইটেমের মোট দাম (ডান পাশে) */
.c-total-price {
    font-weight: bold;
    font-size: 15px;
    color: var(--brand-color);
    align-self: flex-start;
}


/* মোবাইল ব্যাজ ডিজাইন ফিক্স */
.mobile-badge {
    position: absolute;
    top: -5px;      /* আইকনের একটু উপরে */
    right: -10px;   /* আইকনের ডান পাশে */
    background: #F42790; /* ব্র্যান্ড কালার */
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    border: 2px solid white; /* সাদা বর্ডার দিলে দেখতে সুন্দর লাগে */
    min-width: 18px; /* যাতে গোল থাকে */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
}

/* =========================================
   Product Page Buttons (Classic Pink Design)
   ========================================= */

/* বাটনের এরিয়া */
.action-buttons-area {
    display: flex;
    gap: 15px; /* মাঝখানের গ্যাপ */
    margin-top: 20px;
}

/* কমন বাটন স্টাইল */
.btn-cart, .btn-buy {
    flex: 1; /* সমান জায়গা নেবে */
    padding: 12px;
    border-radius: 8px; /* একটু রাউন্ডেড */
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* আইকন ও লেখার মাঝখানে গ্যাপ */
}

/* কার্টে নিন বাটন (সাদা ব্যাকগ্রাউন্ড, পিংক বর্ডার) */
.btn-cart {
    background: #fff0f6; /* খুব হালকা পিংক */
    color: #F42790;       /* ব্র্যান্ড কালার */
    border: 1px solid #F42790;
}

.btn-cart:hover {
    background: #ffe6f0;
}

/* এখনই কিনুন বাটন (সলিড পিংক) */
.btn-buy {
    background: #F42790;
    color: white;
    border: 1px solid #F42790;
}

.btn-buy:hover {
    background: #d61c7a; /* একটু গাঢ় পিংক */
}

/* মোবাইল রেসপন্সিভ (ফিক্সড বটম) */
@media (max-width: 768px) {
    .action-buttons-area {
        position: fixed;
        bottom: 65px; /* মেনু বারের ঠিক উপরে */
        left: 0;
        width: 100%;
        background: white;
        padding: 10px 15px;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
        z-index: 900;
        margin-top: 0;
    }
}

/* =========================================
   Universal Modern Button (Final Fix)
   ========================================= */

.btn-modern-action {
    /* ডিসপ্লে এবং অ্যালাইনমেন্ট */
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 10px; /* আইকন ও লেখার মাঝে গ্যাপ */
    
    /* সাইজ ও শেপ */
    padding: 12px 35px;
    border-radius: 50px;
    margin: 20px auto; /* সেইফটি মার্জিন */
    
    /* কালার ও ডিজাইন */
    background: linear-gradient(135deg, #F42790 0%, #d61c7a 100%);
    color: white !important; /* লেখার কালার সাদা ফিক্সড */
    
    /* টেক্সট স্টাইল (আন্ডারলাইন রিমুভ) */
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1; /* হাইট ফিক্স */
    
    /* শ্যাডো ও বর্ডার */
    box-shadow: 0 8px 20px rgba(244, 39, 144, 0.3);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* হোভার এফেক্ট */
.btn-modern-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(244, 39, 144, 0.5);
    background: linear-gradient(135deg, #d61c7a 0%, #F42790 100%);
    color: white !important;
}

/* ক্লিক এফেক্ট */
.btn-modern-action:active {
    transform: scale(0.95);
    box-shadow: 0 5px 10px rgba(244, 39, 144, 0.2);
}


