/* ==========================================================================
   Utilities — container, glass, grid-bg, gradients, reveal, float, grids
   ========================================================================== */

/* Container — centered, max-width 1280px, responsive padding */
.container-x {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container-x {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Glassmorphism */
.glass {
    background: color-mix(in oklab, var(--htl-card) 60%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--htl-border);
}

[data-theme="light"] .glass {
    background: color-mix(in oklab, var(--htl-card) 88%, transparent);
    border-color: var(--htl-border);
    box-shadow: 0 1px 4px oklch(0 0 0 / 6%);
}

/* Dot grid background */
.grid-bg {
    background-image:
        radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--htl-fg) 12%, transparent) 1px, transparent 0);
    background-size: 32px 32px;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--htl-primary), #5b7bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Gradient border (pseudo-element) */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg,
            color-mix(in oklab, var(--htl-primary) 60%, transparent),
            color-mix(in oklab, var(--htl-gold) 50%, transparent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Float animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === GRID SYSTEM === */
.htl-grid,
.htl-grid-2,
.htl-grid-3,
.htl-grid-4,
.htl-grid-5,
.htl-grid-6 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.htl-grid-6 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {

    /* .htl-grid-2 { grid-template-columns: repeat(2, 1fr); } */
    .htl-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

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

    .htl-grid-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

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

    .htl-grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Gap variants */
.htl-gap-sm {
    gap: 0.75rem;
}

.htl-gap-md {
    gap: 1.25rem;
}

.htl-gap-lg {
    gap: 1.5rem;
}

.htl-gap-xl {
    gap: 2rem;
}

/* === TEXT / FONT HELPERS === */
.text-muted-foreground {
    color: var(--htl-muted-fg);
}

.text-primary {
    color: var(--htl-primary);
}

.text-gold {
    color: var(--htl-gold);
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-base {
    font-size: 1rem;
}

.font-display {
    font-family: var(--htl-font-display);
}

.font-mono {
    font-family: var(--htl-font-mono);
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.tracking-widest {
    letter-spacing: 0.2em;
}

.leading-relaxed {
    line-height: 1.75;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-through {
    text-decoration: line-through;
}

.italic {
    font-style: italic;
}

/* === BG HELPERS === */
.bg-surface {
    background-color: var(--htl-surface);
}

.bg-card {
    background-color: var(--htl-card);
}

.bg-muted {
    background-color: var(--htl-muted);
}

.bg-primary {
    background-color: var(--htl-primary);
}

.bg-gold {
    background-color: var(--htl-gold);
}

.bg-background {
    background-color: var(--htl-bg);
}

/* === BORDER HELPERS === */
.border {
    border: 1px solid var(--htl-border);
}

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

.border-b {
    border-bottom: 1px solid var(--htl-border);
}

.border-t {
    border-top: 1px solid var(--htl-border);
}

.border-y {
    border-top: 1px solid var(--htl-border);
    border-bottom: 1px solid var(--htl-border);
}

/* === ROUNDED === */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: var(--htl-radius);
}

.rounded-3xl {
    border-radius: calc(var(--htl-radius) + 8px);
}

.rounded-full {
    border-radius: 9999px;
}

/* === SPACING === */
.mx-auto {
    margin-inline: auto;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

/* === LAYOUT === */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

.shrink-0 {
    flex-shrink: 0;
}

.w-full {
    width: 100%;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-10 {
    gap: 2.5rem;
}

/* Aspect */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    inset: 0;
}

/* Transitions */
.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

/* Hover effects */
.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-border:hover {
    border-color: var(--htl-primary) !important;
}

.hover-text:hover {
    color: var(--htl-primary);
}

/* Section spacing */
.section-py {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Fix WP Post Template in Grid */
.grid>.wp-block-post-template {
    display: contents;
}


.product-detail__thumbnails {
    margin-top: 20px;
}
div#cs-next-project {
    margin-top: 5%;
}
.wp-block-edd-checkout #edd_purchase_form .edd-blocks-form{
    border: none;
}

.edd-blocks-form__cart #edd_checkout_cart {
    border: none;
}
.edd-blocks-form__cart .edd-blocks-cart__items, .edd-blocks-form__cart .edd-blocks-cart__row-header{
    border: none;
}