/* =============================================
   Perfex Shop — Client-facing product styles
   ============================================= */

/* ── Top bar ─────────────────────────────────── */
.pfx-shop-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

/* ── Category strip ──────────────────────────── */
.pfx-cat-strip-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.pfx-cat-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.pfx-cat-strip::-webkit-scrollbar { display: none; }

.pfx-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    min-width: 76px;
    padding: 8px 6px;
    border-radius: 12px;
    transition: background 0.18s;
    user-select: none;
    -webkit-user-select: none;
}
.pfx-cat-item:hover { background: #f0f4ff; }
.pfx-cat-item.active .pfx-cat-icon { background: #2563eb; color: #fff; }
.pfx-cat-item.active span { color: #2563eb; font-weight: 600; }

.pfx-cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e8edf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #2563eb;
    transition: background 0.18s, color 0.18s;
}

.pfx-cat-item span {
    font-size: 12px;
    color: #555;
    text-align: center;
    white-space: nowrap;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pfx-cat-scroll-btn {
    background: #fff;
    border: 1px solid #dde3f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #2563eb;
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.15s;
    z-index: 2;
}
.pfx-cat-scroll-btn:hover { background: #f0f4ff; }

/* ── Cart icon button ────────────────────────── */
.pfx-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff !important;
    font-size: 20px;
    text-decoration: none !important;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(37,99,235,0.35);
    transition: background 0.18s, transform 0.15s;
}
.pfx-cart-btn:hover { background: #1d4ed8; transform: scale(1.07); }

.pfx-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
}

/* ── Product grid ────────────────────────────── */
#filter_html {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* ── Product card ────────────────────────────── */
.pfx-product-col {
    padding: 8px;
}

.pfx-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.09);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.pfx-card:hover {
    box-shadow: 0 6px 24px rgba(37,99,235,0.14);
    transform: translateY(-3px);
}

/* Product image */
.pfx-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 68%; /* aspect ratio */
    overflow: hidden;
    background: #f5f6fa;
    cursor: pointer;
}
.pfx-card-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.pfx-card:hover .pfx-card-img-wrap img { transform: scale(1.04); }

/* Badges on image */
.pfx-card-badges {
    position: absolute;
    top: 8px; left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.pfx-badge-digital {
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.pfx-badge-out {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Gallery thumbs on image hover */
.pfx-gallery-strip {
    position: absolute;
    bottom: 6px; left: 6px;
    display: flex;
    gap: 4px;
    z-index: 2;
}
.pfx-gallery-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #fff;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
}
.pfx-gallery-thumb:hover { opacity: 1; transform: scale(1.1); }

/* Card body */
.pfx-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.pfx-card-category {
    font-size: 11px;
    color: #2563eb;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pfx-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 2px 0 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pfx-card-desc {
    font-size: 12px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.pfx-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #2563eb;
    margin: 4px 0 2px;
}
.pfx-card-price .pfx-price-sub {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin-left: 2px;
}
.pfx-card-price .pfx-price-tax {
    font-size: 11px;
    font-weight: 400;
    color: #f59e0b;
}

/* Card footer: quantity + buttons */
.pfx-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pfx-qty-input {
    width: 60px !important;
    height: 34px !important;
    padding: 4px 6px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
    text-align: center;
    flex-shrink: 0;
}
.pfx-qty-input:focus { border-color: #2563eb !important; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.15) !important; }

.pfx-btn-buy {
    flex: 1;
    height: 34px;
    background: #2563eb;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
    padding: 0 8px;
    white-space: nowrap;
}
.pfx-btn-buy:hover { background: #1d4ed8; }

.pfx-btn-cart {
    height: 34px;
    padding: 0 10px;
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.pfx-btn-cart:hover { background: #e2e8f0; color: #1e293b !important; }

.pfx-btn-disabled {
    height: 34px;
    flex: 1;
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    cursor: not-allowed;
    text-align: center;
    line-height: 34px;
}

/* ── Lightbox ────────────────────────────────── */
#prod_lb_overlay { font-family: inherit; }

/* ── Loader ──────────────────────────────────── */
.image_loader { text-align: center; padding: 40px; color: #94a3b8; }

/* ── No product ──────────────────────────────── */
.no_product img { max-height: 160px; opacity: 0.5; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .pfx-cat-icon { width: 44px; height: 44px; font-size: 18px; }
    .pfx-cat-item { min-width: 62px; }
    .pfx-card-price { font-size: 15px; }
}
