/* ================================================================
   TRADEPRINT THEME — COMPONENTS.CSS
   Product Cards · Review Cards · Service Cards · USP · Tabs ·
   Modals · Toast · Pagination · Tags
   ================================================================ */

/* ----------------------------------------------------------------
   USP BAR
   ---------------------------------------------------------------- */
.usp-section {
    padding: 0;
    background: #f8faff;
    border-top: 1px solid var(--tp-border);
    border-bottom: 1px solid var(--tp-border);
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.usp-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 22px 28px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--tp-border);
    border-radius: 0;
    height: auto;
    transition: background 0.2s;
}

.usp-item:last-child {
    border-right: none;
}

.usp-item:hover {
    background: rgba(21, 101, 192, 0.05);
}

.usp-icon-circle {
    width: 46px;
    height: 46px;
    background: rgba(21, 101, 192, 0.10);
    border: 1px solid rgba(21, 101, 192, 0.20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.usp-item:hover .usp-icon-circle {
    background: rgba(21, 101, 192, 0.16);
    border-color: rgba(21, 101, 192, 0.35);
}

.usp-icon-circle i {
    font-size: 1.05rem;
    color: var(--tp-green);
}

.text-tp-green { color: var(--tp-green) !important; }

.usp-content {
    flex: 1;
    min-width: 0;
}

.usp-title {
    color: var(--tp-dark);
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}

.usp-title sup {
    font-size: 9px;
    color: var(--tp-green);
}

.usp-desc {
    color: var(--tp-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 400;
    line-height: 1.3;
}

.usp-text {
    color: var(--tp-dark);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
}

/* Tablet: 2 columns */
@media (max-width: 991px) {
    .usp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .usp-item:nth-child(2) {
        border-right: none;
    }
    .usp-item:nth-child(1),
    .usp-item:nth-child(2) {
        border-bottom: 1px solid var(--tp-border);
    }
    .usp-item {
        padding: 18px 22px;
    }
}

/* Mobile: 1 column */
@media (max-width: 575px) {
    .usp-grid {
        grid-template-columns: 1fr;
    }
    .usp-item {
        border-right: none;
        border-bottom: 1px solid var(--tp-border);
        padding: 15px 20px;
        gap: 14px;
    }
    .usp-item:nth-child(1),
    .usp-item:nth-child(2) {
        border-bottom: 1px solid var(--tp-border);
    }
    .usp-item:last-child {
        border-bottom: none;
    }
    .usp-icon-circle {
        width: 40px;
        height: 40px;
    }
}

/* ----------------------------------------------------------------
   CHECKOUT STEPS — shared: cart · checkout · order-confirmation
   ---------------------------------------------------------------- */
.checkout-steps-wrap {
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-steps {
    display: flex;
    align-items: center;
    width: 100%;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.checkout-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: box-shadow .2s;
}

.checkout-step.done    .checkout-step__num {
    background: var(--tp-green);
    color: #fff;
}
.checkout-step.active  .checkout-step__num {
    background: var(--tp-green);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(21,101,192,.14);
}
.checkout-step.pending .checkout-step__num {
    background: var(--tp-white);
    color: var(--tp-text-light);
    border: 2px solid var(--tp-border-dark);
}

.checkout-step__label {
    font-size: 13px;
    white-space: nowrap;
}

.checkout-step.done    .checkout-step__label { color: var(--tp-green); font-weight: 600; }
.checkout-step.active  .checkout-step__label { color: var(--tp-dark);  font-weight: 700; }
.checkout-step.pending .checkout-step__label { color: var(--tp-text-light); font-weight: 400; }

.checkout-step-line {
    flex: 1;
    height: 2px;
    background: var(--tp-border);
    border-radius: 2px;
    margin: 0 10px;
    min-width: 20px;
}

.checkout-step-line.done { background: var(--tp-green); }

@media (max-width: 767px) {
    .checkout-steps-wrap { padding: 14px 16px; }
    .checkout-step__label { font-size: 12px; }
    .checkout-step-line { margin: 0 6px; min-width: 12px; }
}

@media (max-width: 575px) {
    .checkout-steps-wrap { padding: 16px 12px; }

    /* align-items: flex-start so lines can margin-top to circle centre */
    .checkout-steps { flex-wrap: nowrap; align-items: flex-start; }

    /* Each step: circle on top, label below */
    .checkout-step {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .checkout-step__num {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .checkout-step.active .checkout-step__num { box-shadow: 0 0 0 3px rgba(21,101,192,.12); }

    /* Label always visible — wrap is fine */
    .checkout-step__label {
        font-size: 9px;
        font-weight: 600;
        text-align: center;
        white-space: normal;
        word-break: break-word;
        max-width: 54px;
        line-height: 1.25;
    }

    /* Push line down to circle centre: (28px / 2) - (2px / 2) = 13px */
    .checkout-step-line {
        margin-top: 13px;
        margin-left: 3px;
        margin-right: 3px;
        min-width: 10px;
        flex-shrink: 1;
    }
}

@media (max-width: 360px) {
    .checkout-step__num { width: 24px; height: 24px; font-size: 9px; }
    .checkout-step__label { font-size: 8.5px; max-width: 46px; }
    .checkout-step-line { margin-top: 11px; min-width: 6px; margin-left: 2px; margin-right: 2px; }
    .checkout-step { gap: 5px; }
}

/* ----------------------------------------------------------------
   TOAST NOTIFICATION
   ---------------------------------------------------------------- */
.tp-toast {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: var(--z-toast);
    background: var(--tp-dark);
    color: var(--tp-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    max-width: 380px;
    animation: slideDown .3s ease-out;
}

.tp-toast--success { background: var(--tp-green); }
.tp-toast--warning { background: #d97706; }
.tp-toast--error   { background: var(--tp-red-dark); }

.tp-toast i { font-size: 16px; flex-shrink: 0; }

.tp-toast__close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,.65);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    transition: color .15s;
}

.tp-toast__close:hover { color: var(--tp-white); }

/* ----------------------------------------------------------------
   MODAL
   ---------------------------------------------------------------- */
.tp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: var(--z-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.tp-modal-overlay.open {
    display: flex;
    animation: fadeIn .2s ease-out;
}

.tp-modal {
    background: var(--tp-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeUp .25s ease-out;
}

.tp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--tp-border);
}

.tp-modal__header h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
}

.tp-modal__close {
    width: 32px;
    height: 32px;
    background: var(--tp-bg);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    color: var(--tp-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.tp-modal__close:hover { background: var(--tp-border); color: var(--tp-text); }

.tp-modal__body { padding: 24px; }
.tp-modal__footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--tp-border);
}

/* ----------------------------------------------------------------
   PAGINATION
   ---------------------------------------------------------------- */
.tp-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tp-page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--tp-border);
    border-radius: var(--radius);
    background: var(--tp-white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--tp-text);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    padding: 0 8px;
}

.tp-page-btn:hover {
    border-color: var(--tp-green);
    color: var(--tp-green);
}

.tp-page-btn.active {
    background: var(--tp-green);
    border-color: var(--tp-green);
    color: var(--tp-white);
}

.tp-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ----------------------------------------------------------------
   ALERT / NOTICE BANNERS
   ---------------------------------------------------------------- */
.tp-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    border: 1px solid;
}

.tp-alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.tp-alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.tp-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.tp-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.tp-alert--error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ----------------------------------------------------------------
   RESPONSIVE — COMPONENTS
   ---------------------------------------------------------------- */
@media (max-width: 575px) {
    .tp-toast { right: 12px; left: 12px; min-width: unset; max-width: unset; }
}


/* ================================================================
   SHARED — PAGE HEADER (dark gradient, used across multiple pages)
   ================================================================ */
.page-header {
    background:
        linear-gradient(160deg, rgba(3,7,18,.75) 0%, rgba(14,42,95,.65) 50%, rgba(21,101,192,.55) 100%),
        url('../images/home-banner.webp') center/cover no-repeat;
    padding: 34px 0;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(66,165,245,.1) 0%, transparent 60%);
    pointer-events: none;
}
.page-header .container-tp { position: relative; }
.page-header__title {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}
.page-header__breadcrumb {
    font-size: 12px;
    color: rgba(255,255,255,.5);
}
.page-header__breadcrumb a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: color .15s;
}
.page-header__breadcrumb a:hover { color: #fff; }
.page-header__breadcrumb .sep { margin: 0 5px; opacity: .4; }
.page-header__breadcrumb strong { color: rgba(255,255,255,.9); font-weight: 600; }
@media (max-width: 767px) { .page-header { padding: 24px 0; } }

/* ================================================================
   SHARED — PRODUCT CARD (product-category + product-detail + any page)
   ================================================================ */
.product-card {
    background: #fff;
    border: 1.5px solid var(--tp-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.product-card:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,.11);
    transform: translateY(-4px);
    border-color: rgba(21,101,192,.3);
    color: inherit;
}
.product-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
}
.product-card__thumb {
   /*  height: 140px; */
    position: relative;
    overflow: hidden;
    background: var(--tp-bg);
}
.product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.product-card:hover .product-card__thumb img { transform: scale(1.06); }
.product-card__body {
    padding: 12px 12px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.product-card__name {
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-dark);
    line-height: 1.35;
}
.product-card__rating { display: flex; align-items: center; gap: 4px; }
.product-card__stars { color: #f59e0b; font-size: 10px; letter-spacing: .5px; }
.product-card__review-count { font-size: 10px; color: var(--tp-text-muted); }
.product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}
.product-card__price { font-size: 11px; color: var(--tp-text-muted); }
.product-card__price strong { font-size: 14px; font-weight: 800; color: var(--tp-dark); }
.product-card__price-old { text-decoration: line-through; font-size: 11px; color: #9ca3af; }
.product-card__price-save {
    font-size: 10px;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    padding: 1px 6px;
    border-radius: 20px;
}
.product-card__footer { padding: 8px 12px 12px; }
.product-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: var(--tp-green);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    letter-spacing: .2px;
}
.product-card__cta:hover { background: var(--tp-green-dark); color: #fff; }

/* ================================================================
   SHARED — PAGINATION
   ================================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span.pg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--tp-border);
    border-radius: 7px;
    font-size: 13px;
    color: var(--tp-dark);
    text-decoration: none;
    transition: all .15s;
    font-weight: 500;
}
.pagination a:hover { background: #E3F2FD; border-color: var(--tp-green); color: var(--tp-green); }
.pagination .active { background: var(--tp-green); color: #fff; border-color: var(--tp-green); font-weight: 700; }
.pagination .next { width: auto; padding: 0 16px; gap: 6px; }
.pagination .pg-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--tp-text-muted);
}
