#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

/* Prevent layout shift when Radix UI primitives (Dialog, Drawer, Sheet, Select)
   lock body scroll or when a scrollbar appears/disappears. */
html {
  scrollbar-gutter: stable;
}

html body[data-scroll-locked] {
  padding-right: 0px !important;
  margin-right: 0px !important;
}

/* Styles for facetWP model search */
.facetwp-facet-models_filter {
    display: flex;
    gap: 1em;
}

/* Add to Cart button - hidden for variant products */
.qcom-add-to-cart-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Prevent background on buttons wrapper; only the inner button should be styled */
.wp-block-buttons:has(.qcom-add-to-cart-btn) {
    background: transparent !important;
}

/*
 * Product Card Link - clickable card pattern.
 *
 * The card container is either:
 *   a) .qcom-product-card--linked  (the wrapper group, if present)
 *   b) the <li> inside .is-qcom-product-card-link  (flat layout)
 */
.qcom-product-card--linked,
.is-qcom-product-card-link > li {
    position: relative;
    cursor: pointer;
}

/*
 * Prevent intermediate WordPress block containers from creating new
 * containing blocks (position, overflow, contain) that would stop
 * the stretched-link ::after from reaching the card boundary.
 */
.qcom-product-card--linked > .wp-block-group,
.is-qcom-product-card-link > li > .wp-block-group,
.is-qcom-product-card-link .qcom-stretched-link {
    position: static !important;
    overflow: visible !important;
    contain: none !important;
}

.qcom-product-card--linked .qcom-stretched-link a,
.is-qcom-product-card-link .qcom-stretched-link a {
    text-decoration: none;
    color: inherit;
}

.qcom-product-card--linked .qcom-stretched-link a::after,
.is-qcom-product-card-link .qcom-stretched-link a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Interactive elements sit above the stretched link overlay */
.qcom-product-card--linked .wp-block-quickcommerce-quantity-input,
.qcom-product-card--linked .wp-block-quickcommerce-add-to-cart-button,
.is-qcom-product-card-link .wp-block-quickcommerce-quantity-input,
.is-qcom-product-card-link .wp-block-quickcommerce-add-to-cart-button {
    position: relative;
    z-index: 2;
}

/* Styles for images */
.wp-post-image {
    background: #fcfcfc;
    mix-blend-mode: multiply;
}

/* =========================================================================
   HOMEPAGE — Modern eCommerce Layout (2025)
   ========================================================================= */

/* --- Announcement Bar --- */
.qcom-announcement-bar {
    overflow: hidden;
}
.qcom-announcement-bar .qcom-marquee {
    display: flex;
    gap: 3rem;
    animation: qcom-marquee 20s linear infinite;
    white-space: nowrap;
    width: max-content;
}
@keyframes qcom-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Scroll Reveal --- */
.qcom-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.qcom-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Stagger children */
.qcom-reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.qcom-reveal-stagger.is-visible > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0s; }
.qcom-reveal-stagger.is-visible > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: .08s; }
.qcom-reveal-stagger.is-visible > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: .16s; }
.qcom-reveal-stagger.is-visible > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: .24s; }
.qcom-reveal-stagger.is-visible > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: .32s; }

/* --- Bento Category Grid --- */
.qcom-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 320px 320px;
    gap: 1rem;
}
.qcom-bento-grid > *:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; } /* tall left */
.qcom-bento-grid > *:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
.qcom-bento-grid > *:nth-child(3) { grid-column: 4 / 5; grid-row: 1 / 2; }
.qcom-bento-grid > *:nth-child(4) { grid-column: 3 / 5; grid-row: 2 / 3; } /* wide bottom-right */

@media (max-width: 768px) {
    .qcom-bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 280px 200px 200px;
    }
    .qcom-bento-grid > *:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
    .qcom-bento-grid > *:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; }
    .qcom-bento-grid > *:nth-child(3) { grid-column: 2 / 3; grid-row: 2 / 3; }
    .qcom-bento-grid > *:nth-child(4) { grid-column: 1 / 3; grid-row: 3 / 4; }
}

/* --- Bento Card --- */
.qcom-bento-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
}
.qcom-bento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.qcom-bento-card:hover img {
    transform: scale(1.06);
}
.qcom-bento-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 1;
}
.qcom-bento-card__overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}
.qcom-bento-card__overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    margin: 0;
}
.qcom-bento-card__link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* --- Product Card Hover Lift --- */
.qcom-card-lift {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
}
.qcom-card-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.12);
}

/* Product grid with card lift */
.is-qcom-product-card-link.qcom-card-lift-grid > li {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.is-qcom-product-card-link.qcom-card-lift-grid > li:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.10);
}

/* --- Section Heading Style --- */
.qcom-section-heading {
    position: relative;
    display: inline-block;
}
.qcom-section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #00a32a;
    border-radius: 2px;
    margin-top: 0.6rem;
}

/* --- Glassmorphism card --- */
.qcom-glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
}

/* --- Stat counter --- */
.qcom-stat-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    letter-spacing: -0.04em;
}

/* --- Testimonial Card --- */
.qcom-testimonial {
    border-radius: 16px;
    padding: 2rem;
    background: #fff;
    border: 1px solid #eee;
    transition: box-shadow 0.3s ease;
}
.qcom-testimonial:hover {
    box-shadow: 0 8px 30px -8px rgba(0,0,0,0.08);
}
.qcom-testimonial__stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}
.qcom-testimonial__text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1.25rem;
}
.qcom-testimonial__author {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111;
}
.qcom-testimonial__role {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* --- Editorial full-bleed --- */
.qcom-editorial-overlay {
    position: relative;
}
.qcom-editorial-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}
.qcom-editorial-overlay > .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}