/* Powertech Catalog Styles */
* {
    box-sizing: border-box;
}

/* ── Catalog Wrapper ── */
.pt-catalog-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
    width: 100%;
}

/* ── Device Type Category Row ── */
.pt-category-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pt-category-row::-webkit-scrollbar {
    display: none;
}

.pt-laptop-sub-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: -6px;
    padding: 0 8px 8px;
}

.pt-laptop-sub-row.is-hidden {
    display: none;
}

.pt-laptop-sub-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pt-laptop-sub-item:hover {
    border-color: #031c44;
    color: #031c44;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pt-laptop-sub-item.active {
    background: #031c44;
    border-color: #031c44;
    color: #fff;
}

.pt-laptop-sub-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.pt-laptop-sub-item.active .pt-laptop-sub-count {
    background: rgba(255, 255, 255, 0.24);
}

.pt-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    flex: 1;
    min-width: 0;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.pt-category-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #031c44;
    color: #031c44;
}

.pt-category-item.active {
    background: #031c44;
    color: #fff;
    border-color: #031c44;
    box-shadow: 0 4px 16px rgba(3, 28, 68, 0.3);
}

.pt-category-item.active .pt-category-icon svg {
    stroke: #fff;
}

.pt-category-item.active .pt-category-label {
    color: #fff;
}

.pt-category-item.active .pt-category-count {
    color: rgba(255, 255, 255, 0.8);
}

.pt-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    transition: background 0.25s ease;
}

.pt-category-item.active .pt-category-icon {
    background: rgba(255, 255, 255, 0.2);
}

.pt-category-icon svg {
    transition: stroke 0.25s ease;
}

.pt-category-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.pt-category-count {
    font-size: 11px;
    color: #86868b;
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* ── Products Grid ── */
.pt-catalog-products {
    flex: 1;
    min-width: 0;
}

.pt-catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.pt-product-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    width: -webkit-fill-available;
    width: -moz-available;
    width: fill-available;
    max-width: 100%;
}

.pt-product-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.pt-product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f5f5f7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pt-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.pt-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pt-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1d1d1f;
    flex: 1;
}

.pt-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 8px 0 16px 0;
}

.pt-view-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background: #031c44;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: auto;
    width: 100%;
    border: none;
    cursor: pointer;
}

.pt-view-btn:hover {
    background: #0a2a5c;
    color: #fff;
}

/* ── Spin animation for loading ── */
@keyframes pt-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ── Tablet Screens ── */
@media (max-width: 1024px) {
    .pt-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pt-category-item {
        min-width: 90px;
        padding: 14px 16px;
    }
}

/* ── Mobile Screens ── */
@media (max-width: 768px) {
    .pt-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pt-product-info {
        padding: 16px;
    }

    .pt-category-item {
        min-width: 80px;
        padding: 12px 14px;
    }

    .pt-laptop-sub-row {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .pt-laptop-sub-row::-webkit-scrollbar {
        display: none;
    }

    .pt-category-icon {
        width: 40px;
        height: 40px;
    }

    .pt-category-icon svg {
        width: 22px;
        height: 22px;
    }

    .pt-category-label {
        font-size: 12px;
    }

    .pt-category-count {
        font-size: 10px;
    }
}

/* ── Small Screens ── */
@media (max-width: 480px) {
    .pt-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

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

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

    .pt-product-name {
        font-size: 13px;
        min-height: 36px;
        margin-bottom: 4px;
    }

    .pt-product-price {
        font-size: 16px;
        margin: 4px 0 12px 0;
    }

    .pt-view-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

}

/* ── Ultra Small Screens (Folded) ── */
@media (max-width: 320px) {
    .pt-catalog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ── Warranty Card Styles ── */
.ptp-warranty-card {
    display: flex;
    gap: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ptp-warranty-icon {
    font-size: 28px;
    flex-shrink: 0;
    padding-top: 2px;
}

.ptp-warranty-content {
    flex: 1;
}

.ptp-warranty-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    text-transform: capitalize;
}

.ptp-warranty-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    transition: color 0.2s ease;
}

.ptp-warranty-card a.ptp-warranty-desc {
    color: #031c44;
    text-decoration: underline;
}

.ptp-warranty-card a.ptp-warranty-desc:hover {
    color: #021633;
}

/* ── Grade Card Styles ── */
.ptp-grade-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.ptp-grade-label {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.ptp-grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ptp-grade-link {
    width: 100%;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    transition: color 0.2s ease;
}

a.ptp-grade-link {
    color: #031c44;
    text-decoration: underline;
}

a.ptp-grade-link:hover {
    color: #021633;
}
