.tp-shop {
    background: #fff;
    color: var(--ink);
    font-family: var(--sans);
}

.tp-shop *,
.tp-shop *::before,
.tp-shop *::after {
    box-sizing: border-box;
}

/* deal bar */

.tp-dealbar {
    background: var(--blue);
    color: #fff;
}

.tp-dealbar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 46px;
    flex-wrap: wrap;
    padding: 6px 24px;
}

.tp-dealbar__text {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tp-dealbar__timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.tp-dealbar__timer i {
    font-style: normal;
    opacity: 0.5;
}

.tp-dealbar__hint {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.75;
}

/* head */

.tp-shophead {
    padding: 44px 0 8px;
}

.tp-shophead__title {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tp-shophead__desc {
    margin-top: 10px;
    max-width: 60ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* toolbar */

.tp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 26px;
}

.tp-toolbar__left,
.tp-toolbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-toolbar__label {
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 2px;
}

.tp-chip {
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.tp-chip:hover {
    border-color: var(--ink);
}

.tp-chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.tp-toolbar .woocommerce-ordering {
    margin: 0;
}

.tp-toolbar .woocommerce-ordering select {
    padding: 7px 30px 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
}

.tp-toolbar__count {
    font-size: 12px;
    color: var(--muted);
}

/* grid */

.tp-pgrid {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tp-pcard {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ececea;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 0.68, 0.16, 1), border-color 0.4s ease;
}

.tp-pcard:hover {
    border-color: #dedcd8;
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -22px rgba(14, 17, 22, 0.35);
}

.tp-pcard__media {
    position: relative;
    display: block;
    background: var(--mist);
}

.tp-pcard__media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 0.68, 0.16, 1);
}

.tp-pcard:hover .tp-pcard__media img {
    transform: scale(1.035);
}

.tp-pcard__save {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tp-pcard__body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px 13px 14px;
    flex: 1;
}

.tp-pcard__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
    min-height: 36px;
}

.tp-pcard__title:hover {
    color: var(--blue);
}

.tp-pcard__price {
    font-size: 12.5px;
    color: var(--ink);
    font-weight: 600;
}

.tp-pcard__price del {
    color: var(--muted);
    font-weight: 400;
    margin-left: 5px;
    opacity: 0.8;
}

.tp-pcard__price ins {
    text-decoration: none;
}

.tp-pcard__cta {
    margin-top: auto;
    padding-top: 4px;
}

.tp-pcard__cta .button,
.tp-pcard__cta .added_to_cart {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--blue);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.tp-pcard__cta .button:hover {
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-1px);
}

.tp-pcard__cta .button.product_type_variable,
.tp-pcard__cta .button.product_type_grouped {
    background: #fff;
    color: var(--ink);
    border-color: var(--ink);
}

.tp-pcard__cta .button.product_type_variable:hover,
.tp-pcard__cta .button.product_type_grouped:hover {
    background: var(--ink);
    color: #fff;
}

.tp-pcard__cta .added_to_cart {
    margin-top: 6px;
    background: transparent;
    color: var(--blue);
    border: 0;
    font-size: 11px;
    padding: 2px;
}

/* pager */

.tp-pager .woocommerce-pagination {
    margin: 0 0 20px;
}

.tp-pager ul.page-numbers {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.tp-pager .page-numbers li {
    border: 0;
}

.tp-pager .page-numbers a,
.tp-pager .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--ink);
    text-decoration: none;
}

.tp-pager .page-numbers .current {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* subscribe */

.tp-subscribe {
    padding: 64px 0 84px;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 20px;
}

.tp-subscribe h2 {
    margin: 0 0 10px;
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tp-subscribe p {
    margin: 0 auto 22px;
    max-width: 46ch;
    font-size: 13.5px;
    color: var(--muted);
}

.tp-sub-form {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tp-sub-form input {
    width: 260px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tp-sub-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.tp-sub-form button {
    padding: 11px 26px;
    border: 0;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.tp-sub-form button:hover {
    background: var(--blue);
    transform: translateY(-1px);
}

.tp-empty {
    padding: 60px 0;
    color: var(--muted);
    text-align: center;
}

/* hide theme archive title */

.post-type-archive-product .hero-section,
.tax-product_cat .hero-section,
.post-type-archive-product .entry-header,
.tax-product_cat .entry-header {
    display: none !important;
}

@media (max-width: 1100px) {
    .tp-pgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .tp-pgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tp-shophead {
        padding: 28px 0 4px;
    }
    .tp-dealbar__inner {
        gap: 10px;
        min-height: 40px;
    }
    .tp-dealbar__hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .tp-pcard__title {
        font-size: 12px;
    }
    .tp-sub-form input {
        width: 100%;
    }
    .tp-sub-form button {
        width: 100%;
    }
}
