/* =========================================
   ১. প্রোডাক্ট কার্ড বেসিক ডিজাইন (Home/Category)
   ========================================= */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    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;
    width: 100%;
    aspect-ratio: 1 / 1; /* স্কয়ার */
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ডিসকাউন্ট ট্যাগ */
.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand-color);
    color: white;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

/* =========================================
   ২. উইশলিস্ট বাটন (Heart Icon)
   ========================================= */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 16px;
    color: #888;
    transition: all 0.3s ease;
    z-index: 10;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn.active {
    color: #ff0000;
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* =========================================
   ৩. রেটিং এবং ইনফো
   ========================================= */
.product-info {
    padding: 12px;
    text-align: center;
}

.rating-box {
    text-align: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.stars { color: #FFD700; }
.rating-num { color: #999; font-size: 10px; margin-left: 4px; }

/* =========================================
   ৪. অ্যাকশন বাটন গ্রুপ (হোমপেজ কার্ডের জন্য)
   ========================================= */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    align-items: center;
}

/* বড় বাটন (এখনই কিনুন - Glossy Effect) */
.btn-buy-now {
    flex: 1;
    height: 40px; /* ফিক্সড হাইট */
    background-color: #1a1a1a;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy-now span.main-text {
    font-size: 12px;
    font-weight: 700;
    position: relative;
    z-index: 5;
}

.btn-badge {
    font-size: 9px;
    color: #FFD700;
    line-height: 1;
    margin-top: 1px;
    position: relative;
    z-index: 5;
}

/* শাইন এনিমেশন (Slow) */
.btn-buy-now::before {
    content: "";
    position: absolute;
    top: 0; left: -150px; width: 60px; height: 100%;
    background-image: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%);
    opacity: 0.7; z-index: 2; pointer-events: none;
    animation: shinyLoop 5s infinite linear;
}

@keyframes shinyLoop {
    0% { left: -150px; }
    40% { left: 200%; }
    100% { left: 200%; }
}

/* ছোট কার্ট বাটন */
.btn-add-cart-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-add-cart-icon:active {
    background: #F42790;
    transform: scale(0.95);
}

/* =========================================
   ৫. প্রোডাক্ট ডিটেইলস লেআউট (New 50-50 Grid)
   ========================================= */

/* মেইন গ্রিড কন্টেইনার */
.product-details-container {
    display: grid;
    /* ডেস্কটপে দুই কলাম সমান জায়গা নেবে */
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

/* বাম পাশ: ইমেজ (স্কয়ার এবং ফ্রেম ভর্তি) */
.detail-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* স্কয়ার */
    background: #ffffff;
    border-radius: 15px;
    padding: 0; /* প্যাডিং নেই */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ফ্রেম ভর্তি ছবি */
    display: block;
    transition: transform 0.5s ease;
}

.detail-image:hover img {
    transform: scale(1.1);
}

/* ডান পাশ: ইনফো টেবিল */
.product-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* =========================================
   ৬. ইনফো টেবিল ডিজাইন (Pink Box)
   ========================================= */
.info-table-container {
    background: #fff0f6; /* পিংক ব্যাকগ্রাউন্ড */
    border-radius: 15px;
    padding: 20px;
    border: 1px dashed var(--brand-color);
    flex-grow: 1; /* হাইট এডজাস্ট করবে */
}

.product-info-table {
    width: 100%;
    border-collapse: collapse;
}

.product-info-table td {
    padding: 12px 10px;
    vertical-align: top;
    border-bottom: 1px solid rgba(244, 39, 144, 0.1);
    font-size: 14px;
    color: #555;
}

.product-info-table tr:last-child td {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    width: 30%;
    color: var(--brand-color);
    white-space: nowrap;
}

.info-value {
    width: 70%;
    line-height: 1.6;
}

/* রিড মোর বাটন */
.desc-content {
    max-height: 80px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}
.desc-content.expanded { max-height: none; }

.read-more-btn {
    background: none; border: none;
    color: var(--brand-color); font-size: 12px; font-weight: bold;
    cursor: pointer; padding: 5px 0; margin-top: 5px;
}

/* ডেলিভারি আইকন লিস্ট */
.table-delivery-list { display: flex; flex-wrap: wrap; gap: 8px; }
.t-d-item {
    font-size: 11px; background: white; padding: 4px 8px;
    border-radius: 15px; border: 1px solid #fbd0e4;
    display: flex; align-items: center; gap: 4px; color: #555;
}
.t-d-item i { color: var(--brand-color); }

/* =========================================
   ৭. সাজেশন স্লাইডার (Horizontal Scroll)
   ========================================= */
.related-section { margin-top: 30px; margin-bottom: 20px; }
.section-heading {
    font-size: 18px; margin-bottom: 15px;
    border-left: 4px solid var(--brand-color);
    padding-left: 10px; color: #333;
}

.scrolling-wrapper {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    gap: 15px; padding-bottom: 15px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.scrolling-wrapper::-webkit-scrollbar { display: none; }

.mini-card {
    flex: 0 0 160px; background: white; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); overflow: hidden;
    border: 1px solid #f4f4f4; transition: 0.3s;
}
.mini-img {
    height: 140px; position: relative; background: #fff;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-discount {
    position: absolute; top: 5px; left: 5px;
    background: var(--brand-color); color: white;
    font-size: 10px; padding: 2px 6px; border-radius: 10px;
}
.mini-info { padding: 10px; text-align: center; }
.mini-info h4 {
    font-size: 13px; margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-price { font-size: 14px; font-weight: bold; color: var(--brand-color); margin-bottom: 8px; }
.mini-btn {
    width: 100%; background: #fff0f6; color: var(--brand-color);
    border: 1px solid var(--brand-color); padding: 5px;
    border-radius: 6px; font-size: 11px; cursor: pointer; transition: 0.2s;
}
.mini-btn:hover { background: var(--brand-color); color: white; }






/* =========================================
   ৮. রিভিউ সেকশন (Complete: Form + Compact List)
   ========================================= */

.review-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff0f6;
    border: 1px dashed var(--brand-color);
    border-radius: 12px;
    padding-bottom: 20px;
    margin-bottom: 100px;
}

.review-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--brand-color);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(244, 39, 144, 0.2);
    padding-bottom: 8px;
}

/* --- ১. রিভিউ ফর্ম ডিজাইন (Review Form) --- */
.review-form-modern {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
}

.review-form-modern h4 {
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.rating-input-group {
    margin-bottom: 12px;
}

.star-input {
    display: flex;
    gap: 5px;
    cursor: pointer;
}

.star-input i {
    font-size: 22px;
    color: #ddd;
    transition: 0.2s;
}

.star-input i.active {
    color: #FFD700;
}

.modern-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    height: 80px;
    font-size: 13px;
    background: #f9f9f9;
    transition: 0.3s;
}

.modern-textarea:focus {
    border-color: var(--brand-color);
    background: white;
    outline: none;
}

.btn-submit-review {
    background: var(--brand-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(244, 39, 144, 0.2);
    transition: 0.3s;
}

.btn-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(244, 39, 144, 0.3);
}

/* --- ২. ধন্যবাদ মেসেজ কার্ড (Compact) --- */
.already-reviewed-card {
    background: #ffffff;
    border-left: 4px solid var(--brand-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.reviewed-icon {
    font-size: 20px;
    color: var(--brand-color);
    background: #fff0f6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reviewed-text-group {
    text-align: left;
}

.reviewed-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.reviewed-subtitle {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

/* --- ৩. রিভিউ লিস্ট কার্ড (Clean & Flat Design) --- */
.review-card {
    background: #ffffff;
    padding: 15px; /* প্যাডিং একটু বাড়ানো হলো */
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    border: 1px solid rgba(244, 39, 144, 0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.01);
    align-items: flex-start; /* উপর থেকে সমান */
}

/* অ্যাভাটার */
.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F42790 0%, #ff9a9e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0; /* চ্যাপ্টা হবে না */
}

.review-content {
    flex: 1;
}

/* রিভিউ হেডার */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.review-header h5 {
    font-size: 14px;
    margin: 0;
    color: #333;
    font-weight: 700;
}

.verified-badge {
    color: #2ecc71;
    font-size: 12px;
    margin-left: 4px;
}

.review-date {
    font-size: 11px;
    color: #999;
}

/* স্টার রেটিং */
.review-stars {
    color: #FFD700;
    font-size: 11px;
    margin-bottom: 8px;
    display: block;
}

/* --- ৪. রিড মোর লজিক (Clean Text, No Border) --- */
.review-text-content {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 5px;
    
    /* কোনো ব্যাকগ্রাউন্ড বা বর্ডার থাকবে না */
    background: transparent;
    padding: 0;
    border: none;
    
    /* হাইট লিমিট (৩ লাইন) */
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    
    /* টেক্সট যাতে সুন্দর দেখায় */
    text-align: justify;
}

/* এক্সপান্ড হলে */
.review-text-content.expanded {
    max-height: none;
}

/* রিড মোর বাটন (পিংক টেক্সট) */
.review-read-more-btn {
    background: none;
    border: none;
    color: var(--brand-color);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
    display: inline-block;
}

.review-read-more-btn:hover {
    text-decoration: underline;
}

/* --- ৫. লাইক বাটন --- */
.btn-like {
    background: #fff;
    border: 1px solid #eee;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
    margin-top: 5px;
}

.btn-like:hover {
    background: #fff0f6;
    color: var(--brand-color);
    border-color: #ffd1e8;
}

.btn-like.liked {
    background: #F42790;
    color: white;
    border-color: #F42790;
}



/* =========================================
   সাকসেস মেসেজ ডিজাইন (Modern Alert)
   ========================================= */

.success-alert-card {
    background: #ffffff;
    border-left: 5px solid #2ecc71; /* সাকসেস গ্রিন */
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.15); /* হালকা সবুজ শ্যাডো */
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInDown 0.5s ease;
}

.success-icon {
    font-size: 24px;
    color: #2ecc71;
    background: #e8f8f5;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-content h4 {
    margin: 0;
    font-size: 15px;
    color: #333;
    font-weight: 700;
}

.success-content p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #666;
}

/* এনিমেশন */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   ৯. মোবাইল রেসপন্সিভ (Media Queries)
   ========================================= */
@media (max-width: 768px) {
    /* প্রোডাক্ট ডিটেইলস গ্রিড ১ কলাম */
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* মোবাইলেও ইমেজ স্কয়ার থাকবে */
    .detail-image {
        aspect-ratio: 1 / 1;
    }

    /* ইনফো টেবিল প্যাডিং */
    .info-table-container {
        padding: 15px;
    }

    /* স্লাইডার কার্ড ছোট */
    .mini-card { flex: 0 0 140px; }
    .mini-img { height: 120px; }
}
/* =========================================
   ১০. এক্সট্রা স্মল ডিভাইস ফিক্স (Small Mobile)
   ========================================= */
@media (max-width: 480px) {
    /* কার্ডের অ্যাকশন বাটন ফিক্স */
    .card-actions {
        gap: 5px; /* গ্যাপ কমানো হলো */
    }

    .btn-buy-now {
        height: 38px; /* হাইট একটু কমানো */
    }
    
    .btn-buy-now span.main-text {
        font-size: 11px; /* ফন্ট ছোট করা */
    }
    
    .btn-badge {
        font-size: 9px;
    }

    /* কার্ট বাটন ফিক্স */
    .btn-add-cart-icon {
        width: 38px;
        height: 38px;
        flex: 0 0 38px; /* চ্যাপ্টা হওয়া আটকাবে */
        font-size: 14px;
    }

    /* সাজেশন স্লাইডার কার্ড */
    .mini-card {
        flex: 0 0 130px; /* কার্ড আরেকটু ছোট */
    }
    .mini-img {
        height: 110px;
    }
}



/* =========================================
   রিভিউ এডিট বাটন ও মডাল
   ========================================= */

/* এডিট বাটন (কলম আইকন) */
.btn-edit-review {
    background: none;
    border: none;
    color: var(--brand-color);
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    transition: 0.3s;
    background-color: #fff0f6;
}

.btn-edit-review:hover {
    background-color: var(--brand-color);
    color: white;
}

/* --- এডিট মডাল (Popup) --- */
.edit-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 5000;
    display: none; /* ডিফল্টভাবে লুকানো */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.edit-modal-box {
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 20px;
    color: #888;
    cursor: pointer;
}

.edit-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* এনিমেশন */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


/* লাইভ ভিউয়ার কাউন্টার */
.live-viewer {
    font-size: 13px;
    color: #e67e22;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.live-dot {
    width: 8px; height: 8px; background: #e67e22;
    border-radius: 50%; display: inline-block;
    animation: blink 1.5s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

