/* ============================================
   Marketplace Product Cards - Desktop
   Premium design with smooth hover interactions
   ============================================ */

/* ============================================
   PRODUCT CARD - BASE
   ============================================ */
.tp-product-item {
    border-radius: 12px !important;
    border: 1px solid #f0f0f0 !important;
    background: #fff !important;
    transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.3s ease !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tp-product-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: #e0e0e0 !important;
    transform: translateY(-4px);
}

/* ============================================
   IMAGE
   ============================================ */
.tp-product-item .tp-product-thumb {
    border-bottom: 1px solid #f5f5f5 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden;
    background: #fafafa;
}

.tp-product-item .tp-product-thumb img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease !important;
}

.tp-product-item:hover .tp-product-thumb img {
    transform: scale(1.06) !important;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.tp-product-item .tp-product-content {
    padding: 14px 16px 16px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TITLE - 2-LINE CLAMP
   ============================================ */
.tp-product-item .tp-product-title {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    min-height: 39px;
}

.tp-product-item .tp-product-title a {
    color: #222 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.tp-product-item:hover .tp-product-title a {
    color: var(--tp-theme-primary, #094bd9) !important;
}

/* ============================================
   CATEGORY LABEL - HIDDEN ON DESKTOP
   ============================================ */
.tp-product-category-label {
    display: none;
}

/* ============================================
   PRICE
   ============================================ */
.tp-product-item .tp-product-price-wrapper {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
}

.tp-product-item .tp-product-price.new-price,
.tp-product-item span.tp-product-price:not(.old-price) {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.5px;
}

.tp-product-item .tp-product-price.old-price {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #aaa !important;
    text-decoration: line-through !important;
}

/* ============================================
   PRICE + CART ROW LAYOUT
   ============================================ */
.tp-product-price-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.tp-product-price-col {
    flex: 1;
    min-width: 0;
}

/* ============================================
   FLOATING CART BUTTON — HIDDEN ON DESKTOP
   ============================================ */
.tp-product-floating-cart-btn {
    display: none !important;
}

/* ============================================
   BADGES
   ============================================ */
.tp-product-item .tp-product-badge {
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
}

.tp-product-item .tp-product-badge span {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

.tp-product-item .tp-product-badge .product-sale {
    background: linear-gradient(135deg, #ff4747, #e62e2e) !important;
    color: #fff !important;
}

.tp-product-item .tp-product-badge .product-hot {
    background: linear-gradient(135deg, #e91e63, #c2185b) !important;
    color: #fff !important;
}

.tp-product-item .tp-product-badge .product-trending {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
    color: #fff !important;
}

.tp-product-item .tp-product-badge .product-out-stock {
    background: #666 !important;
    color: #fff !important;
}

/* ============================================
   HOVER ACTION BUTTONS (compare/wishlist/quickview)
   ============================================ */
.tp-product-item .tp-product-action {
    right: 10px !important;
    bottom: 20px !important;
}

.tp-product-item .tp-product-action-btn {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    border-color: #f0f0f0 !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease !important;
}

.tp-product-item .tp-product-action-btn:hover {
    background: var(--tp-theme-primary, #094bd9) !important;
    border-color: var(--tp-theme-primary, #094bd9) !important;
    color: #fff !important;
    transform: scale(1.08);
}

/* ============================================
   HIDE LARGE ADD-TO-CART BAR (replaced by icon)
   ============================================ */
.tp-product-item .tp-product-add-cart-btn-large-wrapper {
    display: none !important;
}

/* ============================================
   RATING + SOLD COUNT
   ============================================ */
.tp-product-rating-sold {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.tp-product-rating-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
    line-height: 1;
}

.tp-product-rating-inline svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.tp-rating-num {
    font-weight: 600;
    color: #333;
}

.tp-rating-divider {
    color: #ddd;
    margin: 0 1px;
}

.tp-reviews-count {
    color: #999;
}

.tp-product-item .tp-product-rating-icon span {
    font-size: 11px !important;
    color: #ffa41c !important;
}

.tp-product-item .tp-product-rating-text a {
    font-size: 12px !important;
    color: #888 !important;
}

/* ============================================
   GRID SPACING (DESKTOP)
   ============================================ */
@media (min-width: 768px) {
    .tp-shop-area .row[class*="row-cols"],
    .tp-product-area .row[class*="row-cols"],
    .tp-product-arrival-area .row[class*="row-cols"] {
        --bs-gutter-x: 16px;
        --bs-gutter-y: 16px;
    }

    .tp-product-item.mb-25 {
        margin-bottom: 0 !important;
    }

    .tp-product-item.mb-50 {
        margin-bottom: 0 !important;
    }
}

/* ============================================
   STICKY SIDEBAR (shop page)
   ============================================ */
@media (min-width: 992px) {
    .tp-shop-left-side,
    .tp-shop-right-side {
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }
}

/* ============================================
   PRODUCT LIST VIEW
   ============================================ */
.tp-product-list-item {
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid #f0f0f0 !important;
    transition: box-shadow 0.3s ease, transform 0.25s ease !important;
}

.tp-product-list-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

/* ============================================
   SWIPER PRODUCT CARDS
   ============================================ */
.swiper-wrapper .tp-product-item {
    border-radius: 12px !important;
    overflow: hidden;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.tp-section-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: -0.3px;
}

.tp-link-btn {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--tp-theme-primary, #094bd9) !important;
}

/* ============================================
   MOBILE RESETS - Let mobile CSS handle these
   ============================================ */
@media (max-width: 767px) {
    .tp-product-item:hover {
        transform: none !important;
    }

    .tp-product-item .tp-product-content {
        padding: revert !important;
    }

    .tp-product-item .tp-product-title {
        min-height: auto !important;
    }

    /* Show floating cart button on mobile */
    .tp-product-floating-cart-btn,
    .tp-product-item .tp-product-floating-cart-btn {
        display: flex !important;
    }
}
