/*
Theme Name: ProtiDokan Theme
Author: Your Name
Description: Shopee Style Mobile Theme with Multi-vendor & All Categories Page
Version: 7.12
Text Domain: proti-dokan
*/

:root {
    --shopee-orange: #ee4d2d;
    --bg-gray: #f5f5f5;
    --text-color: #333;
    --border-color: #e0e0e0;
}

/* --- মোবাইলে সাইট ছোট হয়ে ডানপাশে ফাঁকা জায়গা থাকার বাগ ফিক্স ---
   কারণ: width:100% এর সাথে padding থাকা এলিমেন্টগুলো box-sizing
   ডিফল্ট (content-box) থাকায় প্রকৃত প্রস্থের চেয়ে বেশি জায়গা নিচ্ছিল,
   যার ফলে মোবাইল ব্রাউজার পুরো পেজটাকে জুম-আউট করে দেখাচ্ছিল। */
*, *::before, *::after {
    box-sizing: border-box;
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0; padding: 0;
    background-color: var(--bg-gray);
    padding-bottom: 70px; /* Bottom Menu Space */
    color: var(--text-color);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

/* --- HEADER --- */
.app-header {
    background: linear-gradient(-180deg, #f53d2d, #f63);
    padding: 10px; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-wrapper { display: flex; align-items: center; gap: 10px; }
.search-box {
    background: white; padding: 6px 10px; border-radius: 2px;
    flex-grow: 1; display: flex; align-items: center;
}
.search-box input { border: none; width: 100%; outline: none; font-size: 14px; }

/* --- SLIDER --- */
.slider-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* যাতে ভেতরের স্লাইডার কখনো পেজের বাইরে না যায় */
}
.slider-container {
    display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    overscroll-behavior-x: contain; /* স্লাইডার টেনে শেষ প্রান্তে গেলে যাতে পুরো পেজ ডানে-বামে সরে না যায় */
}
.slide {
    min-width: 100%; flex-shrink: 0; scroll-snap-align: start;
    aspect-ratio: 2.6 / 1; /* চিকন, স্ট্যান্ডার্ড ব্যানার অনুপাত */
    overflow: hidden;
    max-height: 150px; /* মোবাইলে ব্যানারের সর্বোচ্চ উচ্চতা */
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- HOME CATEGORIES --- */
.section-box { background: white; margin-bottom: 8px; padding: 10px; }
.category-scroll {
    display: flex; overflow-x: auto; gap: 15px; scrollbar-width: none; padding-bottom: 5px;
    overscroll-behavior-x: contain;
}
.cat-item { min-width: 70px; text-align: center; font-size: 11px; display: flex; flex-direction: column; align-items: center; }
.cat-icon { width: 50px; height: 50px; border-radius: 15px; border: 1px solid #eee; margin-bottom: 5px; overflow: hidden; }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }

/* --- FLASH SALE --- */
.fs-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.fs-title { color: var(--shopee-orange); font-weight: 800; font-style: italic; font-size: 16px; text-transform: uppercase; }
.fs-price { color: var(--shopee-orange); font-weight: bold; font-size: 14px; text-align: center; }

/* --- PRODUCT GRID --- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
.product-card { background: white; border: 1px solid var(--border-color); border-radius: 2px; overflow: hidden; padding-bottom: 10px; }
.p-title { font-size: 12px; line-height: 1.4; height: 34px; overflow: hidden; padding: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-price { color: var(--shopee-orange); font-size: 16px; font-weight: bold; padding: 0 5px; }
.add-btn {
    display: block; width: 90%; margin: 5px auto; background: var(--shopee-orange);
    color: white; text-align: center; padding: 5px 0; font-size: 12px; border-radius: 2px;
}

/* --- WOOCOMMERCE & PAGES FIXES --- */
.main-container { padding: 15px; background: white; min-height: 80vh; }
.woocommerce div.product .product_title { font-size: 20px; margin-top: 10px; }
.woocommerce div.product .price { color: var(--shopee-orange); font-size: 24px; font-weight: bold; }
.woocommerce button.button.alt { 
    background-color: var(--shopee-orange); color: white; width: 100%; border: none; padding: 15px; font-weight: bold;
}
.woocommerce-error, .woocommerce-info, .woocommerce-message { margin: 10px; border-top: 3px solid var(--shopee-orange); }

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: white; border-top: 1px solid #ddd;
    display: flex; justify-content: space-around;
    padding: 8px 0; z-index: 9999;
}
.nav-item { text-align: center; font-size: 10px; color: #666; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nav-item i { font-size: 18px; margin-bottom: 4px; }
.nav-item.active { color: var(--shopee-orange); }

/* --- NEW: ALL CATEGORIES PAGE DESIGN --- */
.all-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns */
    gap: 15px;
    padding: 10px 0;
}
.full-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333;
}
.cat-img-wrap {
    width: 60px; height: 60px;
    background: #f1f1f1;
    border-radius: 18px; /* Slightly rounded */
    border: 1px solid #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 5px;
    overflow: hidden;
}
.cat-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cat-name {
    font-size: 11px;
    line-height: 1.2;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-count { font-size: 10px; color: #999; margin-top: 2px; }

/* Mobile Responsive Adjustments */
@media (max-width: 400px) {
    .all-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
/* --- APP ICON MENU FIX (Daraz Style) --- */

/* পুরো সেকশনটি সাদা হবে */
.app-icon-section {
    background: #ffffff;
    padding: 15px 10px;
    margin-bottom: 10px;
}

/* গ্রিড সিস্টেম: এক লাইনে ৫টি আইকন থাকবে */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* ৫ কলাম */
    gap: 15px 8px; /* আইকনগুলোর মাঝখানের গ্যাপ */
    justify-items: center; /* সেন্টারে থাকবে */
}

/* প্রতিটি আইকন আইটেম */
.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

/* আইকনের ছবির বক্স */
.icon-img-box {
    width: 48px;  /* আইকনের সাইজ */
    height: 48px;
    border-radius: 12px; /* চারকোনা একটু গোল */
    overflow: hidden;
    margin-bottom: 5px;
    background: #f1f1f1; /* ছবি না থাকলে ধূসর দেখাবে */
}

/* আইকনের ছবি */
.icon-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* বক্সের সাথে ফিট হবে */
}

/* আইকনের নিচের লেখা */
.icon-title {
    font-size: 10px; /* ছোট ফন্ট */
    line-height: 1.2;
    color: #333;
    text-align: center;
    max-width: 100%;
    /* ২ লাইনের বেশি হলে ... দেখাবে */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* রেস্পন্সিভ ফিক্স (খুব ছোট মোবাইলের জন্য) */
@media (max-width: 350px) {
    .icon-grid {
        grid-template-columns: repeat(4, 1fr); /* খুব ছোট স্ক্রিনে ৪টি দেখাবে */
    }
}
/* --- NEW HEADER FORCE STYLE --- */

/* হেডার মেইন বক্স */
.pd-new-header {
    background: linear-gradient(90deg, #ee4d2d 0%, #ff7337 100%);
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 99999; /* সবার উপরে থাকার জন্য */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ফ্লেক্স লেআউট (পাশাপাশি রাখা) */
.pd-header-inner {
    display: flex;
    align-items: center;
    gap: 15px; /* লোগো ও সার্চের মাঝের গ্যাপ */
    width: 100%;
}

/* লোগো সাইজ */
.pd-logo-area {
    flex-shrink: 0; /* লোগো ছোট হবে না */
    max-width: 120px;
}
.pd-logo-area img {
    height: 40px !important;
    width: auto !important;
    object-fit: contain;
    display: block;
}
/* লোগো না থাকলে টেক্সট স্টাইল */
.pd-site-title {
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    text-decoration: none;
}

/* সার্চ বার (পুরো জায়গা নিবে) */
.pd-search-area {
    flex-grow: 1;
    width: 100%;
}
.pd-search-form {
    display: flex;
    width: 100%;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
}
.pd-search-form input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 14px;
    color: #333;
    outline: none;
}
.pd-search-form button {
    background: #fff;
    border: none;
    padding: 0 15px;
    color: #ee4d2d;
    font-size: 18px;
    cursor: pointer;
}

/* আগের কোনো কার্ট আইকন থেকে গেলে তা হাইড করা */
.header-cart, .cart-icon {
    display: none !important;
}

/* --- TOP BANNER --- */
.top-banner-area {
    width: 100%;
    background: #fff;
    line-height: 0; /* ইমেজের নিচে ফাঁকা জায়গা রিমুভ করতে */
}
.top-banner-area img {
    width: 100%;
    height: auto;
    max-height: 80px; /* ব্যানারের সর্বোচ্চ উচ্চতা */
    object-fit: cover;
    display: block;
}

/* --- MAIN HEADER --- */
.pd-main-header {
    background: linear-gradient(90deg, #ee4d2d, #ff7337); /* দারাজ অরেঞ্জ */
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

/* Logo */
.h-logo {
    flex-shrink: 0;
    max-width: 100px;
}
.h-logo img {
    height: 35px !important;
    width: auto !important;
}
.site-name {
    color: white; font-weight: bold; font-size: 16px; text-decoration: none;
}

/* Search */
.h-search {
    flex-grow: 1;
}
.h-search-form {
    display: flex;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    height: 35px;
}
.h-search-form input {
    width: 100%;
    border: none;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}
.h-search-form button {
    background: #fff;
    border: none;
    padding: 0 12px;
    color: #ee4d2d;
    font-size: 16px;
}

/* Cart */
.h-cart {
    position: relative;
    margin-left: 5px;
}
.h-cart a {
    color: white;
    font-size: 22px;
}
.cart-badge {
    position: absolute;
    top: -5px; right: -8px;
    background: white;
    color: #ee4d2d;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    padding: 1px 5px;
    border: 1px solid #ee4d2d;
}

/* --- GLOBAL BUTTON STYLE FIX (FORCE) --- */

.action-buttons {
    display: flex !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 5px 8px 10px 8px !important;
    margin-top: auto !important;
}

/* Cart Button (ProtiDokan Red Style) */
.btn-cart,
a.btn-cart {
    flex: 1 !important;
    background: linear-gradient(135deg, #e62e04 0%, #c0392b 100%) !important; /* লোগোর লাল */
    border: none !important;
    color: #ffffff !important; /* সাদা লেখা */
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 6px 0 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: block !important;
    line-height: 2 !important;
    box-shadow: 0 2px 5px rgba(192, 57, 43, 0.2) !important;
}

/* Buy Now Button (ProtiDokan Fire Style) */
.btn-buy,
a.btn-buy,
.look-btn,
.buy-btn {
    flex: 1 !important;
    background: linear-gradient(135deg, #f0932b 0%, #eb4d4b 100%) !important; /* লোগোর আগুন */
    border: none !important;
    color: #ffffff !important; /* সাদা লেখা */
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 6px 0 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: block !important;
    line-height: 2 !important;
    box-shadow: 0 2px 5px rgba(243, 156, 18, 0.2) !important;
}

/* --- Sales Count Style (Daraz Look) --- */

/* সিঙ্গেল পেজের জন্য */
.pd-sold-count-single {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: inline-block;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
}
.pd-sold-count-single i {
    color: #e62e04; /* আগুনের আইকন লাল */
    margin-right: 5px;
}

/* শপ পেজ বা লুপের জন্য */
.pd-sold-count-loop, .look-sold-count {
    font-size: 11px;
    color: #757575; /* দারাজের মতো হালকা ছাই রঙ */
    margin-bottom: 5px;
    display: block;
}

/* আইকন থাকলে */
.look-sold-count i {
    margin-right: 3px;
}


/* =========================================
   ProtiDokan - NEW HEADER STYLES (Updated)
   ========================================= */

/* --- TOP BAR --- */
.pd-topbar {
    background: #c8340f;
    color: #fff;
    font-size: 11.5px;
    text-align: center;
    padding: 5px 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- TOP BANNER --- */
.top-banner-area {
    width: 100%;
    overflow: hidden;
    max-height: 80px;
    background: #f5f5f5;
}
.top-banner-area img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- MAIN HEADER (Override + Enhance) --- */
.pd-main-header {
    background: linear-gradient(90deg, #ee4d2d, #ff7337) !important;
    padding: 9px 12px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 3px 12px rgba(238,77,45,0.3) !important;
}

.header-inner {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    max-width: 100% !important;
}

/* --- LOGO --- */
.h-logo {
    flex-shrink: 0 !important;
    max-width: 110px !important;
}
.h-logo img,
.h-logo .custom-logo,
.pd-custom-logo {
    height: 38px !important;
    width: auto !important;
    max-width: 110px !important;
    object-fit: contain !important;
    display: block !important;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}
.site-name {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 17px !important;
    text-decoration: none !important;
    letter-spacing: 0.5px;
}

/* --- SEARCH AREA --- */
.h-search {
    flex-grow: 1 !important;
    position: relative !important;
}
.h-search-tabs {
    display: none; /* hidden, tabs shown inside the form row */
}

/* Search form with tab buttons embedded */
.h-search-form {
    display: flex !important;
    background: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 44px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15) !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
}
.h-search-form input[type="text"] {
    flex: 1 !important;
    border: none !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    outline: none !important;
    color: #333 !important;
    background: transparent !important;
}
.h-search-form input[type="text"]::placeholder {
    color: #bbb;
    font-size: 13px;
}
.h-search-form button[type="submit"] {
    background: #ee4d2d !important;
    border: none !important;
    padding: 0 18px !important;
    color: #fff !important;
    font-size: 17px !important;
    cursor: pointer !important;
    transition: background 0.2s;
}
.h-search-form button[type="submit"]:hover {
    background: #d03a1c !important;
}

/* Camera icon inside search row (tab toggle) */
.h-search-tabs {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    height: 38px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border: 1.5px solid rgba(255,255,255,0.4);
    margin-bottom: 4px;
}
.search-tab {
    background: none;
    border: none;
    padding: 0 10px;
    font-size: 15px;
    color: #aaa;
    cursor: pointer;
    height: 100%;
    transition: color 0.2s, background 0.2s;
}
.search-tab.active {
    color: #ee4d2d;
    border-bottom: 2px solid #ee4d2d;
}

/* Override: combine tabs + search bar in one row */
.h-search {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.h-search .h-search-tabs {
    display: none; /* We embed camera btn in form */
}

/* Combined search bar with camera button inside */
.h-search-form {
    align-items: center;
}
.h-search-cam-btn {
    background: none;
    border: none;
    border-left: 1px solid #eee;
    padding: 0 13px;
    color: #bbb;
    font-size: 17px;
    cursor: pointer;
    height: 100%;
    transition: color 0.2s;
}
.h-search-cam-btn:hover {
    color: #ee4d2d;
}

/* Image search input area */
.h-image-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: 8px;
    height: 44px;
    padding: 0 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    border: 2px solid #ee4d2d;
}
.img-upload-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #ee4d2d;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.img-upload-label i {
    font-size: 16px;
}
.img-search-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ee4d2d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0 10px;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Image search switch buttons (above search bar) */
.h-search-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    display: none; /* hidden - using inline approach */
}

/* --- IMAGE SEARCH OVERLAY --- */
.pd-img-results-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.pd-img-results-box {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: 20px;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.pd-img-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 700;
    font-size: 15px;
    color: #333;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.pd-img-results-header button {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    padding: 4px;
}
.pd-img-searching {
    text-align: center;
    padding: 40px 20px;
    color: #ee4d2d;
}
.pd-img-searching i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}
.pd-img-searching p {
    font-size: 14px;
    color: #666;
    margin: 0;
}
.pd-img-search-note {
    padding: 10px 14px 6px;
    font-size: 12px;
    color: #888;
    margin: 0;
}
.pd-img-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px 14px;
}
.pd-img-result-item {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.pd-img-result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.pd-img-result-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.pd-img-result-info {
    padding: 6px 8px;
}
.pd-img-result-title {
    font-size: 12px;
    color: #333;
    margin: 0 0 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}
.pd-img-result-price {
    font-size: 13px;
    font-weight: 700;
    color: #ee4d2d;
    margin: 0;
}
.pd-no-result {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}

/* --- CART ICON (Header) --- */
.h-cart {
    position: relative !important;
    flex-shrink: 0 !important;
    margin-left: 2px !important;
}
.h-cart a {
    color: #fff !important;
    font-size: 23px !important;
    display: flex !important;
    align-items: center !important;
    position: relative;
    text-decoration: none;
}
.cart-badge {
    position: absolute !important;
    top: -7px !important;
    right: -9px !important;
    background: #fff !important;
    color: #ee4d2d !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    border-radius: 50% !important;
    min-width: 17px !important;
    height: 17px !important;
    line-height: 17px !important;
    text-align: center !important;
    border: 1.5px solid #ee4d2d !important;
    padding: 0 2px !important;
}

/* --- HEADER SEARCH: COMBINED CAMERA SWITCH --- */
/* Wrap: search form + camera button side by side */
.h-search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.h-cam-btn {
    flex-shrink: 0;
    background: rgba(255,255,255,0.25);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.h-cam-btn:hover, .h-cam-btn.active {
    background: rgba(255,255,255,0.45);
}



/* =========================================
   LIVE PAGE EXTRAS
   ========================================= */
.live-feed { padding-bottom: 0 !important; }

/* Heart animation on like */
@keyframes heartBeat {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.4); }
    50%  { transform: scale(1); }
    75%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.live-action-btn.liked i {
    animation: heartBeat 0.5s ease;
}

/* --- LIVE BUTTON IN HEADER --- */
.h-live-btn {
    flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #ff2d55, #ff5e3a);
    color: #fff;
    font-size: 11px; font-weight: 900;
    letter-spacing: 1.2px;
    padding: 6px 11px 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(255,45,85,0.55);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.h-live-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    border-radius: 8px;
    pointer-events: none;
}
.h-live-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 16px rgba(255,45,85,0.7);
    color: #fff;
    text-decoration: none;
}
.h-live-text { line-height: 1; }

/* Ripple dot wrapper */
.h-live-ripple {
    position: relative;
    width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.h-live-ripple::before,
.h-live-ripple::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    width: 100%; height: 100%;
    animation: liveRipple 1.6s ease-out infinite;
}
.h-live-ripple::after { animation-delay: 0.8s; }
.h-live-dot {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    display: block;
    position: relative; z-index: 1;
    box-shadow: 0 0 4px rgba(255,255,255,0.8);
}
@keyframes liveRipple {
    0%   { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ===== REELS PAGE - LIVE ROW ===== */
.reels-live-row {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200; padding: 10px 12px 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
    display: flex; align-items: center; gap: 10px;
    overflow-x: auto; overflow-y: hidden;
}
.reels-live-row::-webkit-scrollbar { display: none; }
.reels-live-label {
    color: #fff; font-size: 11px; font-weight: 800;
    letter-spacing: 0.5px; flex-shrink: 0;
    display: flex; align-items: center; gap: 4px;
}
.rl-dot {
    width: 7px; height: 7px; background: #ff2d55;
    border-radius: 50%; animation: rldot 1.2s infinite;
    display: inline-block;
}
@keyframes rldot { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.live-avatar-item {
    flex-shrink: 0; display: flex; flex-direction: column;
    align-items: center; gap: 3px; cursor: pointer; text-decoration: none;
}
.live-avatar-ring {
    width: 50px; height: 50px; border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #ff2d55, #ff8c00);
    display: block;
}
.live-avatar-ring img {
    width: 100%; height: 100%; border-radius: 50%;
    object-fit: cover; border: 2px solid #000; display: block;
}
.live-avatar-name {
    color: #fff; font-size: 10px; font-weight: 600;
    max-width: 52px; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* =======================================================
   RESPONSIVE LAYOUT (Mobile / Tablet / Desktop)
   - Mobile (default, <768px): actual phone screen width
   - Tablet (>=768px): moderately wider, centered
   - Desktop (>=1024px): full desktop-size layout, centered
   Elements that are position:fixed with inset:0 (Reels/Live
   full-screen overlays) are NOT affected by this wrapper's
   max-width, since fixed positioning is relative to the
   viewport, not the wrapper.
   ======================================================= */

.pd-app-wrap {
    width: 100%;
    margin: 0 auto;
    background: var(--bg-gray);
    transition: max-width 0.2s ease;
}

/* --- Tablet --- */
@media (min-width: 768px) {
    .pd-app-wrap {
        max-width: 750px;
        box-shadow: 0 0 25px rgba(0,0,0,0.08);
    }
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
    .all-cat-grid { grid-template-columns: repeat(6, 1fr); }
    .p-title { font-size: 13px; }
    .fs-title { font-size: 17px; }
    .slide { max-height: 220px; }

    /* Center the fixed bottom nav under the wrap instead of stretching edge-to-edge */
    .bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 750px;
    }
}

/* --- Desktop --- */
@media (min-width: 1024px) {
    .pd-app-wrap {
        max-width: 1200px;
    }
    .slide { max-height: 320px; }
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px; }
    .all-cat-grid { grid-template-columns: repeat(8, 1fr); gap: 20px; }
    .main-container { padding: 25px; }
    .p-title { font-size: 14px; height: auto; }
    .p-price { font-size: 18px; }
    .fs-title { font-size: 19px; }
    .app-header { padding: 14px 20px; }
    .search-box input { font-size: 15px; }
    .cat-icon { width: 60px; height: 60px; }
    .cat-img-wrap { width: 72px; height: 72px; }

    .bottom-nav {
        max-width: 1200px;
    }
}

/* --- Large Desktop --- */
@media (min-width: 1440px) {
    .pd-app-wrap {
        max-width: 1320px;
    }
    .product-grid { grid-template-columns: repeat(5, 1fr); }
    .bottom-nav {
        max-width: 1320px;
    }
}

/* =====================================================================
   SITE FOOTER — Laravel-style dark footer (redesign)
   ===================================================================== */
.pd-site-footer {
	position: relative;
	overflow: hidden;
	margin-top: 34px;
	padding: 46px 20px 0;
	background: var(--pf-bg, #1b1b1f);
	color: #b7b7bd;
	text-align: center;
	border-radius: 22px 22px 0 0;
}
.pd-site-footer::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--pf-accent, #ee4d2d), #ff6b45, var(--pf-accent, #ee4d2d), transparent);
}
.pd-site-footer::after {
	content: "";
	position: absolute;
	top: -100px; left: 50%; transform: translateX(-50%);
	width: 420px; height: 240px;
	background: var(--pf-accent, #ee4d2d);
	opacity: .16;
	filter: blur(70px);
	pointer-events: none;
}

/* ব্র্যান্ড */
.pd-site-footer .pf-brand { position: relative; z-index: 1; margin-bottom: 26px; }
.pd-site-footer .pf-logo-img { max-height: 46px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.pd-site-footer .pf-logo-link { display: inline-block; }
.pd-site-footer .pf-site-name {
	display: inline-block;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: .5px;
	color: #fff;
	text-decoration: none;
}
.pd-site-footer .pf-tagline {
	margin: 8px 0 0;
	font-size: 13.5px;
	color: #8f8f96;
	max-width: 320px;
	margin-left: auto; margin-right: auto;
	line-height: 1.5;
}

/* যোগাযোগ */
.pd-site-footer .pf-contact {
	position: relative; z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}
.pd-site-footer .pf-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #d6d6da;
	text-decoration: none;
	font-size: 13.5px;
	transition: color .15s;
}
.pd-site-footer a.pf-contact-item:hover { color: #fff; }
.pd-site-footer .pf-contact-item i {
	flex: 0 0 30px;
	width: 30px; height: 30px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--pf-accent, #ee4d2d) 16%, transparent);
	color: var(--pf-accent, #ee4d2d);
	font-size: 13px;
}

/* সোশ্যাল */
.pd-site-footer .pf-social {
	position: relative; z-index: 1;
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-bottom: 30px;
}
.pd-site-footer .pf-social-btn {
	width: 40px; height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	background: rgba(255, 255, 255, .08);
	transition: transform .15s, background .15s, box-shadow .15s;
}
.pd-site-footer .pf-social-btn:hover { transform: translateY(-3px); }
.pd-site-footer .pf-social-btn.pf-fb:hover { background: #1877f2; box-shadow: 0 6px 16px rgba(24,119,242,.4); }
.pd-site-footer .pf-social-btn.pf-yt:hover { background: #ff0000; box-shadow: 0 6px 16px rgba(255,0,0,.35); }
.pd-site-footer .pf-social-btn.pf-ig:hover {
	background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
	box-shadow: 0 6px 16px rgba(238,42,123,.35);
}

/* কপিরাইট */
.pd-site-footer .pf-copy {
	position: relative; z-index: 1;
	border-top: 1px solid rgba(255, 255, 255, .08);
	padding: 16px 10px 18px;
	font-size: 12px;
	color: #77777d;
}

@media (min-width: 640px) {
	.pd-site-footer { padding-top: 56px; }
	.pd-site-footer .pf-contact { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
}


/* =====================================================================
   MOBILE BROWSER ZOOM-OUT / RIGHT-GAP FIX (v7.12)
   কিছু মোবাইল ব্রাউজারে (Samsung, Opera, UC ইত্যাদি) কোনো এলিমেন্ট
   স্ক্রিনের চেয়ে চওড়া হলে পুরো পেজ ছোট হয়ে ডানে ফাঁকা থাকত।
   ===================================================================== */
html { width: 100%; max-width: 100%; overflow-x: hidden; }
body { width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; position: relative; }
.pd-clip { width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }

/* ফ্লেক্স/গ্রিডের ভেতরের আইটেম যাতে কন্টেন্টের কারণে বড় না হয় */
.header-inner > *, .h-search, .h-search-form { min-width: 0 !important; }
.h-search-form input[type="text"] { min-width: 0 !important; width: 100% !important; }
.pd-topbar { max-width: 100%; }
.pd-topbar marquee { display: block; width: 100%; max-width: 100%; }

.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (max-width: 350px) { .icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
.product-card, .icon-item { min-width: 0; }
.section-box { max-width: 100%; overflow: hidden; }
.category-scroll { max-width: 100%; }
.app-icon-section, .top-banner-area, .slider-wrapper { max-width: 100%; overflow: hidden; }
