/**
 * Print Products — frontend styles.
 *
 * @package VTX_Theme
 */

/* ── Archive grid ─────────────────────────────────── */

.vtx-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--vtx-space-lg, 1.5rem);
}

/* ── Product card ─────────────────────────────────── */

.vtx-product-card {
    position: relative;
    background: var(--vtx-color-surface-elevated, #ffffff);
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    border-radius: var(--vtx-radius-lg, 0.3125rem);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.vtx-product-card:hover {
    border-color: var(--vtx-color-border-accent, rgba(255, 172, 39, 0.25));
    box-shadow: var(--vtx-color-card-glow, 0 4px 4px rgba(0, 0, 0, 0.15));
    transform: translateY(-3px);
}

/* Image */
.vtx-product-card__image {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--vtx-color-surface, #f5f5f5);
}

.vtx-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.vtx-product-card:hover .vtx-product-card__image img {
    transform: scale(1.05);
}

/* Gradient overlay on hover */
.vtx-product-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.vtx-product-card:hover .vtx-product-card__image::after {
    opacity: 1;
}

/* Category badge on image */
.vtx-product-card__category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vtx-color-text-primary, #1A1A1A);
    background: var(--vtx-color-accent, #FFAC27);
    padding: 0.25rem 0.625rem;
    border-radius: var(--vtx-radius-sm, 0.1875rem);
    line-height: 1.4;
}

/* Card body */
.vtx-product-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.vtx-product-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--vtx-color-text-primary, #58595B);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.vtx-product-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vtx-product-card__title a:hover {
    color: var(--vtx-color-accent, #FFAC27);
}

.vtx-product-card__price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vtx-color-accent, #FFAC27);
    margin-bottom: 0.625rem;
}

.vtx-product-card__price-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--vtx-color-text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vtx-product-card__excerpt {
    font-size: 0.875rem;
    color: var(--vtx-color-text-secondary, #6b7280);
    line-height: 1.6;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vtx-product-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vtx-color-accent, #FFAC27);
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.vtx-product-card__link:hover {
    gap: 0.625rem;
}

.vtx-product-card__link .material-symbols-outlined {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.vtx-product-card:hover .vtx-product-card__link .material-symbols-outlined {
    transform: translateX(2px);
}

/* Scroll-triggered animation */
.vtx-product-card[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out,
                border-color 0.3s ease, box-shadow 0.3s ease;
}

.vtx-product-card[data-animate].vtx-animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grid children */
.vtx-product-card[data-animate]:nth-child(2) { transition-delay: 0.1s; }
.vtx-product-card[data-animate]:nth-child(3) { transition-delay: 0.2s; }
.vtx-product-card[data-animate]:nth-child(4) { transition-delay: 0.3s; }
.vtx-product-card[data-animate]:nth-child(5) { transition-delay: 0.4s; }
.vtx-product-card[data-animate]:nth-child(6) { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    .vtx-product-card[data-animate] {
        opacity: 1;
        transform: none;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }
}

/* ── Single product page ──────────────────────────── */

.vtx-product-single {
    max-width: var(--vtx-container-max-width, 1200px);
    margin-inline: auto;
    padding: var(--vtx-space-xl, 3rem) var(--vtx-container-padding, 2rem) var(--vtx-space-2xl);
}

/* Breadcrumb */
.vtx-product-single__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--vtx-color-text-muted, #9ca3af);
    margin-bottom: var(--vtx-space-lg, 2rem);
    flex-wrap: wrap;
}

.vtx-product-single__breadcrumb a {
    color: var(--vtx-color-text-secondary, #6b7280);
    text-decoration: none;
    transition: color 0.2s ease;
}

.vtx-product-single__breadcrumb a:hover {
    color: var(--vtx-color-accent, #FFAC27);
}

.vtx-product-single__breadcrumb-sep {
    color: var(--vtx-color-text-muted, #9ca3af);
    font-size: 0.75rem;
}

.vtx-product-single__breadcrumb-current {
    color: var(--vtx-color-text-primary, #58595B);
    font-weight: 500;
}

/* 2-column grid */
.vtx-product-single__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vtx-space-2xl, 3rem);
    align-items: start;
}

/* Image */
.vtx-product-single__image {
    position: sticky;
    top: calc(var(--vtx-header-height, 80px) + var(--vtx-space-lg, 2rem));
    border-radius: var(--vtx-radius-lg, 0.3125rem);
    overflow: hidden;
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    background: var(--vtx-color-surface-elevated, #f9fafb);
}

.vtx-product-single__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Details column */
.vtx-product-single__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--vtx-space-sm, 1rem);
}

.vtx-product-single__cat-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vtx-color-accent, #FFAC27);
    background: var(--vtx-glow-primary-8, rgba(255, 172, 39, 0.08));
    padding: 0.25rem 0.75rem;
    border-radius: var(--vtx-radius-full, 9999px);
    text-decoration: none;
    transition: background 0.2s ease;
}

.vtx-product-single__cat-tag:hover {
    background: var(--vtx-glow-primary-15, rgba(255, 172, 39, 0.15));
    color: var(--vtx-color-accent, #FFAC27);
}

.vtx-product-single__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--vtx-color-text-primary, #58595B);
    line-height: 1.15;
    margin: 0 0 var(--vtx-space-md, 1rem);
}

/* Price block */
.vtx-product-single__price-block {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: var(--vtx-space-sm, 1rem) var(--vtx-space-md, 1.5rem);
    background: var(--vtx-glow-primary-4, rgba(255, 172, 39, 0.04));
    border: 1px solid var(--vtx-glow-primary-15, rgba(255, 172, 39, 0.15));
    border-radius: var(--vtx-radius-md, 0.3125rem);
    margin-bottom: var(--vtx-space-lg, 1.5rem);
}

.vtx-product-single__price-from {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vtx-color-text-muted, #9ca3af);
}

.vtx-product-single__price {
    font-family: var(--vtx-font-heading, 'Jost', sans-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--vtx-color-accent, #FFAC27);
    line-height: 1;
}

/* Content */
.vtx-product-single__content {
    color: var(--vtx-color-text-secondary, #4b5563);
    line-height: 1.75;
    font-size: 1rem;
    margin-bottom: var(--vtx-space-md, 1.5rem);
}

.vtx-product-single__content p {
    margin: 0 0 var(--vtx-space-sm, 1rem);
}

/* Setup fee notice */
.vtx-product-single__setup-fee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--vtx-color-text-secondary, #6b7280);
    padding: 0.75rem 1rem;
    background: var(--vtx-color-surface-elevated, #f9fafb);
    border-radius: var(--vtx-radius-md, 0.3125rem);
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    margin-bottom: var(--vtx-space-md, 1.5rem);
}

.vtx-product-single__setup-fee .material-symbols-outlined {
    font-size: 18px;
    color: var(--vtx-color-accent, #FFAC27);
}

/* CTA button */
.vtx-product-single__cta {
    margin-top: var(--vtx-space-md, 1.5rem);
}

/* ── Pricing table ────────────────────────────────── */

.vtx-product-section {
    margin-top: var(--vtx-space-2xl, 3rem);
}

.vtx-product-section__heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vtx-color-text-primary, #58595B);
    margin: 0 0 var(--vtx-space-md, 1.5rem);
    padding-bottom: var(--vtx-space-sm, 1rem);
    border-bottom: 2px solid var(--vtx-glow-primary-15, rgba(255, 172, 39, 0.15));
}

.vtx-product-section__heading .material-symbols-outlined {
    font-size: 22px;
    color: var(--vtx-color-accent, #FFAC27);
}

.vtx-pricing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    border-radius: var(--vtx-radius-md, 0.3125rem);
    overflow: hidden;
    font-size: 0.9375rem;
}

.vtx-pricing-table th,
.vtx-pricing-table td {
    padding: 0.875rem 1.25rem;
    text-align: left;
}

.vtx-pricing-table thead {
    background: var(--vtx-color-dark, #1A1A1A);
}

.vtx-pricing-table th {
    font-weight: 600;
    color: var(--vtx-color-white, #ffffff);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: none;
}

.vtx-pricing-table tbody tr {
    border-bottom: 1px solid var(--vtx-color-border, #e5e7eb);
    transition: background 0.15s ease;
}

.vtx-pricing-table tbody tr:last-child {
    border-bottom: none;
}

.vtx-pricing-table tbody tr:nth-child(even) {
    background: var(--vtx-color-surface-elevated, #f9fafb);
}

.vtx-pricing-table tbody tr:hover {
    background: var(--vtx-glow-primary-4, rgba(255, 172, 39, 0.04));
}

.vtx-pricing-table td {
    color: var(--vtx-color-text-secondary, #4b5563);
}

.vtx-pricing-table td:first-child {
    font-weight: 600;
    color: var(--vtx-color-text-primary, #58595B);
}

.vtx-pricing-table td:last-child {
    font-weight: 700;
    color: var(--vtx-color-accent, #FFAC27);
}

/* Best value row highlight */
.vtx-pricing-table tr.vtx-pricing-table__best {
    background: var(--vtx-glow-primary-8, rgba(255, 172, 39, 0.08));
    position: relative;
}

.vtx-pricing-table tr.vtx-pricing-table__best td {
    font-weight: 700;
}

.vtx-pricing-table__best-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--vtx-color-accent, #FFAC27);
    color: var(--vtx-color-text-primary, #1A1A1A);
    padding: 0.125rem 0.5rem;
    border-radius: var(--vtx-radius-sm, 0.1875rem);
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ── Specs grid ──────────────────────────────────── */

.vtx-product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    border-radius: var(--vtx-radius-md, 0.3125rem);
    overflow: hidden;
}

.vtx-product-spec {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--vtx-color-border, #e5e7eb);
    border-right: 1px solid var(--vtx-color-border, #e5e7eb);
}

.vtx-product-spec:nth-child(even) {
    background: var(--vtx-color-surface-elevated, #f9fafb);
}

.vtx-product-spec__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vtx-color-text-muted, #9ca3af);
    margin-bottom: 0.25rem;
}

.vtx-product-spec__value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--vtx-color-text-primary, #58595B);
}

/* ── Industries / Tags ──────────────────────────── */

.vtx-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vtx-product-tag {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--vtx-color-text-secondary, #6b7280);
    background: var(--vtx-color-surface-elevated, #f9fafb);
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    border-radius: var(--vtx-radius-full, 9999px);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.vtx-product-tag:hover {
    border-color: var(--vtx-color-accent, #FFAC27);
    color: var(--vtx-color-accent, #FFAC27);
}

/* ── Product navigation ──────────────────────────── */

.vtx-product-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vtx-space-md, 1.5rem);
    margin-top: var(--vtx-space-2xl, 3rem);
    padding-top: var(--vtx-space-lg, 2rem);
    border-top: 1px solid var(--vtx-color-border, #e5e7eb);
}

.vtx-product-nav__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vtx-product-nav__item--next {
    text-align: right;
}

.vtx-product-nav__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vtx-color-text-muted, #9ca3af);
}

.vtx-product-nav__link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vtx-color-text-primary, #58595B);
    text-decoration: none;
    transition: color 0.2s ease;
}

.vtx-product-nav__link:hover {
    color: var(--vtx-color-accent, #FFAC27);
}

/* ── Product page CTA ──────────────────────────── */

.vtx-product-cta {
    margin-top: var(--vtx-space-2xl, 3rem);
    padding: var(--vtx-space-2xl, 3rem);
    text-align: center;
    background:
        radial-gradient(ellipse 50% 60% at 50% 100%, var(--vtx-glow-primary-8, rgba(255, 172, 39, 0.08)) 0%, transparent 70%),
        var(--vtx-color-surface-elevated, #f9fafb);
    border: 1px solid var(--vtx-color-border, #e5e7eb);
    border-radius: var(--vtx-radius-lg, 0.3125rem);
}

.vtx-product-cta__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 var(--vtx-space-xs, 0.5rem);
    color: var(--vtx-color-text-primary, #58595B);
}

.vtx-product-cta__text {
    font-size: 1rem;
    color: var(--vtx-color-text-secondary, #6b7280);
    line-height: 1.65;
    margin: 0 0 var(--vtx-space-md, 1.5rem);
    max-width: 500px;
    margin-inline: auto;
}

/* ── Archive header (legacy compat) ─────────────── */

.vtx-archive-header {
    text-align: center;
    padding: var(--vtx-space-2xl, 3rem) var(--vtx-space-lg, 2rem) 0;
    max-width: var(--vtx-container-max-width, 1200px);
    margin-inline: auto;
}

.vtx-archive-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--vtx-color-text-primary, #58595B);
    margin-bottom: 0.75rem;
}

.vtx-archive-header__desc {
    font-size: 1.125rem;
    color: var(--vtx-color-text-secondary, #6b7280);
    max-width: 640px;
    margin-inline: auto;
}

/* ── Empty state ──────────────────────────────────── */

.vtx-products-empty {
    text-align: center;
    padding: var(--vtx-space-3xl, 5rem) var(--vtx-space-lg, 2rem);
}

.vtx-products-empty__icon {
    font-size: 3.5rem;
    color: var(--vtx-color-text-muted, #9ca3af);
    display: block;
    margin-bottom: var(--vtx-space-md, 1.5rem);
}

.vtx-products-empty__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vtx-color-text-primary, #58595B);
    margin: 0 0 var(--vtx-space-xs, 0.5rem);
}

.vtx-products-empty__text {
    color: var(--vtx-color-text-secondary, #6b7280);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 1024px) {
    .vtx-product-single__image {
        position: static;
    }
}

@media (max-width: 768px) {
    .vtx-product-single__grid {
        grid-template-columns: 1fr;
    }

    .vtx-products-grid {
        grid-template-columns: 1fr;
    }

    .vtx-product-specs {
        grid-template-columns: 1fr;
    }

    .vtx-product-spec {
        border-right: none;
    }

    .vtx-product-nav {
        grid-template-columns: 1fr;
    }

    .vtx-product-nav__item--next {
        text-align: left;
    }

    .vtx-product-cta {
        padding: var(--vtx-space-xl, 2rem) var(--vtx-space-md, 1.5rem);
    }
}

@media (max-width: 480px) {
    .vtx-product-card__body {
        padding: 1rem;
    }

    .vtx-pricing-table th,
    .vtx-pricing-table td {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }
}
