.marketplace-hero {
    background:linear-gradient(160deg,#0a2818,var(--g7) 50%,var(--g6));
    color:var(--w);
    padding:26px 0;
    position:relative;
    overflow:hidden;
}

.marketplace-hero-inner {
    max-width:1300px;
    margin:0 auto;
    padding:0 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    position:relative;
    z-index:2;
}

.marketplace-hero h1 {
    font-size:30px;
    font-weight:800;
    margin-bottom:3px;
    letter-spacing:-.5px;
}

.marketplace-hero h1 span {
    color:var(--gold);
}

.marketplace-hero .sub {
    font-size:12.5px;
    opacity:.72;
}

.btn-post {
    display:flex;
    align-items:center;
    gap:6px;
    padding:11px 22px;
    background:var(--gold);
    color:#3d2b00;
    border:none;
    border-radius:8px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    font-family:inherit;
    box-shadow:0 2px 10px rgba(240,185,11,.3);
    transition:.2s;
}

.btn-post:hover {
    background:var(--gold);
    transform:translateY(-1px);
}

.btn-post i {
    font-size:17px;
}

.marketplace-hero-actions {
    display:flex;
    gap:9px;
}

.btn-post-secondary {
    background:rgba(255,255,255,.15);
    color:#fff;
    box-shadow:none;
}

.btn-post-secondary:hover {
    background:rgba(255,255,255,.25);
    color:#fff;
}

.marketplace-hero-deco {
    position:absolute;
    right:250px;
    top:50%;
    transform:translateY(-50%);
    opacity:.1;
    font-size:100px;
    color:var(--gold);
}

.cat-sec {
    background:var(--w);
    border-bottom:1px solid #eee;
    padding:12px 0;
}

.cat-inner {
    max-width:1340px;
    margin:0 auto;
    padding:0 28px;
    display:flex;
    gap:6px;
    overflow-x:auto;
    scrollbar-width:none;
}

.cat-inner::-webkit-scrollbar {
    display:none;
}

.cat-tab {
    display:flex;
    align-items:center;
    gap:6px;
    padding:8px 16px;
    border-radius:8px;
    font-size:12.5px;
    font-weight:500;
    color:var(--g700);
    cursor:pointer;
    transition:.2s;
    white-space:nowrap;
    background:var(--w);
    border:1px solid transparent;
}

.cat-tab:hover {
    color:var(--g7);
    background:var(--g50);
}

.cat-tab.active {
    background:var(--g50);
    color:var(--g7);
    font-weight:600;
    border-color:#c8e6c9;
}

.cat-tab i {
    font-size:16px;
}

.cat-tab .n {
    font-size:11px;
    opacity:.7;
}

.search-sec {
    background:var(--w);
    border-bottom:1px solid #eee;
    padding:14px 0;
}

.search-inner {
    max-width:1340px;
    margin:0 auto;
    padding:0 28px;
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}

.s-in {
    flex:1;
    position:relative;
    min-width:200px;
}

.s-in i {
    position:absolute;
    left:13px;
    top:50%;
    transform:translateY(-50%);
    color:var(--bd);
    font-size:16px;
}

.s-in input {
    width:100%;
    padding:10px 13px 10px 38px;
    border:1.5px solid var(--e0);
    border-radius:var(--radius);
    font-size:12.5px;
    font-family:inherit;
    color:var(--g800);
}

.s-in input:focus {
    outline:none;
    border-color:var(--g6);
    box-shadow:0 0 0 3px rgba(31,122,61,.1);
}

.s-sel {
    padding:10px 30px 10px 12px;
    border:1.5px solid var(--e0);
    border-radius:var(--radius);
    font-size:12.5px;
    font-family:inherit;
    color:var(--g700);
    background:var(--w);
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23757575' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 10px center;
    cursor:pointer;
    min-width:150px;
}

.btn-s {
    padding:10px 26px;
    background:var(--g7);
    color:var(--w);
    border:none;
    border-radius:var(--radius);
    font-size:12.5px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
    white-space:nowrap;
}

.btn-s:hover {
    background:var(--g8);
}

.stats-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:1px;
    background:#eee;
}

.stat-c {
    background:var(--w);
    padding:13px;
    display:flex;
    align-items:center;
    gap:9px;
}

.stat-ic {
    width:34px;
    height:34px;
    border-radius:9px;
    background:var(--g50);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--g7);
    font-size:16px;
    flex-shrink:0;
}

.stat-d .n {
    font-size:18px;
    font-weight:800;
    color:var(--g7);
    line-height:1.15;
}

.stat-d .l {
    font-size:10px;
    color:var(--g500);
}

/* Top hội viên */

.top-item {
    display:flex;
    gap:10px;
    padding:10px 16px;
    border-bottom:1px solid #f8f8f8;
    align-items:center;
    cursor:pointer;
}

.top-item:hover {
    background:var(--f5);
}

.top-item:last-of-type {
    border-bottom:none;
}

.top-rank {
    width:24px;
    height:24px;
    border-radius:7px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:800;
    flex-shrink:0;
}

.r1 {
    background:#fff8e1;
    color:#f57f17;
}

.r2 {
    background:#f5f5f5;
    color:#546e7a;
}

.r3 {
    background:#fff3e0;
    color:#e65100;
}

.rn {
    background:var(--f5);
    color:var(--g600);
}

.top-info {
    flex:1;
    min-width:0;
}

.top-name {
    font-size:11.5px;
    font-weight:600;
    color:var(--g900);
}

.top-cnt {
    font-size:10.5px;
    color:var(--g500);
}

.top-badge {
    font-size:10.5px;
    font-weight:700;
    color:var(--g7);
    flex-shrink:0;
}

/* KM sắp hết hạn */

.km-item {
    display:flex;
    gap:9px;
    padding:11px 16px;
    border-bottom:1px solid #f8f8f8;
    cursor:pointer;
}

.km-item:hover {
    background:var(--f5);
}

.km-item:last-child {
    border-bottom:none;
}

.km-th {
    width:44px;
    height:44px;
    border-radius:8px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    color:rgba(255,255,255,.5);
}

.km-info {
    flex:1;
    min-width:0;
}

.km-title {
    font-size:11.5px;
    font-weight:600;
    color:var(--g900);
    line-height:1.4;
    margin-bottom:2px;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.km-exp {
    font-size:10px;
    color:var(--km);
    font-weight:600;
    display:flex;
    align-items:center;
    gap:3px;
}

.km-exp i {
    font-size:11px;
}

/* Quy định đăng tin */

.rule-box {
    padding:14px 16px;
}

.rule-item {
    display:flex;
    gap:8px;
    font-size:11.5px;
    color:var(--g700);
    line-height:1.6;
    margin-bottom:8px;
}

.rule-item:last-child {
    margin-bottom:0;
}

.rule-item i {
    font-size:14px;
    color:var(--g4);
    flex-shrink:0;
    margin-top:2px;
}

.btn-guide {
    width:100%;
    padding:11px;
    background:var(--g7);
    color:var(--w);
    border:none;
    border-radius:8px;
    font-size:12.5px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.btn-guide:hover {
    background:var(--g8);
}

.btn-guide i {
    font-size:15px;
}



.pp-new {
    font-size:16px;
    font-weight:800;
    color:var(--r);
}

.pp-old {
    font-size:11.5px;
    color:var(--g500);
    text-decoration:line-through;
}

.pp-unit {
    font-size:10.5px;
    color:var(--g500);
}

.pp-contact {
    font-size:13px;
    font-weight:700;
    color:var(--g7);
}

.prod-tags {
    display:flex;
    gap:4px;
    flex-wrap:wrap;
    margin-bottom:9px;
}

.p-tag {
    padding:2px 8px;
    border-radius:9px;
    font-size:9.5px;
    font-weight:500;
    background:var(--f5);
    color:var(--g700);
    border:1px solid #eee;
}

.prod-foot {
    display:flex;
    align-items:center;
    gap:8px;
    padding-top:9px;
    border-top:1px solid #f5f5f5;
}

.prod-stats {
    display:flex;
    gap:10px;
    font-size:10.5px;
    color:var(--g500);
}

.prod-stats span {
    display:flex;
    align-items:center;
    gap:3px;
}

.prod-stats i {
    font-size:12px;
}

.btn-p {
    margin-left:auto;
    padding:6px 14px;
    background:var(--g7);
    color:var(--w);
    border:none;
    border-radius:6px;
    font-size:11.5px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
    white-space:nowrap;
}

.btn-p:hover {
    background:var(--g8);
}
/* Chi tiết sản phẩm/dịch vụ/khuyến mãi */
.marketplace-detail-page .prod-top-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.prod-gallery {
    flex: 0 0 350px;
    width: 350px;
}
.prod-gallery .main-img {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--e0);
    margin-bottom: 12px;
    background: #f9f9f9;
}
.prod-gallery .main-img img {
    width: 100%;
    /*height: 350px;*/
    object-fit: contain;
    display: block;
}
.prod-gallery .thumb-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.prod-gallery .thumb-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 1px solid var(--e0);
    overflow: hidden;
    display: block;
}
.prod-gallery .thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prod-info {
    flex: 1;
    min-width: 0;
}
.prod-info .prod-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.prod-info .prod-type-badge.type-product { background: var(--sp-bg); color: var(--sp); }
.prod-info .prod-type-badge.type-service { background: var(--dv-bg); color: var(--dv); }
.prod-info .prod-type-badge.type-promotion { background: var(--km); color: var(--w); }

.prod-info .prod-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--g900);
    line-height: 1.35;
    margin-bottom: 15px;
    margin-top: 0;
}
.prod-info .prod-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--g600);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.prod-info .prod-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.prod-price-box {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff8f8;
    border-radius: 12px;
    border: 1px dashed #ffa0a0;
}
.prod-price-box .price-label {
    font-size: 13px;
    color: var(--g700);
    margin-bottom: 4px;
}
.prod-price-box .price-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--r);
}
.promo-box {
    margin-bottom: 24px;
    padding: 18px 20px;
    background: #f2fbf4;
    border-radius: 12px;
    border: 1px dashed #a4dfb2;
}
.promo-box .pb-head {
    font-size: 14px;
    font-weight: 800;
    color: var(--km);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.promo-box .pb-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 13px;
}
.promo-box .pb-row:last-child {
    margin-bottom: 0;
}
.promo-box .lbl {
    width: 140px;
    color: var(--g700);
    flex-shrink: 0;
}
.promo-box .val.highlight {
    font-size: 20px;
    font-weight: 800;
    color: var(--r);
}
.promo-box .val.code {
    background: #fff;
    border: 1px solid #ddd;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
}
.prod-actions {
    display: flex;
    gap: 12px;
}
.btn-cta {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    text-decoration: none;
}
.btn-cta:hover { text-decoration: none; }
.btn-call {
    background: var(--g7);
    color: var(--w);
}
.btn-call:hover { background: var(--g8); color: var(--w); }
.btn-share {
    background: var(--f5);
    color: var(--g700);
}
.btn-share:hover { background: #e0e0e0; color: var(--g900); }

/* Company Sidebar */
.box-company .comp-card {
    text-align: center;
}
.comp-card .cc-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 1px solid var(--e0);
    overflow: hidden;
}
.comp-card .cc-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.comp-card .cc-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--g900);
    margin-bottom: 16px;
    line-height: 1.4;
}
.comp-card .cc-name a { color: inherit; text-decoration: none; }
.comp-card .cc-meta {
    text-align: left;
    margin-bottom: 20px;
}
.comp-card .cm-item {
    display: flex;
    gap: 10px;
    font-size: 12.5px;
    color: var(--g700);
    margin-bottom: 10px;
    line-height: 1.5;
}
.comp-card .cm-item i {
    font-size: 16px;
    color: var(--bd);
    flex-shrink: 0;
    margin-top: 2px;
}
.btn-comp-link {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f0f7ff;
    color: #0056b3;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}
.btn-comp-link:hover {
    background: #e1f0ff;
    text-decoration: none;
}


/* ========================================================
   RESPONSIVE CHO SÀN SẢN PHẨM – DỊCH VỤ (MARKETPLACE MAIN & VIEWCAT)
   ======================================================== */

@media (max-width: 991.98px) {
    .marketplace-hero-inner {
        padding: 0 20px;
    }

    .cat-inner {
        padding: 0 20px;
    }

    .search-inner {
        padding: 0 20px;
    }

    .main {
        grid-template-columns: 1fr !important;
        padding: 20px 16px 36px !important;
        gap: 20px !important;
    }

    .prod-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 767.98px) {
    /* ====== HERO MARKETPLACE ====== */
    .marketplace-hero {
        padding: 20px 0 16px;
    }

    .marketplace-hero-inner {
        padding: 0 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .marketplace-hero h1 {
        font-size: 22px;
        letter-spacing: -0.3px;
        line-height: 1.25;
        margin-bottom: 4px;
    }

    .marketplace-hero .sub {
        font-size: 12.5px;
        opacity: 0.85;
        line-height: 1.45;
    }

    .marketplace-hero-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .marketplace-hero-actions .btn-post {
        flex: 1;
        height: 42px;
        font-size: 13px;
        font-weight: 700;
        justify-content: center;
        border-radius: 8px;
        padding: 0 10px;
        white-space: nowrap;
    }

    .marketplace-hero-deco {
        display: none;
    }

    /* ====== CATEGORY SECTION ====== */
    .cat-sec {
        padding: 10px 0;
    }

    .cat-inner {
        max-width: 100%;
        padding: 0 14px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

    .cat-inner::-webkit-scrollbar {
        display: none;
    }

    .cat-tab {
        padding: 6px 14px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 20px;
        flex-shrink: 0;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #334155;
    }

    .cat-tab i {
        font-size: 14px;
    }

    .cat-tab.active {
        background: #1a6b35;
        color: #fff;
        border-color: #1a6b35;
    }

    .cat-tab.active .n {
        color: rgba(255, 255, 255, 0.85);
    }

    /* ====== SEARCH SECTION ====== */
    .search-sec {
        padding: 12px 0;
    }

    .search-inner {
        padding: 0 14px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .s-in {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 100%;
    }

    .s-in input {
        height: 42px;
        font-size: 16px !important; /* Ngăn iOS Safari tự zoom */
        padding: 8px 14px 8px 38px;
        border-radius: 8px;
        border: 1.5px solid #dcdcdc;
        box-sizing: border-box;
    }

    .s-sel {
        width: 100%;
        min-width: 0;
        height: 40px;
        font-size: 16px !important; /* Ngăn iOS Safari tự zoom */
        padding: 8px 26px 8px 10px;
        border-radius: 8px;
        border: 1.5px solid #dcdcdc;
        box-sizing: border-box;
        background-position: right 8px center;
    }

    .btn-s {
        grid-column: 1 / -1;
        width: 100%;
        height: 42px;
        font-size: 14px;
        font-weight: 700;
        border-radius: 8px;
        justify-content: center;
        display: flex;
        align-items: center;
    }

    /* ====== MAIN & PRODUCT FEED ====== */
    .main {
        padding: 14px 12px 30px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .main-left {
        width: 100%;
    }

    .prod-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .prod {
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        display: flex !important;
        flex-direction: column !important;
    }

    .prod-img {
        height: 140px !important;
        position: relative;
        overflow: hidden;
        background: #f8fafc;
    }

    .prod-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .type-badge {
        top: 6px;
        left: 6px;
        padding: 2.5px 7px !important;
        font-size: 9px !important;
        border-radius: 4px !important;
        gap: 3px !important;
    }

    .type-badge i {
        font-size: 10px !important;
    }

    .disc-badge {
        top: 6px;
        right: 6px;
        padding: 2.5px 7px !important;
        font-size: 10px !important;
        border-radius: 4px !important;
    }

    .prod-body {
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .prod-name {
        font-size: 12.5px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        height: 34px !important;
        overflow: hidden !important;
        margin-bottom: 4px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }

    .prod-name a {
        color: #1e293b;
        text-decoration: none;
    }

    .prod-desc {
        display: none !important; /* Ẩn mô tả trên card 2 cột để chiều cao các thẻ sản phẩm đều nhau, ngăn vỡ layout */
    }

    .prod-price {
        margin-bottom: 6px !important;
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-height: 20px;
    }

    .pp-new {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #dc2626 !important;
    }

    .pp-old {
        font-size: 10.5px !important;
    }

    .pp-contact {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #1a6b35 !important;
    }

    .prod-tags {
        display: none !important;
    }

    .prod-foot {
        padding-top: 6px !important;
        border-top: 1px solid #f1f5f9 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
        margin-top: auto;
    }

    .prod-stats {
        font-size: 10.5px !important;
        color: #64748b !important;
    }

    .prod-foot .btn-p {
        padding: 4px 10px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        border-radius: 5px !important;
        height: 28px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    /* ====== PAGINATION ====== */
    .pagination {
        flex-wrap: wrap !important;
        gap: 4px !important;
        margin-top: 18px !important;
    }

    .pagination li a {
        min-width: 32px !important;
        height: 32px !important;
        padding: 0 6px !important;
        font-size: 12px !important;
    }

    /* ====== SIDEBAR ====== */
    aside.side {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .side-box {
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        margin-bottom: 0;
    }

    .side-head {
        padding: 12px 14px;
        font-size: 12.5px;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        background: #eee;
    }

    .stat-c {
        padding: 10px 12px;
        gap: 8px;
    }

    .stat-ic {
        width: 32px;
        height: 32px;
        font-size: 15px;
        border-radius: 8px;
    }

    .stat-d .n {
        font-size: 16px;
        font-weight: 800;
    }

    .stat-d .l {
        font-size: 10px;
    }

    .top-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .top-name {
        font-size: 12px;
        font-weight: 600;
    }

    .top-cnt {
        font-size: 10px;
    }

    .top-badge {
        font-size: 11px;
    }

    .km-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .km-th {
        width: 38px;
        height: 38px;
        border-radius: 6px;
        font-size: 15px;
    }

    .km-title {
        font-size: 12px;
        line-height: 1.35;
    }

    .km-exp {
        font-size: 10.5px;
    }

    .rule-box {
        padding: 12px 14px;
    }

    .rule-item {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 6px;
    }

    .btn-guide {
        height: 42px;
        font-size: 13.5px;
        font-weight: 700;
        border-radius: 8px;
    }

    /* Detail page */
    .marketplace-detail-page .prod-top-grid { flex-direction: column; }
    .prod-gallery { flex: 0 0 100%; width: 100%; }
}

@media (max-width: 499.98px) {
    .marketplace-hero h1 {
        font-size: 19px;
    }

    .marketplace-hero-actions .btn-post {
        font-size: 12px;
        padding: 0 8px;
    }

    .prod-grid {
        gap: 8px !important;
    }

    .prod-img {
        height: 130px !important;
    }

    .prod-body {
        padding: 8px !important;
    }

    .prod-name {
        font-size: 12px !important;
        height: 32px !important;
    }

    .pp-new {
        font-size: 13px !important;
    }

    .prod-foot .prod-stats {
        font-size: 10px !important;
    }

    .prod-foot .btn-p {
        padding: 3px 8px !important;
        font-size: 10.5px !important;
        height: 26px !important;
    }
}

@media (max-width: 359.98px) {
    .prod-grid {
        grid-template-columns: 1fr !important;
    }

    .prod-img {
        height: 160px !important;
    }
}

/* ==========================================================================
   MARKETPLACE ADD & EDIT FORM STYLES
   ========================================================================== */

.market-add-page {
    padding: 24px 0 54px;
    background: #f8fafc;
    min-height: calc(100vh - 350px);
}

.market-add-page .wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Nav bar */
.market-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.market-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.market-btn-back:hover {
    background: #f1f5f9;
    color: #1a6b35;
    border-color: #cbd5e1;
    text-decoration: none;
    transform: translateX(-2px);
}

.market-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #64748b;
}

.market-nav-title strong {
    color: #1a6b35;
    font-weight: 700;
}

/* Alert */
.market-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.5;
}

.market-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.market-alert-icon {
    font-size: 20px;
    color: #ef4444;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.market-alert-body {
    flex: 1;
}

/* Main Card */
.market-form-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Card Header */
.market-form-header {
    background: linear-gradient(135deg, #0f3d1e 0%, #14522a 45%, #1a6b35 100%);
    color: #ffffff;
    padding: 26px 32px;
    position: relative;
    overflow: hidden;
}

.market-form-header::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.mfh-left {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 2;
}

.mfh-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #d4af37;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mfh-title {
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 5px 0;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.mfh-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

/* Form Body */
.market-form-body {
    padding: 32px 34px;
}

/* Section Divider */
.market-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 30px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #f1f5f9;
}

.market-section-title:first-of-type {
    margin-top: 0;
}

.sec-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e8f5e9;
    color: #1a6b35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* Form Groups & Controls */
.market-form-group {
    margin-bottom: 20px;
}

.market-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.market-req {
    color: #ef4444;
    margin-left: 2px;
    font-weight: 700;
}

.market-opt {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
    margin-left: 4px;
}

.market-input-wrap,
.market-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.market-input-icon,
.market-select-icon {
    position: absolute;
    left: 13px;
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

.market-form-control {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 13.5px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.market-form-control:focus {
    border-color: #1a6b35;
    box-shadow: 0 0 0 3px rgba(26, 107, 53, 0.12);
}

.market-input-with-icon {
    padding-left: 42px;
}

.market-select {
    padding-left: 42px;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.market-textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
    line-height: 1.6;
    resize: vertical;
}

.market-help-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

/* Upload zones */
.market-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.market-upload-zone:hover {
    border-color: #1a6b35;
    background: #f0fdf4;
}

.market-file-input {
    display: none;
}

.muz-icon {
    font-size: 32px;
    color: #1a6b35;
    margin-bottom: 6px;
}

.muz-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 3px;
}

.muz-hint {
    font-size: 11.5px;
    color: #94a3b8;
}

/* Preview boxes */
.market-preview-box {
    margin-top: 12px;
}

.market-img-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.market-img-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.market-img-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
}

.market-img-badge.badge-new {
    background: #e8f5e9;
    color: #1a6b35;
    font-weight: 700;
}

.market-album-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.market-album-item {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.market-album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Editor Container */
.market-editor-container {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
}

/* Promotion Sub-panel */
.market-promo-panel {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px dashed #f59e0b;
    border-radius: 14px;
    padding: 22px 24px;
    margin: 20px 0 24px;
}

.mpp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(245, 158, 11, 0.4);
}

.mpp-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fde68a;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.mpp-title {
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}

.mpp-sub {
    font-size: 12px;
    color: #b45309;
}

/* Action Buttons */
.market-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    margin-top: 28px;
    border-top: 1.5px solid #f1f5f9;
}

.market-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 24px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none !important;
}

.market-btn-cancel {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1.5px solid #cbd5e1;
}

.market-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}

.market-btn-submit {
    background: linear-gradient(135deg, #1a6b35 0%, #14522a 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(26, 107, 53, 0.28);
    font-weight: 700;
}

.market-btn-submit:hover {
    background: linear-gradient(135deg, #14522a 0%, #0f3d1e 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26, 107, 53, 0.36);
    color: #ffffff !important;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .market-add-page {
        padding: 16px 0 36px;
    }
    .market-form-header {
        padding: 20px 20px;
    }
    .mfh-left {
        gap: 14px;
    }
    .mfh-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
    .mfh-title {
        font-size: 18px;
    }
    .market-form-body {
        padding: 20px 18px;
    }
    .market-promo-panel {
        padding: 16px 16px;
    }
    .market-form-actions {
        flex-direction: column-reverse;
        width: 100%;
        gap: 10px;
    }
    .market-btn {
        width: 100%;
    }
}

/* ==========================================================================
   MARKETPLACE MANAGE DASHBOARD STYLES
   ========================================================================== */

.market-manage-page {
    padding: 24px 0 54px;
    background: #f8fafc;
    min-height: calc(100vh - 350px);
}

.market-manage-page .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Manage Top Header */
.market-manage-header {
    background: linear-gradient(135deg, #0f3d1e 0%, #14522a 45%, #1a6b35 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.market-manage-header::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.mmh-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.mmh-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #d4af37;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mmh-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.mmh-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

.mmh-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.market-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.market-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Stat Grid */
.market-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.market-stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.market-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.msc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.msc-icon-green {
    background: #e8f5e9;
    color: #1a6b35;
}

.msc-icon-emerald {
    background: #ecfdf5;
    color: #059669;
}

.msc-icon-amber {
    background: #fffbeb;
    color: #d97706;
}

.msc-icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.msc-value {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.15;
}

.msc-label {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 500;
}

/* Manage Table Card */
.market-manage-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 30px;
}

.mmc-head {
    padding: 18px 24px;
    border-bottom: 1.5px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.mmc-head-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mmc-head-title i {
    color: #1a6b35;
    font-size: 20px;
}

.mmc-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.mmc-head-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #e8f5e9;
    color: #1a6b35 !important;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.mmc-head-add-btn:hover {
    background: #1a6b35;
    color: #ffffff !important;
}

/* Table */
.market-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
    margin: 0;
}

.market-table th {
    background: #f8fafc;
    padding: 13px 18px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1.5px solid #e2e8f0;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.market-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.market-table tbody tr:hover td {
    background: #fafcfb;
}

/* Thumbnail */
.m-thumb-wrap {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.m-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.m-thumb-empty {
    color: #94a3b8;
    font-size: 22px;
    background: #f1f5f9;
}

/* Title & Meta */
.m-title-wrap {
    max-width: 380px;
}

.m-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none !important;
    line-height: 1.45;
    transition: color 0.15s ease;
}

.m-item-title:hover {
    color: #1a6b35 !important;
}

.m-item-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 4px;
}

/* Badges */
.market-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.market-badge.badge-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.market-badge.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.market-badge.badge-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.market-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.market-type-tag.tag-product {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.market-type-tag.tag-service {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.market-type-tag.tag-promo {
    background: #fff7ed;
    color: #c2410c;
    border: 1px dashed #fdba74;
}

/* Price & Stats */
.m-item-price {
    font-weight: 700;
    color: #b91c1c;
    font-size: 13.5px;
    white-space: nowrap;
}

.m-item-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 6px;
}

.m-item-date {
    font-size: 12.5px;
    color: #64748b;
    white-space: nowrap;
}

/* Action Group */
.m-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.m-act-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1.5px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.m-act-edit {
    background: #f0fdf4;
    color: #166534 !important;
    border-color: #bbf7d0;
}

.m-act-edit:hover {
    background: #166534;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.m-act-view {
    background: #f1f5f9;
    color: #334155 !important;
    border-color: #cbd5e1;
}

.m-act-view:hover {
    background: #334155;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.m-act-delete {
    background: #fef2f2;
    color: #b91c1c !important;
    border-color: #fecaca;
}

.m-act-delete:hover {
    background: #b91c1c;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Empty State */
.market-empty-state {
    padding: 60px 24px;
    text-align: center;
}

.mes-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #1a6b35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 18px;
}

.mes-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.mes-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .market-stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 767.98px) {
    .market-manage-page {
        padding: 16px 0 36px;
    }
    .market-manage-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 16px;
    }
    .mmh-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .mmh-actions .market-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }
    .market-table th,
    .market-table td {
        padding: 10px 12px;
    }
}
