/* Basic CSS for PT Fitmo Core Shortcodes */
.ptfc-products-wrapper { display: flex; flex-wrap: wrap; gap: 20px; font-family: 'Plus Jakarta Sans', sans-serif; }
.ptfc-products-wrapper.style-grid .ptfc-product-item { border: none; border-radius: 14px; overflow: hidden; position: relative; background: #fff; }
.ptfc-carousel-card { border: none; border-radius: 14px; overflow: hidden; position: relative; background: #fff; }
.ptfc-carousel-card .ptfc-product-info { padding: 12px 12px 15px 12px; }
.ptfc-carousel-card .ptfc-product-title { font-size: 14px; margin-bottom: 8px; }
.ptfc-carousel-card .ptfc-price-row { font-size: 12px; padding-left: 10px; }
.ptfc-carousel-card .ptfc-price-row.wholesale { margin-bottom: 10px; }
.ptfc-carousel-card .ptfc-meta-row { font-size: 12px; margin-bottom: 5px; }
.ptfc-carousel-card .ptfc-meta-row svg { width: 14px; height: 14px; }
.ptfc-carousel-card .ptfc-badge-commission { font-size: 12px; padding: 4px 12px; }
.ptfc-carousel-mobile-only .swiper-button-next,
.ptfc-carousel-mobile-only .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 50%;
    background: #fff;
    color: var(--ptfc-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ptfc-carousel-mobile-only .swiper-button-next { right: 5px; }
.ptfc-carousel-mobile-only .swiper-button-prev { left: 5px; }
.ptfc-carousel-mobile-only .swiper-button-next::after,
.ptfc-carousel-mobile-only .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

/* Columns */
.ptfc-products-wrapper.style-grid.cols-2 .ptfc-product-item { width: calc(50% - 10px); }
.ptfc-products-wrapper.style-grid.cols-3 .ptfc-product-item { width: calc(33.333% - 13.33px); }
.ptfc-products-wrapper.style-grid.cols-4 .ptfc-product-item { width: calc(25% - 15px); }
.ptfc-products-wrapper.style-grid.cols-5 .ptfc-product-item { width: calc(20% - 16px); }

/* Filters */
.ptfc-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; justify-content: flex-start; }
.ptfc-filter-btn { background: #fff; border: none; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 700; cursor: pointer; color: #0f172a; transition: all 0.2s; font-family: inherit; }
.ptfc-filter-btn:hover { background: var(--ptfc-primary); color: #fff; }
.ptfc-filter-btn.active { background: var(--ptfc-primary); color: #fff; }

/* Load More */
.ptfc-load-more-wrap { text-align: center; margin-top: 30px; }
.ptfc-load-more-btn, .ptfc-view-all-btn { background: #fff; border: none; padding: 10px 24px; border-radius: 25px; font-size: 15px; font-weight: bold; cursor: pointer; color: #0f172a; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; font-family: inherit; text-decoration: none; }
.ptfc-load-more-btn:hover, .ptfc-view-all-btn:hover { background: var(--ptfc-primary); color: #fff; }

/* Product List Style */
.ptfc-products-wrapper.style-list .ptfc-product-item { width: 100%; display: flex; border: 1px solid #eee; border-radius: 14px; overflow: hidden; background: #fff; align-items: stretch; }
.ptfc-products-wrapper.style-list.cols-2 .ptfc-product-item { width: calc(50% - 10px); }

/* Image Area */
.ptfc-product-image { position: relative; }
.ptfc-products-wrapper.style-list .ptfc-product-image { width: 45%; }
.ptfc-products-wrapper.style-list .ptfc-product-info { width: 55%; padding: 20px; }
.ptfc-product-image img { width: 100%; aspect-ratio: 1 / 1; display: block; object-fit: cover; border-radius: 12px !important; }

/* Badges */
.ptfc-badge-commission { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: #fff; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); white-space: nowrap; z-index: 2; color: #000; }
.ptfc-products-wrapper.style-grid .ptfc-badge-commission { font-size: 12px; padding: 4px 12px; }
.ptfc-badge-commission span { color: #16a34a; }
.ptfc-quick-view-btn { position: absolute; top: 10px; right: 10px; background: #fff; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 2; transition: all 0.2s; color: #111; }
.ptfc-quick-view-btn:hover { background: var(--ptfc-primary); color: #fff; }
.ptfc-quick-view-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.ptfc-quick-view-btn:hover svg { stroke: #fff; fill: none; }

/* Product Info */
.ptfc-product-info { padding: 15px; }
.ptfc-products-wrapper.style-grid .ptfc-product-info { padding: 12px 12px 15px 12px; }
.ptfc-product-title { font-size: 18px; margin: 0 0 10px 0; font-weight: bold; }
.ptfc-product-title a { color: #000; text-decoration: none; transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptfc-product-title a:hover { color: var(--ptfc-primary); }
.ptfc-products-wrapper.style-grid .ptfc-product-title { font-size: 14px; margin-bottom: 8px; }
.ptfc-price-row { font-size: 12px; padding-left: 10px; line-height: 1.3; color: #000; }
.ptfc-products-wrapper.style-grid .ptfc-price-row { font-size: 12px; padding-left: 10px; margin-bottom: 0; }
.ptfc-products-wrapper.style-list .ptfc-price-row { font-size: 16px; }
.ptfc-price-row.retail { text-decoration: none; border-left: 2px solid #000; }
.ptfc-price-row.wholesale { font-weight: bold; font-style: italic; border-left: 2px solid #000; margin-bottom: 15px; color: #000; }
.ptfc-products-wrapper.style-grid .ptfc-price-row.wholesale { margin-bottom: 10px; }
.ptfc-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; color: #333; }
.ptfc-products-wrapper.style-grid .ptfc-meta-row { font-size: 12px; margin-bottom: 5px; }
.ptfc-meta-row svg { width: 16px; height: 16px; }
.ptfc-products-wrapper.style-grid .ptfc-meta-row svg { width: 14px; height: 14px; }

/* Button */
.ptfc-add-to-cart { display: block; width: calc(100% - 30px); margin: 15px auto 0; background: var(--ptfc-primary); color: #fff; text-align: center; padding: 6px; border-radius: 20px; font-size: 14px; text-decoration: none; font-weight: bold; border: none; cursor: pointer; }
.ptfc-add-to-cart:hover { background: #e65c00; }
.ptfc-add-to-cart.added { background: #16a34a !important; color: #fff !important; }
.ptfc-add-to-cart.added::after { content: ' \2713'; font-weight: bold; margin-left: 5px; }
.ptfc-products-wrapper.style-list .ptfc-add-to-cart { width: 100%; margin: 20px 0 0 0; }

/* Pagination Numbers */
.ptfc-products-container .ptfc-pagination { text-align: center; margin-top: 30px; display: flex; justify-content: center; gap: 10px !important; flex-wrap: wrap; }
.ptfc-products-container .ptfc-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 15px; background: #ffffff !important; color: #475569 !important; border-radius: 50px !important; text-decoration: none !important; font-weight: 600; font-size: 15px; transition: all 0.2s; border: 1px solid #e2e8f0 !important; margin: 0 !important; }
.ptfc-products-container .ptfc-pagination .page-numbers:hover { background: var(--ptfc-primary) !important; color: #ffffff !important; border-color: var(--ptfc-primary) !important; }
.ptfc-products-container .ptfc-pagination .page-numbers.current { background: var(--ptfc-primary) !important; color: #ffffff !important; border-color: var(--ptfc-primary) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important; }

/* Responsive / Mobile Optimization */
@media (max-width: 768px) {
    .ptfc-products-wrapper { gap: 10px; }
    .ptfc-products-wrapper.style-grid .ptfc-product-item { width: calc(50% - 5px) !important; }
    .ptfc-products-wrapper.style-list .ptfc-product-item { width: calc(50% - 5px) !important; flex-direction: column; }
    .ptfc-products-wrapper.style-list .ptfc-product-image { width: 100%; }
    .ptfc-products-wrapper.style-list .ptfc-product-info { width: 100%; padding: 12px 12px 15px 12px; }
    .ptfc-products-wrapper .ptfc-badge-commission { font-size: 10px !important; padding: 2px 6px !important; bottom: 10px !important; }
    .ptfc-products-wrapper.style-list .ptfc-product-title { font-size: 13px !important; margin-bottom: 6px; }
    .ptfc-products-wrapper.style-grid .ptfc-product-title { font-size: 13px !important; margin-bottom: 6px; }
    .ptfc-carousel-card .ptfc-product-title { font-size: 13px !important; margin-bottom: 6px; }
    .ptfc-products-wrapper.style-list .ptfc-price-row { font-size: 11px; padding-left: 10px; margin-bottom: 0; }
    .ptfc-products-wrapper.style-grid .ptfc-price-row { font-size: 11px !important; }
    .ptfc-carousel-card .ptfc-price-row { font-size: 11px !important; }
    .ptfc-products-wrapper.style-list .ptfc-price-row.wholesale { margin-bottom: 10px; }
    .ptfc-products-wrapper .ptfc-meta-row { font-size: 11px !important; margin-bottom: 5px !important; gap: 4px !important; }
    .ptfc-carousel-card .ptfc-meta-row { font-size: 11px !important; margin-bottom: 5px !important; gap: 4px !important; }
    .ptfc-products-wrapper .ptfc-meta-row svg { width: 12px !important; height: 12px !important; }
    .ptfc-carousel-card .ptfc-meta-row svg { width: 12px !important; height: 12px !important; }
    .ptfc-products-wrapper.style-list .ptfc-add-to-cart { display: none; }
    
    /* Optimize Filters for Mobile */
    .ptfc-filters-wrapper {
        margin-bottom: 15px;
        -webkit-mask-image: var(--ptfc-primary), transparent 100%);
        mask-image: var(--ptfc-primary), transparent 100%);
    }
    .ptfc-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px; /* space for scrollbar */
        padding-right: 40px; /* space for the mask fade */
        margin-bottom: 0;
        -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
        scrollbar-width: none; /* hide scrollbar on Firefox */
    }
    .ptfc-filters::-webkit-scrollbar {
        display: none; /* hide scrollbar on Chrome/Safari */
    }
    .ptfc-filter-btn {
        flex-shrink: 0; /* prevent buttons from squishing */
        white-space: nowrap; /* keep text on one line */
    }
}
