/* ==========================================
   GLOBAL NOTIFY + RESET
========================================== */
.notify {
    position: fixed;
    z-index: 99999;
}
.notify button {
    background: transparent;
    padding: 0;
    color: inherit;
    margin: 0;
    line-height: 1.15;
}
.notify svg {
    display: block;
}


/* ==========================================
   CATEGORY CARD (Buyer Dashboard)
========================================== */
.category-card {
    background: #f9fbff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #eef0f4;
    background-image:
        radial-gradient(circle at top left, rgba(97,255,91,0.06) 20%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(144,255,110,0.05) 25%, transparent 50%);
    transition: all .25s ease;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.cat-img,
.cat-letter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-name {
    font-size: 13px;
    font-weight: 600;
}

.badge-info-custom {
    background: #dbeafe;
    color: #1d4ed8;
}
.badge-light-custom {
    background: #f3f4f6;
    color: #111827;
}

.badge-info-custom,
.badge-light-custom {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
}

.stock-green {
    color: #15803d;
    font-weight: 600;
    font-size: 12px;
}
.stock-red {
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
}

.btn-view {
    background: transparent;
    border: 1px solid #41414124;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 11px;
    transition: .25s;
}
.btn-view:hover {
    background: #34c759;
    color: #fff;
    border-color: #34c759;
}

/* Mobile compact */
@media (max-width: 576px) {
    .category-card { padding: 14px; }
    .cat-name { font-size: 12px; }
    .badge-info-custom,
    .badge-light-custom {
        font-size: 10px;
        padding: 5px 6px;
    }
    .btn-view {
        font-size: 10px;
        padding: 5px 14px;
    }
    .col-6-mobile { width: 50%; padding: 0 6px; }
}


/* ==========================================
   GLOBAL SKELETON LOADER
========================================== */
.skeleton {
    background: linear-gradient(90deg, #f2f4f7 25%, #e6e9ef 37%, #f2f4f7 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.skeleton-card {
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #eef0f4;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.skeleton-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
}
.skeleton-btn {
    height: 28px;
    width: 70px;
    border-radius: 6px;
}

/* =============================
   ADMIN DASHBOARD SKELETON
============================= */
.dash-skel {
    background: linear-gradient(90deg, #f1f3f7 25%, #e5e7eb 37%, #f1f3f7 63%);
    background-size: 400% 100%;
    animation: dash-skel-loading 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes dash-skel-loading {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.dash-skel-card {
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #eef0f4;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.dash-skel-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.dash-skel-line {
    height: 12px;
    border-radius: 6px;
}

.dash-skel-btn {
    height: 28px;
    width: 70px;
    border-radius: 6px;
}

/* =============================
   CATEGORY PAGE SKELETON
============================= */
.catpage-skel {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: catpage-skel-loading 1.3s ease infinite;
    border-radius: 8px;
}

@keyframes catpage-skel-loading {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.catpage-skel-block {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #f1f2f6;
}

.catpage-skel-line {
    height: 14px;
    border-radius: 6px;
}

.catpage-skel-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.catpage-skel-btn {
    width: 70px;
    height: 26px;
    border-radius: 6px;
}

/* =================================
   CATEGORY BLOCK SKELETON (INSIDE)
================================= */
.catblock-skel {
    background: #eceff3;
    animation: catblock-shimmer 1.3s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes catblock-shimmer {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.catblock-skel-card {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.catblock-skel-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.catblock-skel-body { flex: 1; }

.catblock-skel-line {
    height: 10px;
    margin-bottom: 6px;
    border-radius: 6px;
}

/* =================================
   PRODUCT CARD SKELETON
================================= */
.prod-skel {
    background: linear-gradient(90deg, #efefef 25%, #dedede 37%, #efefef 63%);
    background-size: 400% 100%;
    animation: prod-skel-loading 1.2s ease infinite;
    border-radius: 8px;
}

@keyframes prod-skel-loading {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.prod-skel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.prod-skel-thumb {
    width: 55px;
    height: 55px;
    border-radius: 8px;
}

.prod-skel-body { flex: 1; }

.prod-skel-line {
    height: 11px;
    margin-bottom: 6px;
    border-radius: 6px;
}





/* ==========================================
   CATEGORY SEGMENT HEADER
========================================== */
.category-segment-header {
    padding: 10px 4px;
}
.segment-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}
.segment-badge {
    background: #111827;
    color: #fff;
    padding: 6px 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .7px;
    border-radius: 30px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

@media (max-width: 576px) {
    .category-segment-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}


/* ==========================================
   CUSTOM PAGINATION (Short Version)
========================================== */
.pagination-wrapper {
    display: inline-flex;
    gap: 4px;
    margin-top: 10px;
}

.pg-item {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 11px;
    color: #374151;
    text-decoration: none;
    transition: .2s;
}

.pg-item:hover {
    background: #3bca50;
    color: #fff;
    border-color: #3bca50;
}

.pg-item.active {
    background: #3bca50;
    border-color: #3bca50;
    color: #fff;
    font-weight: 600;
}

.pg-item.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pg-item.dots {
    border: 0;
    background: transparent;
}


/* ==========================================
   PAGE LAYOUT STRUCTURE
========================================== */


/* Buttons */
.catalog-btn-danger {
    background: #dc3545;
    padding: 5px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}
.catalog-btn-outline {
    padding: 4px 10px;
    border: 1px solid #0f172a;
    color: #0f172a;
    border-radius: 6px;
    font-size: 10.5px;
}


/* ==========================================
   PRODUCTS: COMPACT MODE
========================================== */

.product-item {
    display: flex;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;  
}

.product-item > * {
    min-width: 0;     
}

.product-item .thumb img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
}

.product-circle-thumb img,
.product-thumb-compact img {
    max-width: 100%;
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
}

/* Truncate long name properly */
.product-name-compact {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 10px);   
}

/* Truncate long description */
.product-desc-compact {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 85%;      /* same fix */
}

.product-desc-compact {
    position: relative;
    font-size: 11px;
    color: #64748b;
    line-height: 1.25;

    /* 💎 PERFECT FIX — two-line elegant truncation */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* Prevent container growth */
    max-height: 32px;   /* 2 lines * line-height */
    margin-top: 2px;
}

.product-desc-compact::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, #fff);
}



/* Prevent badge line overflow */
.product-item .badge {
    white-space: nowrap;
    max-width: 100%;
}

/* Prevent flex children from expanding horizontally */
.d-flex.flex-wrap {
    width: 100%;
    flex-wrap: wrap !important;
}

.product-item .title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-item .description {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-compact {
    font-size: 11px;
    font-weight: 700;
    color: #e91e63;
}

.product-view-compact {
    font-size: 14px;
    color: #475569;
    transition: .2s;
}
.product-view-compact:hover { color: #3bca50; }

.product-cart-compact {
    font-size: 13px;
    cursor: pointer;
    color: #3bca50;
    transition: .2s;
}
.product-cart-compact:hover { color: #28a745; }

.disabled-cart {
    color: #94a3b8;
    pointer-events: none;
    opacity: .6;
}

.product-buy-compact {
    background: #3bca50;
    border: none;
    color: #fff;
    padding: 2px 9px;
    font-size: 10.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: .2s;
}
.product-buy-compact:hover { background: #2ea043; }

.product-out-compact {
    background: #9ca3af;
    color: #fff;
    padding: 2px 7px;
    font-size: 10px;
    border-radius: 6px;
}


/* ============================================
   FIX PRODUCT ITEM STRUCTURE (NO WRAP!)
============================================ */
.product-item.no-wrap {
    display: flex;
    flex-wrap: nowrap !important;   /* 🔥 prevents image floating upward */
    align-items: flex-start;
    gap: 10px;
    padding: 10px 4px;
}

/* FIX: image stays same size, never stretched or pushed */
.product-item.no-wrap .product-circle-thumb {
    flex-shrink: 0 !important;
}

/* FIX: text column respects width, wraps internally */
.product-item.no-wrap .flex-grow-1 {
    min-width: 0 !important; /* needed for text-truncate to work */
}

/* NAME stays elegant */
.product-name-compact {
    font-size: 13px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DESCRIPTION stays 2-line max ALWAYS */
.product-desc-compact {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;         
    -webkit-box-orient: vertical;
    font-size: 11px;
    line-height: 1.25;
    max-height: 32px;
    margin-bottom: 16px;              
}

.product-meta-row {
    margin-top: 6px;     /* More breathing room */
    gap: 6px !important; /* Better item spacing */
}

/* Prevent badges from pushing height weirdly */
.product-item .badge {
    white-space: nowrap;
}

/* Mobile: maintain side-by-side elegance */
@media (max-width: 576px) {
    .product-item.no-wrap {
        gap: 8px;
    }
    .product-circle-thumb {
        width: 48px !important;
        height: 48px !important;
    }
}


/* ============================
   GLOBAL LIGHT SCROLLBAR THEME
   ============================ */

/* Webkit Browsers (Chrome, Edge, Safari) */
.catalog-scroll-area::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: transparent;
}

.catalog-scroll-area::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.6);
    border-radius: 10px;
}

.catalog-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(180, 180, 180, 0.7);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.catalog-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 150, 150, 0.9);
}

/* Firefox */
.catalog-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: rgba(180,180,180,0.7) rgba(240,240,240,0.6);
    overflow-x: hidden !important;
    white-space: normal !important;
    max-width: 100%;
    position: relative;  
    overflow-y: auto;
    


}


/* ============================
   FIX: HEADER OVERLAY STEALS CLICKS
   (seller link not clickable)
============================ */

/* Ensure block becomes the stacking root */
.catalog-block,
.catalog-segment,
.catalog-section,
.catalog-block-wrapper {
  position: relative;
}

/* Bring the scroll/content layer above headers */
.catalog-scroll-area{
  position: relative;
  z-index: 20;
}

/* Keep the header below the product list */
.category-title,
.catalog-title{
  position: relative;
  z-index: 1;
  font-size: 14px;
}

/* Skeleton must never catch clicks */
.catalog-skeleton-list{
  pointer-events: none !important;
  position: relative;
  z-index: 1;
}

/* Real product list should be the top click layer */
.catalog-product-list{
  position: relative;
  z-index: 30;
}

/* If any pseudo overlay exists, it must not steal clicks */
.catalog-block::before,
.catalog-block::after,
.catalog-scroll-area::before,
.catalog-scroll-area::after{
  pointer-events: none !important;
}








/* =====================================================
   FIX HORIZONTAL SCROLLING — MAKE PRODUCT LIST VERTICAL
===================================================== */

.catalog-scroll-vertical {
    max-height: 380px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    white-space: normal !important;
}






/* ==========================================
   RESPONSIVE LAYOUT
========================================== */
@media (max-width: 768px) {
    .category-products-wrapper {
        flex-direction: column;
    }
    .product-item .thumb img {
        width: 40px;
        height: 40px;
    }
    .product-item .title { max-width: 150px; }
    .product-item .description { max-width: 150px; }
}

@media (max-width: 480px) {
    .product-item .thumb img {
        width: 36px;
        height: 36px;
    }
    .product-item .title { max-width: 120px; }
    .product-item .description { max-width: 120px; }
}


/* ============================================
   MODERN RIGHT-ALIGNED PAGINATION UI
============================================ */
.custom-pagination-wrapper {
    width: 100%;
}

.custom-pagination {
    display: flex;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-pagination .pag-item {
    padding: 0;
}

.custom-pagination .pag-item a,
.custom-pagination .pag-item span {
    display: inline-block;
    padding: 6px 10px;
    font-size: 11.8px;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    border: 1px solid #d1d5db;
    transition: all .25s ease;
}

/* Hover → grey/black */
.custom-pagination .pag-item a:hover {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* Active → btn-outline--base style from your theme */
.custom-pagination .pag-item.active span {
    background: #3bca50;
    color: #fff;
    border-color: #3bca50;
    font-weight: 600;
}

/* Disabled */
.custom-pagination .pag-item.disabled span {
    background: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;
    pointer-events: none;
    opacity: .6;
}

/* Dots */
.custom-pagination .pag-item.dots span {
    border: none !important;
    background: transparent !important;
    color: #6b7280 !important;
}

/* Smaller on mobile */
@media (max-width: 480px) {
    .custom-pagination .pag-item a,
    .custom-pagination .pag-item span {
        padding: 5px 7px;
        font-size: 10.5px;
    }
}



/* ============================
   UNIFIED PRODUCT CARD
============================ */


.up-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

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

.up-new {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #22c55e;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}


.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Icon buttons */
.up-icon-btn {
    font-size: 18px;
    color: #475569;
    cursor: pointer;
    transition: .2s;
}
.up-icon-btn:hover {
    color: #111827;
}



/* Smooth modal animation */
.modal.fade .modal-dialog{
  transform: translateY(18px) scale(.98);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}

.modal.show .modal-dialog{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Smooth backdrop fade */
.modal-backdrop{
  transition: opacity .22s ease;
}

/* Optional: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce){
  .modal.fade .modal-dialog,
  .modal-backdrop{
    transition: none !important;
  }
}


/* Modal look = card-like */
.up-modal{
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  border: 1px solid #e5e7eb;
    z-index: 1055 !important;
  pointer-events: auto !important;
}

.modal-backdrop{
  z-index: 1050 !important;
}

.up-modal-heading{
  font-weight: 400;
  color: #111827;
}

.modal-dialog,
.modal-content{
  pointer-events: auto !important;
}

/* Prevent any page layer from stealing clicks while modal is open */
.modal-open .catalog-scroll-area{
  pointer-events: none; 
}




.up-modal-title{
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #111827;
}

/* FULL description, wraps nicely */
.up-modal-desc{
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
  white-space: normal;
  margin-bottom: 10px;
}

/* Meta inside modal */
.up-modal-meta{
  gap: 6px;
}

/* Footer spacing */
.up-modal-footer{
  gap: 10px;
}

/* Icon button in modal matches your system */
.up-icon-btn.disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}






/* Make unified product card slightly smaller but readable */
.up-card {
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.up-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;

}

.up-desc {
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px; 
    /* Description */
    font-size: 14px;
    margin-top: 3px;

}

/* Price + pills */
.up-price {
    color: #16a34a;
    font-size: 14px;
    font-weight: 700;
}

.up-seller-link{
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

/* Keep seller pill link consistent (no blue / purple ever) */
.up-pill-link,
.up-pill-link:visited,
.up-pill-link:hover,
.up-pill-link:focus,
.up-pill-link:active{
  color: #16aa4c98 !important;
  text-decoration: none !important;
}


.up-pill {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;

}

.up-pill-link {
    background: #f7f7f7;
    color: #16a34a;
    text-decoration: none;
}

.up-pill-link:hover{
  text-decoration: underline;
}

/* Add-to-cart pill button */
.up-cart-btn {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    background: #f9fafb;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.up-cart-btn i {
    font-size: 13px;
}

.up-cart-btn:hover {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.up-cart-btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Buy button a bit smaller to match */
.up-buy {
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;

    padding: 5px 14px;
    font-size: 12px;
    transition: transform .12s ease;
}


.up-buy:hover {
    background: #16a34a;
}
.up-buy.disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.up-buy:active{
  transform: scale(.98);
}


/* IMPORTANT: allows truncation inside flex/grid */
.up-main,
.up-info { min-width: 0; }


/* Icon-only cart button (same base as view icon) */
.up-icon-cart{
  border-color: #d1d5db;
}

/* Optional: make cart icon slightly “actiony” */
.up-icon-cart:hover{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

/* Disabled = not clickable + slightly faded */
.up-icon-btn.disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}


/* Meta row: consistent spacing */
.up-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Right actions cluster: perfectly straight inline */
.up-cta{
  display: inline-flex;
  align-items: center;
  gap: 25px;
  white-space: nowrap;
}

/* Mobile: single straight row */
.up-cta-mobile{
  margin-top: 8px;
  width: 85%;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* View icon button (clean + modern) */
.up-icon-btn{
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.up-icon-btn i{
  font-size: 16px;
  line-height: 1;
}
.up-icon-btn:hover{
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* Make disabled buttons truly non-clickable */
.up-cart-btn.disabled,
.up-buy.disabled{
  pointer-events: none;
}





/* Slightly smaller on mobile */
@media (max-width: 576px) {
    .up-card {
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .up-title {
        font-size: 12px;
    }
    .up-desc {
        font-size: 10.5px;
    }
    .up-price {
        font-size: 11px;
    }
    .up-pill {
        font-size: 9.5px;
    }
    .up-cart-btn {
        padding: 2px 7px;
        font-size: 10.5px;
    }

    .up-thumb {
        width: 52px;
        height: 52px;
    }

    .up-buy { padding: 4px 12px; font-size: 11px; }



}


/* Desktop = clean 2-column inline layout */
@media (min-width: 768px) {
  .up-main{
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    align-items: start;
  }
  .up-cta{
    align-self: center;
  }
}




/* =========================================
   FINAL MINI CART DROPDOWN
   ========================================= */

.cart-nav,
.cart-dropdown-wrapper {
  position: relative;
  flex-shrink: 0;
}

.cart-trigger,
#cartBtn {
  position: relative;
  z-index: 3;
}

.cart-badge,
.cart-count,
#cartCountBadge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1c9b5e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* dropdown shell */
.cart-dropdown {
  position: absolute !important;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 16px));
  height: min(74vh, 400px);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  z-index: 2000 !important;
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.cart-dropdown.show,
.dropdown-menu.cart-dropdown.show {
  display: block !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cart-dropdown[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cart-dropdown-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 13px;
  color: #64748b;
}

.cart-dropdown-loader svg {
  width: 18px;
  height: 18px;
  animation: cartSpin .85s linear infinite;
}

@keyframes cartSpin {
  to { transform: rotate(360deg); }
}

/* optional caret */
.dropdown-menu.cart-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 22px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #e5e7eb;
  pointer-events: none;
}

.dropdown-menu.cart-dropdown::after {
  content: "";
  position: absolute;
  top: -9px;
  right: 22px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
  pointer-events: none;
}

.dropdown-menu.cart-dropdown > * {
  position: relative;
  z-index: 2;
}

/* current preferred mini-cart markup */
.mini-cart {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.mini-cart__list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}

.mini-cart__list::-webkit-scrollbar {
  width: 6px;
}

.mini-cart__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.mini-cart__item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.mini-cart__img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}

.mini-cart__meta {
  min-width: 0;
}

.mini-cart__name {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart__sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

.mini-cart__actions {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mini-cart__action {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.mini-cart__action i {
  font-size: 14px;
  line-height: 1;
}

.mini-cart__action:hover {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.mini-cart__remove {
  color: #dc2626;
}

.mini-cart__remove:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.mini-cart__summary {
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
  padding: 10px 12px 8px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.mini-cart__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #374151;
}

.mini-cart__row--bold {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
  font-weight: 800;
  color: #111827;
}

.mini-cart__footer {
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
  padding: 10px 12px 12px;
  background: #fff;
}

.mini-cart__checkout {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  padding: 0 14px;
  transition: background .18s ease;
}

.mini-cart__checkout:hover {
  background: #16a34a;
  color: #fff;
}

.mini-cart__empty {
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
  color: #6b7280;
}

.mini-cart__empty i {
  font-size: 24px;
  color: #94a3b8;
}

/* mobile */
@media (max-width: 768px) {
  .cart-dropdown {
    right: -6px;
    width: min(320px, calc(100vw - 14px));
    height: min(70vh, 460px);
    border-radius: 16px;
  }

  .mini-cart__list {
    padding: 10px;
    gap: 8px;
  }

  .mini-cart__item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
    border-radius: 12px;
  }

  .mini-cart__img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .mini-cart__name {
    font-size: 12px;
  }

  .mini-cart__sub,
  .mini-cart__row,
  .mini-cart__checkout {
    font-size: 11px;
  }

  .mini-cart__action {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .mini-cart__summary {
    padding: 9px 10px 7px;
  }

  .mini-cart__footer {
    padding: 9px 10px 10px;
  }
}

/* =============================
   CATEGORY PRODUCTS HEADER STRIP
============================= */

.cp-header {
  padding: 10px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.cp-count-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
}

/* Horizontal strip */
.cp-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cp-strip::-webkit-scrollbar { height: 6px; }
.cp-strip::-webkit-scrollbar-thumb { border-radius: 999px; background: #e5e7eb; }

/* Chip */
.cp-chip {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  min-width: 140px;
  max-width: 220px;
  transition: 0.15s ease;
  cursor: pointer;
}
.cp-chip:hover {
  transform: translateY(-1px);
}
.cp-chip.active {
  border-color: #111827;
}

/* Thumb */
.cp-chip-thumb {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  display: grid;
  place-items: center;
}
.cp-chip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-chip-thumb-all {
  font-size: 12px;
  font-weight: 800;
  color: #111827;
}

/* Name */
.cp-chip-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  max-width: 150px;
}

#baseProductsArea.is-loading {
  opacity: .55;
  pointer-events: none;
  transition: opacity .12s ease;
}

.cp-featured-label{
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
}



/* Mobile: tighter */
@media (max-width: 576px) {
  .cp-chip { min-width: 120px; }
  .cp-chip-name { max-width: 120px; }
}


/* Refined marketplace mini-cart dropdown */
.top-nav-marketplace .cart-dropdown,
.cart-dropdown-wrapper .cart-dropdown {
  width: min(380px, calc(100vw - 20px));
  height: auto;
  max-height: min(78vh, 520px);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.cart-dropdown-wrapper #cartDropdownContent {
  max-height: min(78vh, 520px);
  overflow: hidden;
}

.cart-dropdown-wrapper .cart-dropdown-loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(4px);
}

.cart-dropdown-wrapper .mini-cart {
  height: auto;
  max-height: min(78vh, 520px);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cart-dropdown-wrapper .mini-cart__list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(42vh, 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
}

.cart-dropdown-wrapper .mini-cart__list::-webkit-scrollbar {
  width: 6px;
}

.cart-dropdown-wrapper .mini-cart__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.cart-dropdown-wrapper .mini-cart__item {
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
}

.cart-dropdown-wrapper .mini-cart__img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
}

.cart-dropdown-wrapper .mini-cart__actions {
  gap: 6px;
}

.cart-dropdown-wrapper .mini-cart__action {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.cart-dropdown-wrapper .mini-cart__summary,
.cart-dropdown-wrapper .mini-cart__footer {
  flex: 0 0 auto;
}

.cart-dropdown-wrapper .mini-cart__empty {
  min-height: 150px;
  padding: 24px 16px;
}

.plug-cart-toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20000;
  width: max-content;
  max-width: min(220px, calc(100vw - 28px));
  padding: 8px 10px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.26);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.plug-cart-toast.is-showing {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.plug-cart-toast__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c9b5e;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.plug-cart-toast.is-error .plug-cart-toast__icon {
  background: #dc2626;
}

.plug-cart-toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.plug-cart-toast__label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
}

.plug-cart-toast__message {
  font-size: 0.66rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plug-cart-toast__close {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.plug-cart-toast__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 576px) {
  .top-nav-marketplace .cart-dropdown,
  .cart-dropdown-wrapper .cart-dropdown {
    position: fixed !important;
    top: 72px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: min(74vh, 480px);
  }

  .cart-dropdown-wrapper #cartDropdownContent,
  .cart-dropdown-wrapper .mini-cart {
    max-height: min(74vh, 480px);
  }

  .cart-dropdown-wrapper .mini-cart__list {
    max-height: min(42vh, 280px);
  }

  .plug-cart-toast {
    right: 10px;
    bottom: 10px;
    max-width: min(72vw, 194px);
  }
}
