/* ==========================================================================
   Pages — Page-specific overrides and section styles
   ========================================================================== */

/* --- Hero sections (generic page hero) --- */
.page-hero {
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    max-width: 56rem;
    margin-inline: auto;
}

.page-hero p {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--htl-muted-fg);
    max-width: 42rem;
    margin-inline: auto;
}

/* --- Homepage hero (special) --- */
.hero-home {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 5.5rem;
}

@media (min-width: 768px) {
    .hero-home {
        padding: 5.5rem 0 7.5rem;
    }
}

.hero-home__grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}

.hero-home__orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
    pointer-events: none;
}

.hero-home__orb--primary {
    top: 25%;
    left: -5rem;
    width: 24rem;
    height: 24rem;
    background: color-mix(in oklab, var(--htl-primary) 30%, transparent);
}

.hero-home__orb--gold {
    bottom: 25%;
    right: -5rem;
    width: 24rem;
    height: 24rem;
    background: color-mix(in oklab, var(--htl-gold) 20%, transparent);
}

.hero-home__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--htl-fg);
}

[data-theme="light"] .hero-home__badge {
    background: color-mix(in oklab, var(--htl-card) 90%, transparent);
    border: 1px solid var(--htl-border);
    color: var(--htl-heading-color);
}

.hero-home__badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: var(--htl-primary);
}

.hero-home__cta-row {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.hero-home__stats {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 60rem;
    margin-inline: auto;
}

@media (min-width: 640px) {
    .hero-home__stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hero-home__stat {
    padding: 1.25rem;
    border-radius: var(--htl-radius);
}

.hero-home__stat-number {
    font-size: 1.875rem;
    font-weight: 700;
}

.hero-home__stat-label {
    font-size: 0.875rem;
    color: var(--htl-muted-fg);
    margin-top: 0.25rem;
}

/* --- Trusted by --- */
.trusted-by {
    padding: 3rem 0;
}

.trusted-by__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.trusted-by__grid:hover {}


@media (min-width: 768px) {
    .trusted-by__grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.trusted-by__name {
    text-align: center;
    font-family: var(--htl-font-display);
    font-weight: 700;
    font-size: 1.125rem;
    filter: grayscale(100%);
    transition: filter 0.2s ease, color 0.2s ease;
}

.trusted-by__name:hover {
    filter: grayscale(0);
    color: var(--htl-primary);
}

/* --- CTA Banner --- */
.cta-banner {
    padding: 3.5rem 0;
}

.cta-banner__inner {
    border-radius: calc(var(--htl-radius) + 8px);
    background: linear-gradient(135deg, var(--htl-primary), oklch(0.45 0.2 280));
    padding: 2.5rem;
    text-align: center;
    color: var(--htl-primary-fg);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .cta-banner__inner {
        padding: 4rem;
    }
}

.cta-banner__grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
}

.cta-banner__content {
    position: relative;
    z-index: 1;
}

.cta-banner__title {
    font-size: clamp(1.875rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--htl-primary-fg) !important;
}

.cta-banner__text {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 42rem;
    margin-inline: auto;
    margin-bottom: 1.5rem;
}

.cta-banner__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.cta-banner .btn-outline {
    border-color: color-mix(in oklab, var(--htl-primary-fg) 30%, transparent);
    color: var(--htl-primary-fg);
}

.cta-banner .btn-outline:hover {
    background: color-mix(in oklab, var(--htl-primary-fg) 10%, transparent);
}

/* --- Service detail hero --- */
.service-detail-hero {
    padding: 3rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-detail-hero .grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.3;
}

.service-detail-hero__content {
    position: relative;
    z-index: 1;
}

.service-detail-hero__icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, color-mix(in oklab, var(--htl-primary) 30%, transparent), color-mix(in oklab, var(--htl-gold) 20%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.5rem;
}

.service-detail-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.service-detail-hero__excerpt {
    max-width: 42rem;
    margin: 0 auto 1.25rem;
    text-align: center;
}

.service-detail-hero__excerpt-text,
.service-detail-hero__excerpt .wp-block-post-excerpt__excerpt {
    font-size: 1.125rem;
    color: var(--htl-muted-fg);
    margin: 0;
}

.service-detail-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-detail-hero__terms {
    display: contents;
}

.service-detail-hero__terms a {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    background-color: var(--htl-muted);
    color: var(--htl-fg);
    text-decoration: none;
}

.service-detail-hero__terms .wp-block-post-terms__separator {
    display: none;
}

.service-detail-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.service-detail-section {
    margin-top: 3.5rem;
}

.service-detail-section__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-detail-section__subtitle {
    color: var(--htl-muted-fg);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.service-single__content {
    font-size: 1rem;
    line-height: 1.75;
}

.service-single__content .service-single__heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
}

.service-single__content .service-single__heading:not(:first-child) {
    margin-top: 2rem;
}

.service-single__lead {
    font-size: 1.0625rem;
    color: var(--htl-muted-fg);
    margin-bottom: 0;
}

.product-tab-panel p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.product-tab-panel ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.product-tab-panel ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.product-tab-panel h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.service-single__list {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.service-single__list li {
    margin-bottom: 0.375rem;
}

.service-single__layout .pricing-card .check-list {
    margin-top: 1rem;
    text-align: left;
}

/* --- Process steps --- */
.process-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process-step {
    padding: 1.5rem;
    border-radius: var(--htl-radius);
    background-color: var(--htl-card);
    border: 1px solid var(--htl-border);
    text-align: center;
}

.process-step__number {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--htl-primary) 15%, transparent);
    color: var(--htl-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-family: var(--htl-font-display);
}

/* --- Pricing packages --- */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    padding: 1.75rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
}

.pricing-card--featured {
    border-color: var(--htl-primary);
}

.pricing-card__popular {
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--htl-gold);
    margin-bottom: 0.5rem;
}

.pricing-card__name {
    font-size: 1.5rem;
    font-weight: 700;
}

.pricing-card__price {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    border-left: 2px solid color-mix(in oklab, var(--htl-primary) 30%, transparent);
    padding-left: 1.5rem;
}

.timeline__item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline__dot {
    position: absolute;
    left: calc(-1.5rem - 9px);
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: var(--htl-primary);
}

.timeline__year {
    font-family: var(--htl-font-mono);
    font-size: 0.875rem;
    color: var(--htl-primary);
}

.timeline__text {
    font-weight: 600;
    margin-top: 0.25rem;
}

/* --- Contact page layout --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .contact-layout {
        grid-template-columns: repeat(5, 1fr);
    }

    .contact-layout__form {
        grid-column: span 3;
    }

    .contact-layout__aside {
        grid-column: span 2;
    }
}

.contact-form {
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .contact-form__row--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form__row--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-form__field--full {
        grid-column: span 2;
    }
}

.contact-layout__aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-success {
    display: none;
    padding: 1rem;
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--htl-primary) 15%, transparent);
    color: var(--htl-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: var(--htl-radius);
    background-color: var(--htl-gold);
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.btn-whatsapp:hover {
    opacity: 0.9;
}

.contact-aside__note {
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    text-align: center;
}

/* --- Contact info cards --- */
.contact-info-card {
    padding: 1.25rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-info-card svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--htl-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-info-card__title {
    font-weight: 600;
    font-size: 1rem;
}

.contact-info-card__text {
    font-size: 0.875rem;
    color: var(--htl-muted-fg);
}

/* --- Map placeholder --- */
.map-placeholder {
    aspect-ratio: 21 / 9;
    border-radius: calc(var(--htl-radius) + 8px);
    background: linear-gradient(135deg, color-mix(in oklab, var(--htl-primary) 20%, transparent), color-mix(in oklab, var(--htl-gold) 10%, transparent));
    border: 1px solid var(--htl-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--htl-muted-fg);
    font-size: 1rem;
}

/* --- Job listing cards --- */
.job-card {
    padding: 1.5rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .job-card {
        flex-direction: row;
        align-items: center;
    }
}

.job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    margin-top: 0.5rem;
}

.job-card__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.job-card__meta svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* --- Article content (blog detail) --- */
.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    color: var(--htl-muted-fg);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-content pre {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background-color: var(--htl-card);
    border: 1px solid var(--htl-border);
    font-family: var(--htl-font-mono);
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Conclusion box */
.conclusion-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: var(--htl-radius);
    background: linear-gradient(135deg, color-mix(in oklab, var(--htl-primary) 10%, transparent), color-mix(in oklab, var(--htl-gold) 5%, transparent));
    border: 1px solid color-mix(in oklab, var(--htl-primary) 20%, transparent);
}

/* Author box */
.author-box {
    margin-top: 3rem;
    padding: 1.5rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-box__avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--htl-primary), var(--htl-gold));
    flex-shrink: 0;
}

/* --- 404 page --- */
.four-oh-four {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.four-oh-four__number {
    font-size: clamp(7.5rem, 15vw, 10rem);
    font-weight: 700;
    line-height: 1;
}

/* Dynamic Archive Grid */
.htl-archive-grid .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .htl-archive-grid .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .htl-archive-grid .wp-block-post-template {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Fix: Prevent first post from being featured/big - EXTREMELY STRICT */
.wp-block-post-template>li,
.grid:not(.contact-form__row)>div,
.grid:not(.contact-form__row)>.reveal,
.grid:not(.contact-form__row)>a,
.htl-grid>*,
.htl-grid-2>*,
.htl-grid-3>* {
    grid-column: span 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Ensure children of grid items also stretch */
.wp-block-post-template>li>*,
.grid:not(.contact-form__row)>div>*,
.grid:not(.contact-form__row)>.reveal>*,
.grid:not(.contact-form__row)>a>* {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Reset any potential first-child offsets from WP Core */
.wp-block-post-template>li:first-child,
.grid:not(.contact-form__row)>*:first-child {
    margin-top: 0 !important;
    //padding-top: 0 !important;
}

.htl-archive-grid-2cols .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .htl-archive-grid-2cols .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Ensure WP list items don't break our grid */
.htl-archive-grid .wp-block-post-template>li,
.htl-archive-grid-2cols .wp-block-post-template>li {
    width: 100% !important;
    margin: 0 !important;
}

/* Service archive cards — match homepage services grid */
.htl-archive-grid-2cols .service-archive-card__excerpt {
    margin-bottom: 1.25rem;
    color: var(--htl-muted-fg);
}

.htl-archive-grid-2cols .service-archive-card__excerpt p {
    margin: 0;
}

.htl-archive-grid-2cols .service-archive-card__terms {
    display: contents;
}

.htl-archive-grid-2cols .service-archive-card__terms a {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    background-color: var(--htl-muted);
    color: var(--htl-fg);
    text-decoration: none;
}

.htl-archive-grid-2cols .service-archive-card__terms .wp-block-post-terms__separator {
    display: none;
}

.htl-archive-grid-2cols .service-archive-card__more {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
    text-decoration: none;
    color: var(--htl-primary) !important;
}

.htl-archive-grid-2cols .service-archive-card__more:hover {
    text-decoration: underline;
}

.htl-archive-grid-2cols .wp-block-post-title {
    margin: 0;
}

.htl-archive-grid-2cols .wp-block-post-title a {
    color: inherit;
    text-decoration: none;
}

.htl-archive-grid-2cols .wp-block-post-title a:hover {
    color: var(--htl-primary);
}

/* --- Services hero section --- */
.services-hero {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 4rem;
}

@media (min-width: 768px) {
    .services-hero {
        padding: 4rem 0 5.5rem;
    }
}

.services-hero__grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.35;
}

.services-hero__orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
    pointer-events: none;
}

.services-hero__orb--primary {
    top: 20%;
    left: -5rem;
    width: 20rem;
    height: 20rem;
    background: color-mix(in oklab, var(--htl-primary) 25%, transparent);
}

.services-hero__orb--gold {
    bottom: 20%;
    right: -5rem;
    width: 20rem;
    height: 20rem;
    background: color-mix(in oklab, var(--htl-gold) 18%, transparent);
}

/* --- Case Study archive card grid (JS-rendered) --- */
.cs-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .cs-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cs-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cs-card-grid article {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.cs-archive-card:hover {
    border-color: var(--htl-primary) !important;
    transform: translateY(-2px);
}

.cs-archive-card h3 {
    margin: 0;
}

/* --- Products archive hero section --- */
.products-hero {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 4rem;
}

@media (min-width: 768px) {
    .products-hero {
        padding: 4rem 0 5.5rem;
    }
}

.products-hero__grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.35;
}

.products-hero__orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
    pointer-events: none;
}

.products-hero__orb--primary {
    top: 20%;
    left: -5rem;
    width: 20rem;
    height: 20rem;
    background: color-mix(in oklab, var(--htl-primary) 25%, transparent);
}

.products-hero__orb--gold {
    bottom: 20%;
    right: -5rem;
    width: 20rem;
    height: 20rem;
    background: color-mix(in oklab, var(--htl-gold) 18%, transparent);
}

/* --- Products JS Grid --- */
.products-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .products-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.products-card-grid article {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Product Detail Page
   ========================================================================== */

/* Product detail two-column hero */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
    }
}

/* Product preview area */
.product-detail__preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail__main-image {
    aspect-ratio: 4 / 3;
    border-radius: calc(var(--htl-radius) + 4px);
    background: linear-gradient(135deg,
            color-mix(in oklab, var(--htl-primary) 20%, transparent),
            color-mix(in oklab, var(--htl-gold) 12%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--htl-font-display);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    color: var(--htl-heading-color);
    text-align: center;
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.product-detail__main-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail__thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .product-detail__thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-detail__thumb {
    aspect-ratio: 16 / 9;
    border-radius: var(--htl-radius);
    background: linear-gradient(135deg,
            color-mix(in oklab, var(--htl-primary) 12%, transparent),
            color-mix(in oklab, var(--htl-gold) 8%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
    border: 1px solid var(--htl-border);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.product-detail__thumb:hover {
    border-color: var(--htl-primary);
}

/* Product info sidebar */
.product-detail__info {
    position: sticky;
    top: 100px;
}

.product-detail__category {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: color-mix(in oklab, var(--htl-primary) 12%, transparent);
    color: var(--htl-primary);
    margin-bottom: 0.75rem;
}

.product-detail__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.product-detail__rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.product-detail__rating .stars {
    display: inline-flex;
    gap: 0.125rem;
}

.product-detail__rating-count {
    color: var(--htl-muted-fg);
}

.product-detail__pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-detail__original-price {
    font-size: 1rem;
    color: var(--htl-muted-fg);
    text-decoration: line-through;
}

.product-detail__current-price {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--htl-heading-color);
}

/* License picker */
.product-detail__license-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-detail__licenses {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Buy / Add-to-cart buttons */
.product-detail__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.product-detail__btn-buy,
.edd-purchase-wrapper .edd-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--htl-gold) !important;
    color: var(--htl-gold-fg) !important;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--htl-font-sans);
    border: none !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.product-detail__btn-buy:hover,
.edd-purchase-wrapper .edd-submit:hover {
    opacity: 0.9;
}

.product-detail__btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    background: transparent;
    border: 1px solid var(--htl-border);
    color: var(--htl-fg);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--htl-font-sans);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.product-detail__btn-cart:hover {
    background-color: var(--htl-muted);
    border-color: var(--htl-primary);
}

.product-detail__guarantee {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
    margin-bottom: 1.5rem;
}

.product-detail__guarantee svg {
    width: 1rem;
    height: 1rem;
    color: var(--htl-primary);
    flex-shrink: 0;
}

/* What's included box */
.product-detail__included {
    padding: 1.25rem;
    border-radius: var(--htl-radius);
    background-color: var(--htl-card);
    border: 1px solid var(--htl-border);
}

.product-detail__included-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Product tabs section */
.product-detail__tabs-section {
    padding: 3rem 0 0;
}

/* Override the global grid item rule that forces flex + span 1 */
.product-detail>* {
    grid-column: auto !important;
    display: block !important;
    flex-direction: unset !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}

/* ==========================================================================
   Case Study Detail Page
   ========================================================================== */

/* Case study hero */
.cs-detail-hero {
    padding: 1rem 0 2rem;
}

.cs-detail-hero__layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .cs-detail-hero__layout {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.cs-detail-hero__label {
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--htl-primary);
    margin-bottom: 0.75rem;
}

.cs-detail-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    max-width: 36rem;
}

.cs-detail-hero__meta {
    display: flex;
    gap: 2rem;
    flex-shrink: 0;
}

.cs-detail-hero__meta-item {
    text-align: left;
}

.cs-detail-hero__meta-label {
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.cs-detail-hero__meta-value {
    font-size: 0.9375rem;
    font-weight: 700;
}

/* Case study featured image */
.cs-detail__featured-image {
    aspect-ratio: 21 / 9;
    border-radius: calc(var(--htl-radius) + 8px);
    background: linear-gradient(135deg,
            color-mix(in oklab, var(--htl-primary) 20%, transparent),
            color-mix(in oklab, var(--htl-gold) 12%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--htl-font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--htl-heading-color);
    margin-bottom: 3rem;
    overflow: hidden;
}

/* Case study content layout */
.cs-detail__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .cs-detail__layout {
        grid-template-columns: 1fr 340px;
    }
}

/* Override global grid spans for case study */
.cs-detail__layout>* {
    grid-column: auto !important;
    display: block !important;
    flex-direction: unset !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}

/* Case study content */
.cs-detail__content {
    min-width: 0;
}

.cs-detail__content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.cs-detail__content h2:first-child {
    margin-top: 0;
}

.cs-detail__content p {
    color: var(--htl-muted-fg);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

/* Solution features grid */
.cs-detail__features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
}

@media (min-width: 640px) {
    .cs-detail__features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cs-detail__feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--htl-border);
    font-size: 0.875rem;
}

.cs-detail__feature-item svg {
    width: 1rem;
    height: 1rem;
    color: var(--htl-primary);
    flex-shrink: 0;
}

/* Tech stack tags */
.cs-detail__tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1.5rem;
}

.cs-detail__tech-tag {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--htl-border);
    font-family: var(--htl-font-mono);
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* Results stat cards */
.cs-detail__results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

@media (min-width: 640px) {
    .cs-detail__results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cs-detail__stat-card {
    padding: 1.25rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
}

.cs-detail__stat-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--htl-primary);
    line-height: 1.2;
}

.cs-detail__stat-label {
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
    margin-top: 0.25rem;
}

/* Screenshots grid */
.cs-detail__screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1rem 0 2rem;
}

.cs-detail__screenshot {
    aspect-ratio: 4 / 3;
    border-radius: var(--htl-radius);
    background: linear-gradient(135deg,
            color-mix(in oklab, var(--htl-primary) 12%, transparent),
            color-mix(in oklab, var(--htl-gold) 8%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
    border: 1px solid var(--htl-border);
}

/* Testimonial quote */
.cs-detail__testimonial {
    padding: 2rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    margin: 2rem 0;
}

.cs-detail__testimonial-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--htl-primary);
    opacity: 0.6;
    margin-bottom: 1rem;
}

.cs-detail__testimonial-text {
    font-size: 1rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--htl-fg);
    margin-bottom: 1rem;
}

.cs-detail__testimonial-author {
    font-weight: 700;
    font-size: 0.9375rem;
}

.cs-detail__testimonial-role {
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
}

/* Case study sidebar */
.cs-detail__sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-detail__sidebar-card {
    padding: 1.5rem;
    border-radius: calc(var(--htl-radius) + 4px);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
}

.cs-detail__sidebar-label {
    font-size: 0.6875rem;
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--htl-muted-fg);
    margin-bottom: 0.375rem;
}

.cs-detail__sidebar-value {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cs-detail__sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cs-detail__sidebar-tag {
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid var(--htl-border);
    font-size: 0.75rem;
    font-family: var(--htl-font-mono);
    white-space: nowrap;
}

/* Next project card */
.cs-detail__next-project {
    padding: 1.5rem;
    border-radius: calc(var(--htl-radius) + 4px);
    border: 1px solid var(--htl-border);
    background-color: var(--htl-card);
}

.cs-detail__next-label {
    font-size: 0.6875rem;
    font-family: var(--htl-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--htl-muted-fg);
    margin-bottom: 0.5rem;
}

.cs-detail__next-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.cs-detail__next-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--htl-primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.cs-detail__next-link:hover {
    gap: 0.5rem;
}

/* ==========================================================================
   EDD Checkout Styles (Premium Single Container)
   ========================================================================== */

/* Single Premium Container */
#edd_purchase_form {
    border: none !important;
    padding: 2.5rem !important;
    border-radius: 1.25rem !important;
    background: color-mix(in oklab, var(--htl-card) 40%, transparent) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px -10px oklch(0 0 0 / 10%) !important;
    position: relative;
    overflow: hidden;
    margin: 3rem auto;
    max-width: 800px;
    display: block;
}

#edd_purchase_form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--htl-primary), transparent);
    opacity: 0.5;
}

/* Remove any legacy grids so everything is in one single flow */
#edd_checkout_form_wrap {
    display: block;
}

/* Cart Table styling inside the container */
#edd_checkout_cart {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2.5rem;
    background: transparent;
}

#edd_checkout_cart th,
#edd_checkout_cart td {
    padding: 1rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent);
    text-align: left;
}

#edd_checkout_cart th {
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

#edd_checkout_cart th.edd_cart_total,
#edd_checkout_cart td.edd_cart_item_price {
    text-align: right;
}

#edd_checkout_cart .edd_cart_item_name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--htl-heading-color);
}

#edd_checkout_cart .edd_cart_remove_item_btn {
    font-size: 0.75rem;
    color: var(--htl-muted-fg) !important;
    text-decoration: none !important;
    display: inline-block;
    margin-top: 0.375rem;
    transition: color 0.2s ease !important;
}

#edd_checkout_cart .edd_cart_remove_item_btn:hover {
    color: #ef4444 !important;
}

#edd_checkout_cart .edd_cart_footer_row td,
#edd_checkout_cart .edd_cart_footer_row th {
    border-bottom: none !important;
    padding-top: 1.5rem;
    font-size: 1.5rem;
    font-family: var(--htl-font-display);
    font-weight: 800;
    color: var(--htl-heading-color);
}

/* Form Styles */
#edd_purchase_form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

#edd_purchase_form legend {
    font-size: 1.5rem !important;
    font-family: var(--htl-font-display);
    font-weight: 700;
    margin-bottom: 1.5rem !important;
    padding: 0 !important;
    border: none !important;
    color: var(--htl-heading-color);
    letter-spacing: -0.02em;
}

#edd_purchase_form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--htl-fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

#edd_purchase_form input[type="text"],
#edd_purchase_form input[type="email"],
#edd_purchase_form input[type="password"],
#edd_purchase_form input[type="tel"],
#edd_purchase_form select,
#edd_purchase_form textarea {
    width: 100%;
    padding: 1rem 1.25rem !important;
    border: 1px solid var(--htl-border) !important;
    border-radius: 0.75rem !important;
    background: color-mix(in oklab, var(--htl-surface) 50%, transparent) !important;
    color: var(--htl-heading-color) !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px oklch(0 0 0 / 2%) !important;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

#edd_purchase_form input:focus,
#edd_purchase_form select:focus,
#edd_purchase_form textarea:focus {
    border-color: var(--htl-primary) !important;
    background: var(--htl-surface) !important;
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--htl-primary) 15%, transparent) !important;
    outline: none !important;
}

#edd_purchase_form .edd-description {
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    margin-bottom: 1.5rem;
    display: block;
}

/* Submit Button / Download Button */
#edd_purchase_form .edd-submit {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1.25rem 2rem !important;
    border-radius: 99px !important;
    background: linear-gradient(135deg, var(--htl-primary), var(--htl-gold)) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 1.125rem !important;
    letter-spacing: 0.02em;
    border: none !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 24px -8px var(--htl-primary) !important;
    text-transform: uppercase;
}

#edd_purchase_form .edd-submit:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   EDD Checkout Confirmation / Receipt Styles
   ========================================================================== */

#edd_receipt_wrapper {
    border: none !important;
    padding: 3rem !important;
    border-radius: 1.25rem !important;
    background: color-mix(in oklab, var(--htl-card) 40%, transparent) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px -10px oklch(0 0 0 / 10%) !important;
    position: relative;
    overflow: hidden;
    margin: 3rem auto;
    max-width: 800px;
}

#edd_receipt_wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--htl-primary), transparent);
    opacity: 0.5;
}

#edd_receipt_wrapper h3 {
    font-size: 2rem !important;
    font-family: var(--htl-font-display);
    font-weight: 800;
    margin-bottom: 1rem !important;
    color: var(--htl-heading-color);
    letter-spacing: -0.02em;
    text-align: center;
}

#edd_receipt_wrapper>p {
    text-align: center;
    color: var(--htl-muted-fg);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* Receipt Table */
#edd_purchase_receipt {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2.5rem;
    background: transparent;
}

#edd_purchase_receipt th,
#edd_purchase_receipt td {
    padding: 1.25rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent);
    text-align: left;
}

#edd_purchase_receipt th {
    font-size: 0.8125rem;
    color: var(--htl-muted-fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    width: 40%;
}

#edd_purchase_receipt td {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--htl-heading-color);
}

/* Product list in receipt */
#edd_purchase_receipt_products {
    margin-top: 2rem;
}

#edd_purchase_receipt_products h3 {
    font-size: 1.5rem !important;
    text-align: left !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent) !important;
    padding-bottom: 1rem !important;
}

#edd_purchase_receipt_products table {
    width: 100%;
    border-collapse: collapse;
}

#edd_purchase_receipt_products th {
    font-size: 0.75rem;
    color: var(--htl-muted-fg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    padding: 1rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent);
    text-align: left;
}

#edd_purchase_receipt_products td {
    padding: 1.25rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent);
    font-weight: 600;
    color: var(--htl-heading-color);
}

#edd_purchase_receipt_products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#edd_purchase_receipt_products li {
    padding: 1.25rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--htl-border) 50%, transparent);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#edd_purchase_receipt_products li:last-child {
    border-bottom: none;
}

#edd_purchase_receipt_products td strong,
#edd_purchase_receipt_products li strong {
    color: var(--htl-primary);
    display: block;
    margin-bottom: 0.25rem;
}

#edd_purchase_receipt_products .edd_receipt_product_name {
    font-size: 1.125rem;
    font-weight: 700;
}

#edd_purchase_receipt_products .edd_receipt_product_notes {
    font-size: 0.875rem;
    color: var(--htl-muted-fg);
    font-weight: 400;
    margin-top: 0.5rem;
}

/* View order details link styling if present */
#edd_receipt_wrapper>p>a,
#edd_receipt_wrapper>a,
.edd-blocks__receipt>p>a,
.edd-blocks__receipt>div>p>a,
.edd-blocks__confirmation-details a,
.edd-blocks__receipt>a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem !important;
    background: linear-gradient(135deg, var(--htl-primary), var(--htl-gold));
    color: #fff !important;
    border-radius: 99px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px -4px var(--htl-primary);
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#edd_receipt_wrapper>p>a:hover,
#edd_receipt_wrapper>a:hover,
.edd-blocks__receipt>p>a:hover,
.edd-blocks__receipt>div>p>a:hover,
.edd-blocks__confirmation-details a:hover,
.edd-blocks__receipt>a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px var(--htl-primary);
}

}

/* ==========================================================================
   EDD Block Receipt Styles (Premium Glassmorphism)
   ========================================================================== */

/* Container styling */
.edd-blocks__receipt {
    border: none !important;
    padding: 3rem !important;
    border-radius: 1.25rem !important;
    background: color-mix(in oklab, var(--htl-card) 40%, transparent) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px -10px oklch(0 0 0 / 10%) !important;
    position: relative;
    overflow: hidden;
    margin: 3rem auto !important;
    max-width: 800px;
}

.edd-blocks__receipt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--htl-primary), transparent);
    opacity: 0.5;
}

/* Section headings */
.edd-blocks__receipt h2,
.edd-blocks__receipt h3 {
    font-size: 1.75rem !important;
    font-family: var(--htl-font-display);
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    color: var(--htl-heading-color) !important;
    letter-spacing: -0.02em;
}

/* Rows layout & borders */
.edd-blocks-receipt__items,
.edd-blocks-receipt__totals {
    border: none !important;
}

.edd-blocks__receipt .edd-blocks__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0 !important;
    border: none !important;
}

/* Top and bottom rows adjustments */
.edd-blocks-receipt__row-header {
    border-bottom: none !important;
    padding-bottom: 1.25rem !important;
}

.edd-blocks-receipt__row-item {
    border-bottom: none !important;
}

/* Labels and values */
.edd-blocks__receipt .edd-blocks__row-label {
    font-size: 0.875rem !important;
    color: var(--htl-muted-fg) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600 !important;
}

.edd-blocks__receipt .edd-blocks__row-value {
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    color: var(--htl-heading-color) !important;
}

/* Total row */
.edd-blocks-receipt__totals .edd-blocks__row:last-child {
    border-top: none !important;
    padding-top: 1.5rem !important;
    margin-top: 0.5rem;
}

.edd-blocks-receipt__totals .edd-blocks__row:last-child .edd-blocks__row-label {
    font-size: 1rem !important;
    color: var(--htl-muted-fg) !important;
}

.edd-blocks-receipt__totals .edd-blocks__row:last-child .edd-blocks__row-value {
    font-size: 1.75rem !important;
    font-family: var(--htl-font-display);
    color: var(--htl-primary) !important;
}

/* Product list item styling */
.edd-blocks-receipt__item {
    align-items: flex-start !important;
}

.edd-blocks-receipt__item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.edd-blocks-receipt__item-details .edd-blocks__row-label {
    font-size: 1.125rem !important;
    color: var(--htl-heading-color) !important;
    font-weight: 700 !important;
    text-transform: none;
    letter-spacing: normal;
}

.edd_purchase_receipt_files {
    list-style: none !important;
    padding: 0 !important;
    margin: 0.5rem 0 0 0 !important;
}

.edd_purchase_receipt_files li {
    font-size: 0.875rem !important;
    color: var(--htl-muted-fg) !important;
}

.edd_purchase_receipt_files li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: color-mix(in oklab, var(--htl-primary) 15%, transparent);
    color: var(--htl-primary);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    border: 1px solid color-mix(in oklab, var(--htl-primary) 30%, transparent);
}

.edd_purchase_receipt_files li a::before {
    content: '';
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
}

.edd_purchase_receipt_files li a:hover {
    background: var(--htl-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -4px var(--htl-primary);
}

/* EDD Software Licensing & Invoice Styling */
.edd-sl-receipt-license-keys,
.edd_receipt_license_keys {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: color-mix(in oklab, var(--htl-surface) 60%, transparent);
    border: 1px dashed var(--htl-primary);
    border-radius: 0.75rem;
}

.edd-sl-receipt-license-keys strong,
.edd_sl_license_key_label {
    color: var(--htl-muted-fg);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.edd_sl_license_key {
    font-family: var(--htl-font-mono) !important;
    font-size: 1.25rem !important;
    background: var(--htl-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    letter-spacing: 0.05em;
    color: var(--htl-gold) !important;
    display: inline-block;
    border: 1px solid var(--htl-border);
}

.edd-blocks-receipt__item-price {
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    color: var(--htl-heading-color) !important;
}

/* Payment Status Tags */
.edd-blocks__receipt .edd-blocks__row-value.edd_receipt_payment_status.complete {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.875rem !important;
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
    border-radius: 99px !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

/* ==========================================================================
   EDD Price Options (Premium Radio Buttons)
   ========================================================================== */

.edd_price_options {
    margin: 1.5rem 0;
}

.edd_price_options ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edd_price_options li {
    margin: 0 !important;
    padding: 0 !important;
}

.edd_price_options label {
    display: flex !important;
    align-items: center;
    padding: 1rem 1.25rem !important;
    border: 1px solid color-mix(in oklab, var(--htl-border) 80%, transparent) !important;
    border-radius: 0.75rem !important;
    background: color-mix(in oklab, var(--htl-surface) 50%, transparent) !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    color: var(--htl-heading-color) !important;
    font-weight: 600 !important;
}

/* Hover state */
.edd_price_options label:hover {
    border-color: var(--htl-primary) !important;
    background: color-mix(in oklab, var(--htl-primary) 5%, transparent) !important;
}

/* Selected state (if supported) */
.edd_price_options label:has(input[type="radio"]:checked) {
    border-color: var(--htl-primary) !important;
    background: color-mix(in oklab, var(--htl-primary) 10%, transparent) !important;
    box-shadow: 0 0 0 1px var(--htl-primary) !important;
}

/* Hide default radio & create custom */
.edd_price_options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--htl-muted-fg);
    border-radius: 50%;
    margin-right: 1rem;
    outline: none;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checked radio dot */
.edd_price_options input[type="radio"]:checked {
    border-color: var(--htl-primary);
}

.edd_price_options input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.625rem;
    height: 0.625rem;
    background: var(--htl-primary);
    border-radius: 50%;
}

.edd_price_option_name {
    flex-grow: 1;
}

.edd_price_option_price {
    font-weight: 800;
    font-family: var(--htl-font-display);
    color: var(--htl-primary);
}

/* ==========================================================================
   Dynamic Navigation Auth Links
   ========================================================================== */

body.logged-in .nav-link-login {
    display: none !important;
}

body:not(.logged-in) .nav-link-account,
body:not(.logged-in) .nav-link-downloads {
    display: none !important;
}

/* ==========================================================================
   Customer Dashboard Styles
   ========================================================================== */

.htl-customer-dashboard {
    max-width: 1200px;
    margin: 3rem auto;
}

.dashboard-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--htl-font-display);
}

.dashboard-lead {
    color: var(--htl-muted-fg);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.dashboard-auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .dashboard-auth-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dashboard-auth-card {
    padding: 2.5rem;
}

.dashboard-tabs-container {
    background: var(--htl-card);
    border: 1px solid var(--htl-border);
    border-radius: var(--htl-radius);
    overflow: hidden;
}

.dashboard-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--htl-border);
    background: color-mix(in oklab, var(--htl-card) 50%, var(--htl-bg));
    overflow-x: auto;
}

.dashboard-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--htl-muted-fg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dashboard-tab-btn:hover {
    color: var(--htl-fg);
    background: color-mix(in oklab, var(--htl-fg) 5%, transparent);
}

.dashboard-tab-btn.active {
    color: var(--htl-primary);
    border-bottom-color: var(--htl-primary);
    background: var(--htl-card);
}

.dashboard-tab-pane {
    padding: 2.5rem;
}

.dashboard-tab-pane>.contact-form {
    border: none;
    padding: 0;
    background: transparent;
}

/* ==========================================================================
   EDD Profile Editor & Purchase History Overrides
   ========================================================================== */

/* Profile Form Elements */
#edd_profile_editor_form,
#edd_login_form,
#edd_register_form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#edd_profile_editor_form fieldset {
    border: 1px solid var(--htl-border);
    border-radius: var(--htl-radius);
    padding: 1.5rem;
    background: var(--htl-card);
    margin: 0;
}

#edd_login_form fieldset,
#edd_register_form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

#edd_profile_editor_form legend,
#edd_login_form legend,
#edd_register_form legend {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--htl-font-display);
    padding: 0 0.75rem;
    color: var(--htl-primary);
}

#edd_profile_editor_form p,
#edd_login_form p,
#edd_register_form p {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#edd_profile_editor_form label,
#edd_login_form label,
#edd_register_form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--htl-muted-fg);
}

#edd_profile_editor_form input[type="text"],
#edd_profile_editor_form input[type="email"],
#edd_profile_editor_form input[type="password"],
#edd_profile_editor_form input[type="url"],
#edd_profile_editor_form select,
#edd_login_form input[type="text"],
#edd_login_form input[type="email"],
#edd_login_form input[type="password"],
#edd_register_form input[type="text"],
#edd_register_form input[type="email"],
#edd_register_form input[type="password"],
#edd_login_form input[type="tel"],
#edd_register_form input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: var(--htl-bg);
    border: 1px solid var(--htl-border);
    color: var(--htl-fg);
    font-family: var(--htl-font-sans);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#edd_profile_editor_form input:focus,
#edd_profile_editor_form select:focus,
#edd_login_form input:focus,
#edd_register_form input:focus {
    outline: none;
    border-color: var(--htl-primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--htl-primary) 15%, transparent);
}

#edd_profile_editor_form input[type="submit"],
#edd_profile_editor_form .edd-submit,
#edd_login_form input[type="submit"],
#edd_login_form .edd-submit,
#edd_register_form input[type="submit"],
#edd_register_form .edd-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--htl-primary);
    color: var(--htl-primary-fg);
    font-weight: 600;
    font-family: var(--htl-font-sans);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 1rem;
    width: auto;
}

#edd_profile_editor_form input[type="submit"]:hover,
#edd_profile_editor_form .edd-submit:hover,
#edd_login_form input[type="submit"]:hover,
#edd_login_form .edd-submit:hover,
#edd_register_form input[type="submit"]:hover,
#edd_register_form .edd-submit:hover {
    opacity: 0.9;
}

/* Purchase History Table & Downloads */
table.edd-table,
#edd_user_history {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    border-radius: var(--htl-radius);
    border: 1px solid var(--htl-border);
    background: var(--htl-card);
    overflow: hidden;
}

table.edd-table th,
#edd_user_history th {
    background: color-mix(in oklab, var(--htl-bg) 50%, var(--htl-card));
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--htl-muted-fg);
    border-bottom: 1px solid var(--htl-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table.edd-table td,
#edd_user_history td {
    padding: 1rem;
    border-bottom: 1px solid var(--htl-border);
    color: var(--htl-fg);
    font-size: 0.9375rem;
    vertical-align: middle;
}

table.edd-table tr:last-child td,
#edd_user_history tr:last-child td {
    border-bottom: none;
}

/* History Links (Downloads, Invoices, Licenses) */
table.edd-table td a,
#edd_user_history td a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--htl-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

table.edd-table td a:hover,
#edd_user_history td a:hover {
    color: var(--htl-gold);
    text-decoration: underline;
}

/* Fix for inline checkboxes (e.g. Remember Me) */
.edd-login-remember,
.edd-lost-password {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.edd-login-remember input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
}

.edd-login-remember label,
.edd-lost-password a {
    font-weight: 400 !important;
    margin: 0 !important;
}

/* Responsive Table */
@media (max-width: 768px) {

    table.edd-table,
    #edd_user_history {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* Hide appended EDD purchase form in the description tab */
#tab-description .edd_download_purchase_form,
#tab-description .edd-purchase-wrapper {
    display: none !important;
}