/* =========================================================
   PartnerBoost Shop Page
   PocketThrift
========================================================= */

.pt-shop-section {
    padding: 50px 0 70px;
    background: #f7f8fa;
}

.pt-shop-section .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}


/* =========================================================
   Heading
========================================================= */

.pt-shop-heading {
    margin-bottom: 28px;
}

.pt-shop-heading h1 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
}

.pt-shop-heading p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   Filters
========================================================= */

.pt-shop-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.pt-shop-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.pt-shop-filter-item label {
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.pt-shop-filter-item select {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 13px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pt-shop-filter-item select:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.pt-shop-filter-btn,
.pt-shop-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pt-shop-filter-btn {
    color: #ffffff;
    background: #111827;
    border: 1px solid #111827;
    cursor: pointer;
}

.pt-shop-filter-btn:hover {
    background: #000000;
    border-color: #000000;
}

.pt-shop-reset-btn {
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.pt-shop-reset-btn:hover {
    color: #111827;
    background: #f3f4f6;
}


/* =========================================================
   Products Grid
========================================================= */

.pt-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   Product Card
========================================================= */

.pt-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.pt-product-card:hover {
    transform: translateY(-3px);
    border-color: #d1d5db;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   Product Image
========================================================= */

.pt-product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 255px;
    padding: 18px;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
}

.pt-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.pt-product-card:hover .pt-product-image img {
    transform: scale(1.035);
}

.pt-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
    background: #f9fafb;
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   Product Content
========================================================= */

.pt-product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 17px;
}

.pt-product-brand {
    margin-bottom: 7px;
    overflow: hidden;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}


/* =========================================================
   Product Title
========================================================= */

.pt-product-title {
    display: -webkit-box;
    min-height: 66px;
    margin: 0 0 10px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.pt-product-title a {
    color: inherit;
    text-decoration: none;
}

.pt-product-title a:hover {
    color: #2563eb;
}


/* =========================================================
   Rating
========================================================= */

.pt-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 11px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1;
}

.pt-product-star {
    color: #f59e0b;
    font-size: 16px;
}

.pt-product-rating strong {
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.pt-product-reviews {
    color: #9ca3af;
}


/* =========================================================
   Pricing
========================================================= */

.pt-product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 31px;
    margin-bottom: 10px;
}

.pt-current-price {
    color: #111827;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 700;
}

.pt-original-price {
    color: #9ca3af;
    font-size: 13px;
}


/* =========================================================
   Discount
========================================================= */

.pt-product-discount {
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 5px 8px;
    color: #166534;
    background: #dcfce7;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}


/* =========================================================
   Coupon
========================================================= */

.pt-product-coupon {
    margin-bottom: 12px;
    padding: 9px 10px;
    color: #166534;
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.pt-product-coupon span {
    margin-right: 4px;
    color: #15803d;
    font-weight: 700;
}


/* =========================================================
   View Deal Button
========================================================= */

.pt-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 43px;
    margin-top: auto;
    padding: 11px 15px;
    color: #ffffff;
    background: #111827;
    border: 1px solid #111827;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.pt-product-btn:hover {
    color: #ffffff;
    background: #000000;
    border-color: #000000;
    transform: translateY(-1px);
}


/* =========================================================
   API / Empty Messages
========================================================= */

.pt-shop-message,
.pt-shop-empty {
    grid-column: 1 / -1;
    width: 100%;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

.pt-shop-error {
    margin-bottom: 25px;
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.pt-shop-error small {
    display: block;
    margin-top: 8px;
    color: #b91c1c;
    font-size: 12px;
    word-break: break-word;
}

.pt-shop-empty h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 20px;
}

.pt-shop-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}


/* =========================================================
   Pagination
========================================================= */

.pt-shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 38px;
}

.pt-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 42px;
    padding: 0 17px;
    color: #ffffff;
    background: #111827;
    border: 1px solid #111827;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pt-pagination-btn:hover {
    color: #ffffff;
    background: #000000;
}

.pt-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 15px;
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   Tablet
========================================================= */

@media (max-width: 1199px) {

    .pt-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pt-product-image {
        height: 240px;
    }

}


/* =========================================================
   Small Tablet
========================================================= */

@media (max-width: 991px) {

    .pt-shop-section {
        padding-top: 40px;
    }

    .pt-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .pt-shop-heading h1 {
        font-size: 32px;
    }

}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 767px) {

    .pt-shop-section {
        padding: 30px 0 50px;
    }

    .pt-shop-section .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pt-shop-heading {
        margin-bottom: 20px;
    }

    .pt-shop-heading h1 {
        font-size: 28px;
    }

    .pt-shop-heading p {
        font-size: 14px;
    }

    .pt-shop-filters {
        align-items: stretch;
        padding: 13px;
    }

    .pt-shop-filter-item {
        width: 100%;
        min-width: 100%;
    }

    .pt-shop-filter-btn,
    .pt-shop-reset-btn {
        flex: 1;
    }

    .pt-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .pt-product-card {
        border-radius: 10px;
    }

    .pt-product-image {
        height: 180px;
        padding: 10px;
    }

    .pt-product-content {
        padding: 12px;
    }

    .pt-product-brand {
        margin-bottom: 5px;
        font-size: 9px;
    }

    .pt-product-title {
        min-height: 58px;
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.45;
    }

    .pt-product-rating {
        gap: 3px;
        margin-bottom: 8px;
        font-size: 11px;
    }

    .pt-product-star {
        font-size: 14px;
    }

    .pt-product-rating strong {
        font-size: 11px;
    }

    .pt-current-price {
        font-size: 17px;
    }

    .pt-original-price {
        font-size: 11px;
    }

    .pt-product-discount {
        padding: 4px 6px;
        font-size: 9px;
    }

    .pt-product-coupon {
        padding: 7px;
        font-size: 10px;
    }

    .pt-product-btn {
        min-height: 39px;
        padding: 9px;
        font-size: 12px;
    }

}


/* =========================================================
   Very Small Mobile
========================================================= */

@media (max-width: 420px) {

    .pt-product-image {
        height: 160px;
    }

    .pt-product-content {
        padding: 10px;
    }

    .pt-product-title {
        font-size: 12.5px;
    }

}


/* =========================================================
   Accessibility
========================================================= */

.pt-product-btn:focus-visible,
.pt-pagination-btn:focus-visible,
.pt-shop-filter-btn:focus-visible,
.pt-shop-reset-btn:focus-visible,
.pt-product-title a:focus-visible,
.pt-product-image:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

/* =========================================================
   Platform / Product Meta
========================================================= */

.pt-product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}

.pt-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* Amazon */

.pt-platform-amazon {
    color: #111827;
    background: #ffedd5;
}


/* Walmart */

.pt-platform-walmart {
    color: #0053a0;
    background: #e0f2fe;
}


/* DTC */

.pt-platform-dtc {
    color: #5b21b6;
    background: #ede9fe;
}


/* eBay - ready for later */

.pt-platform-ebay {
    color: #991b1b;
    background: #fee2e2;
}


/* =========================================================
   Brand
========================================================= */

.pt-product-meta .pt-product-brand {
    margin-bottom: 0;
}


/* =========================================================
   Category
========================================================= */

.pt-product-category {
    margin-bottom: 7px;
    overflow: hidden;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   Availability
========================================================= */

.pt-product-availability {
    align-self: flex-start;
    margin-bottom: 12px;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.pt-product-availability.is-in-stock {
    color: #15803d;
}

.pt-product-availability.is-unavailable {
    color: #b91c1c;
}


/* =========================================================
   Disabled CTA
========================================================= */

.pt-product-btn-disabled {
    color: #9ca3af;
    background: #e5e7eb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

.pt-product-btn-disabled:hover {
    color: #9ca3af;
    background: #e5e7eb;
    border-color: #e5e7eb;
    transform: none;
}


/* ============================================================
   AJAX Shop Results
============================================================ */

.pt-shop-results {
    min-height: 720px;
    position: relative;
}


/* ============================================================
   Product Images - CLS Protection
============================================================ */

.pt-product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.pt-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ============================================================
   Skeleton Grid
============================================================ */

.pt-shop-skeletons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.pt-skeleton-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.pt-skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #edf0f4;
    position: relative;
    overflow: hidden;
}

.pt-skeleton-content {
    padding: 16px;
}

.pt-skeleton-line,
.pt-skeleton-button {
    position: relative;
    overflow: hidden;
    background: #edf0f4;
}

.pt-skeleton-line {
    height: 14px;
    margin-bottom: 12px;
    border-radius: 5px;
}

.pt-skeleton-small {
    width: 45%;
    height: 11px;
}

.pt-skeleton-short {
    width: 65%;
}

.pt-skeleton-button {
    width: 100%;
    height: 42px;
    margin-top: 22px;
    border-radius: 7px;
}

.pt-skeleton-line::after,
.pt-skeleton-image::after,
.pt-skeleton-button::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.7),
            transparent);
    animation: pt-shop-skeleton 1.4s infinite;
}

@keyframes pt-shop-skeleton {
    100% {
        transform: translateX(100%);
    }
}


/* ============================================================
   Error
============================================================ */

.pt-shop-error {
    text-align: center;
    padding: 30px;
}

.pt-shop-error small {
    display: block;
    margin-top: 8px;
}

.pt-shop-retry-btn {
    margin-top: 18px;
    padding: 10px 20px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}


/* ============================================================
   AJAX Pagination Buttons
============================================================ */

.pt-shop-pagination button {
    font: inherit;
    cursor: pointer;
}


/* ============================================================
   Hidden
============================================================ */

.pt-shop-results [hidden] {
    display: none !important;
}


/* ============================================================
   Tablet
============================================================ */

@media (max-width: 991px) {

    .pt-shop-skeletons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ============================================================
   Mobile
============================================================ */

@media (max-width: 575px) {

    .pt-shop-results {
        min-height: 600px;
    }

    .pt-shop-skeletons {
        grid-template-columns: 1fr;
        gap: 16px;
    }

}