/**
 * HiGuppy Visual Design System
 *
 * Professional styling built on design tokens. Applies consistent color palette,
 * type scale, and spacing across all pages. Styles product cards, trust indicators,
 * content typography, and includes performance optimizations.
 *
 * Depends on: higuppy-design-tokens.css (CSS custom properties)
 *
 * @package HiGuppy
 * @since 1.0.0
 * @validates Requirements 17.1, 17.2, 17.3, 17.4, 17.5, 17.6
 */

/* ==========================================================================
   PERFORMANCE: Font loading optimization
   Prevents invisible text during web font load (FOIT → FOUT).
   Targets LCP ≤2.5s by ensuring text renders immediately.
   @validates Requirement 17.5
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: local('Inter');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-display: swap;
    src: local('JetBrains Mono');
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY
   Consistent type scale using design tokens across all pages.
   @validates Requirements 17.1, 17.6
   ========================================================================== */

body {
    font-family: var(--higuppy-font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--higuppy-neutral-900);
    background-color: var(--higuppy-neutral-100);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--higuppy-font-heading);
    color: var(--higuppy-neutral-900);
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: calc(var(--higuppy-space) * 2);
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

h5, h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: calc(var(--higuppy-space) * 2);
}

a {
    color: var(--higuppy-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--higuppy-primary);
    text-decoration: underline;
}

/* ==========================================================================
   PRODUCT CARDS
   Uniform styling for product grid items: image, name, price, CTA button.
   Uses consistent aspect ratio for images and standardized spacing.
   @validates Requirements 17.3, 17.6
   ========================================================================== */

ul.products li.product,
.products .product,
.product-grid-item {
    background: #fff;
    border-radius: calc(var(--higuppy-space) * 1);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(6, 27, 61, 0.06);
}

ul.products li.product:hover,
.products .product:hover,
.product-grid-item:hover {
    box-shadow: 0 4px 20px rgba(26, 82, 118, 0.1);
    transform: translateY(-2px);
}

/* Product image — uniform aspect ratio (1:1 square), 800×800px minimum display */
ul.products li.product .product-image-wrapper,
ul.products li.product .product-element-top,
.products .product .product-image-wrapper,
.products .product .product-element-top,
.product-grid-item .product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--higuppy-neutral-100);
}

ul.products li.product img,
.products .product img,
.product-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-width: 800px;
    min-height: 800px;
}

/* Product image container — constrains image to card width */
ul.products li.product .attachment-woocommerce_thumbnail,
.products .product .attachment-woocommerce_thumbnail,
ul.products li.product .wp-post-image,
.products .product .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    min-width: unset;
    min-height: unset;
}

/* Product name */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .product-title,
ul.products li.product h2,
.products .product .woocommerce-loop-product__title,
.products .product .product-title,
.products .product h2 {
    font-family: var(--higuppy-font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--higuppy-neutral-900);
    margin: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2) calc(var(--higuppy-space) * 0.5);
    line-height: 1.3;
}

/* Product price */
ul.products li.product .price,
.products .product .price,
.product-grid-item .price {
    font-family: var(--higuppy-font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--higuppy-primary);
    padding: 0 calc(var(--higuppy-space) * 2);
    margin-bottom: calc(var(--higuppy-space) * 1.5);
}

ul.products li.product .price del,
.products .product .price del {
    color: #999;
    font-weight: 400;
    font-size: 0.875rem;
}

ul.products li.product .price ins,
.products .product .price ins {
    text-decoration: none;
    color: var(--higuppy-accent);
    font-weight: 700;
}

/* Product CTA button (Add to Cart) */
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .product_type_simple,
.products .product .button,
.products .product .add_to_cart_button {
    display: block;
    width: calc(100% - var(--higuppy-space) * 4);
    margin: 0 calc(var(--higuppy-space) * 2) calc(var(--higuppy-space) * 2);
    padding: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2);
    background: linear-gradient(135deg, var(--higuppy-accent) 0%, var(--higuppy-accent-orange) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--higuppy-font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-height: var(--higuppy-touch-min);
}

ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover,
.products .product .button:hover,
.products .product .add_to_cart_button:hover {
    background: linear-gradient(135deg, #ff7d60 0%, #ffad5c 100%);
    transform: scale(1.02);
    text-decoration: none;
    color: #fff;
}

ul.products li.product .button:active,
.products .product .button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   TRUST INDICATORS
   Live Arrival Guarantee badge and secure payment icons.
   Positioned above-the-fold on homepage and product pages.
   @validates Requirements 17.3, 17.4
   ========================================================================== */

.higuppy-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: calc(var(--higuppy-space) * 3);
    padding: calc(var(--higuppy-space) * 2) calc(var(--higuppy-space) * 3);
    background: linear-gradient(135deg, var(--higuppy-primary), var(--higuppy-secondary));
    color: #fff;
    font-family: var(--higuppy-font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    position: relative;
    z-index: 10;
}

.higuppy-trust-bar__item {
    display: flex;
    align-items: center;
    gap: calc(var(--higuppy-space) * 1);
    white-space: nowrap;
}

.higuppy-trust-bar__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.higuppy-trust-bar__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Live Arrival Guarantee badge — prominent styling */
.higuppy-trust-bar__item--guarantee {
    font-weight: 700;
    font-size: 0.9375rem;
    padding: calc(var(--higuppy-space) * 0.75) calc(var(--higuppy-space) * 2);
    background: rgba(255, 255, 255, 0.15);
    border-radius: calc(var(--higuppy-space) * 3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Secure payment icons */
.higuppy-trust-bar__item--payment {
    gap: calc(var(--higuppy-space) * 0.75);
}

.higuppy-trust-bar__payment-icon {
    width: 36px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.higuppy-trust-bar__payment-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Trust badge on single product pages */
.higuppy-product-trust {
    display: flex;
    align-items: center;
    gap: calc(var(--higuppy-space) * 1.5);
    margin: calc(var(--higuppy-space) * 2) 0;
    padding: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2);
    background: var(--higuppy-neutral-100);
    border-left: 3px solid var(--higuppy-secondary);
    border-radius: 0 calc(var(--higuppy-space) * 0.5) calc(var(--higuppy-space) * 0.5) 0;
    font-size: 0.875rem;
    color: var(--higuppy-primary);
    font-weight: 500;
}

.higuppy-product-trust__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--higuppy-secondary);
}

/* ==========================================================================
   CONTENT PAGE TYPOGRAPHY & LAYOUT
   Styling for informational pages (About, FAQ, Policies, Guides).
   @validates Requirements 17.1, 17.6
   ========================================================================== */

.entry-content,
.page-content,
.post-content {
    font-family: var(--higuppy-font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--higuppy-neutral-900);
    max-width: 800px;
}

.entry-content h1,
.page-content h1 {
    margin-bottom: calc(var(--higuppy-space) * 3);
}

.entry-content h2,
.page-content h2 {
    margin-top: calc(var(--higuppy-space) * 5);
    margin-bottom: calc(var(--higuppy-space) * 2);
    padding-bottom: calc(var(--higuppy-space) * 1);
    border-bottom: 2px solid var(--higuppy-neutral-100);
}

.entry-content h3,
.page-content h3 {
    margin-top: calc(var(--higuppy-space) * 4);
    margin-bottom: calc(var(--higuppy-space) * 1.5);
}

.entry-content ul,
.entry-content ol,
.page-content ul,
.page-content ol {
    padding-left: calc(var(--higuppy-space) * 3);
    margin-bottom: calc(var(--higuppy-space) * 2);
}

.entry-content li,
.page-content li {
    margin-bottom: calc(var(--higuppy-space) * 1);
    line-height: 1.6;
}

.entry-content blockquote,
.page-content blockquote {
    margin: calc(var(--higuppy-space) * 3) 0;
    padding: calc(var(--higuppy-space) * 2) calc(var(--higuppy-space) * 3);
    border-left: 4px solid var(--higuppy-secondary);
    background: var(--higuppy-neutral-100);
    font-style: italic;
    border-radius: 0 calc(var(--higuppy-space) * 0.5) calc(var(--higuppy-space) * 0.5) 0;
}

.entry-content table,
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: calc(var(--higuppy-space) * 3);
    font-size: 0.9375rem;
}

.entry-content th,
.page-content th {
    background: var(--higuppy-primary);
    color: #fff;
    font-weight: 600;
    padding: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2);
    text-align: left;
}

.entry-content td,
.page-content td {
    padding: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2);
    border-bottom: 1px solid rgba(6, 27, 61, 0.08);
}

.entry-content tr:hover td,
.page-content tr:hover td {
    background: var(--higuppy-neutral-100);
}

/* Code blocks within content */
.entry-content code,
.page-content code {
    font-family: var(--higuppy-font-mono);
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    background: var(--higuppy-neutral-100);
    border-radius: 3px;
    color: var(--higuppy-primary);
}

.entry-content pre,
.page-content pre {
    font-family: var(--higuppy-font-mono);
    font-size: 0.875rem;
    padding: calc(var(--higuppy-space) * 2.5);
    background: var(--higuppy-neutral-900);
    color: var(--higuppy-neutral-100);
    border-radius: calc(var(--higuppy-space) * 1);
    overflow-x: auto;
    margin-bottom: calc(var(--higuppy-space) * 3);
}

/* ==========================================================================
   SINGLE PRODUCT PAGE ENHANCEMENTS
   @validates Requirements 17.3, 17.6
   ========================================================================== */

.woocommerce div.product .product_title {
    font-family: var(--higuppy-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--higuppy-neutral-900);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--higuppy-primary);
}

.woocommerce div.product .single_add_to_cart_button {
    background: linear-gradient(135deg, var(--higuppy-accent) 0%, var(--higuppy-accent-orange) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: calc(var(--higuppy-space) * 2) calc(var(--higuppy-space) * 4);
    font-family: var(--higuppy-font-primary);
    font-size: 1rem;
    font-weight: 600;
    min-height: var(--higuppy-touch-min);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #ff7d60 0%, #ffad5c 100%);
}

/* ==========================================================================
   FOOTER: Hide XStore default footer — replaced by custom HiGuppy footer
   The custom footer is rendered by the custom-site-plugin footer-links module.
   We hide the theme's built-in footer widgets/content to avoid duplication.
   ========================================================================== */

/* Hide the entire XStore default footer widget area and info section */
footer.footer,
.site-footer > *:not(.higuppy-footer-links),
.footer-top,
.footer-middle,
.footer-bottom,
footer.footer .footer-top,
footer.footer .footer-middle,
footer.footer .footer-bottom,
.footer .widget-area,
.footer-widget-area,
.site-footer .widget,
.site-footer .footer-widgets,
#footer:not(.higuppy-footer-links),
#footer .widget,
.et_b_footer-widget-area,
.et_b_footer-copyrights,
.et_b_footer-menu,
.footer-area,
.site-info,
.footer-copyright:not(.higuppy-footer-copyright),
.copyright-bar:not(.higuppy-copyright-bar) {
    display: none !important;
}

/* Keep the custom HiGuppy footer visible */
.higuppy-footer-links {
    display: block !important;
}

/* ==========================================================================
   HOMEPAGE
   Static homepage replacing the imported XStore electronics demo.
   ========================================================================== */

.higuppy-home {
    background: #f7fbff;
    color: var(--higuppy-neutral-900);
}

body.home .content-page,
body.home .content-page > .sidebar-position-right,
body.home .content-page > .sidebar-position-right > .row {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.home .content-page .content,
body.home .content-page .content.col-md-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
}

body.home .content-page .sidebar,
body.home .content-page .col-md-3,
body.home .content-page .col-lg-3,
body.home .content-page .widget-area,
body.home .content-page .sidebar-widget,
body.home .content-page aside,
body.home .content-page [class*="sidebar"]:not(.sidebar-position-right):not(.sidebar-mobile-bottom) {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body.home .content-page .container,
body.home .container.content-page {
    max-width: 100% !important;
}

.higuppy-home__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 32px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px 40px;
}

.higuppy-home__hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.higuppy-home__eyebrow {
    margin: 0 0 12px;
    color: var(--higuppy-secondary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.higuppy-home h1 {
    max-width: 780px;
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    line-height: 1;
    letter-spacing: 0;
}

.higuppy-home__intro {
    max-width: 680px;
    margin-bottom: 28px;
    color: #31506f;
    font-size: 1.125rem;
}

.higuppy-home__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.higuppy-home__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.higuppy-home__button:hover,
.higuppy-home__button:focus {
    text-decoration: none;
}

.higuppy-home__button--primary {
    background: var(--higuppy-accent);
    color: #fff;
}

.higuppy-home__button--primary:hover,
.higuppy-home__button--primary:focus {
    background: #e55a1f;
    color: #fff;
}

.higuppy-home__button--secondary {
    border: 1px solid rgba(26, 82, 118, 0.24);
    background: #fff;
    color: var(--higuppy-primary);
}

.higuppy-home__hero-panel {
    display: grid;
    gap: 12px;
    align-content: center;
    padding: 24px;
    border: 1px solid rgba(26, 82, 118, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(6, 27, 61, 0.08);
}

.higuppy-home__stat {
    padding: 18px;
    border-radius: 8px;
    background: #eef7ff;
}

.higuppy-home__stat strong,
.higuppy-home__stat span {
    display: block;
}

.higuppy-home__stat strong {
    margin-bottom: 4px;
    color: var(--higuppy-primary);
    font-size: 1.125rem;
}

.higuppy-home__stat span {
    color: #45627f;
}

.higuppy-home__section,
.higuppy-home__category-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.higuppy-home__section-heading {
    margin-bottom: 24px;
}

.higuppy-home__category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.higuppy-home__category {
    display: block;
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(26, 82, 118, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--higuppy-neutral-900);
    text-decoration: none;
}

.higuppy-home__category:hover,
.higuppy-home__category:focus {
    border-color: rgba(255, 106, 42, 0.45);
    color: var(--higuppy-neutral-900);
    text-decoration: none;
}

.higuppy-home__category span,
.higuppy-home__category strong {
    display: block;
}

.higuppy-home__category span {
    margin-bottom: 12px;
    color: var(--higuppy-secondary);
    font-weight: 700;
}

.higuppy-home__category strong {
    font-size: 1.25rem;
    line-height: 1.25;
}

.higuppy-home__split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 32px;
}

.higuppy-home__feature-list p {
    margin-bottom: 18px;
}

/* Hero inline stats */
.higuppy-home__hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(26, 82, 118, 0.1);
}

.higuppy-home__mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.higuppy-home__mini-stat strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--higuppy-primary);
    line-height: 1;
}

.higuppy-home__mini-stat span {
    font-size: 0.8125rem;
    color: #45627f;
}

/* Section sub heading */
.higuppy-home__section-sub {
    max-width: 600px;
    color: #45627f;
    font-size: 1.0625rem;
    margin-top: 8px;
}

/* Section CTA center */
.higuppy-home__section-cta {
    text-align: center;
    margin-top: 32px;
}

/* Alt section background */
.higuppy-home__section--alt {
    background: #fff;
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    border-top: 1px solid rgba(26, 82, 118, 0.06);
    border-bottom: 1px solid rgba(26, 82, 118, 0.06);
}

/* Category icon */
.higuppy-home__category-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.higuppy-home__category em {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 0.9375rem;
    color: #45627f;
    font-weight: 400;
}

/* How It Works Steps */
.higuppy-home__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.higuppy-home__step {
    position: relative;
    padding: 32px 24px;
    background: #fff;
    border: 1px solid rgba(26, 82, 118, 0.1);
    border-radius: 12px;
    text-align: center;
}

.higuppy-home__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--higuppy-accent);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.higuppy-home__step h3 {
    margin-bottom: 12px;
    font-size: 1.125rem;
}

.higuppy-home__step p {
    color: #45627f;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* Feature items in Why section */
.higuppy-home__feature {
    margin-bottom: 24px;
    padding: 20px;
    background: #f7fbff;
    border-radius: 10px;
    border: 1px solid rgba(26, 82, 118, 0.06);
}

.higuppy-home__feature strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.0625rem;
}

.higuppy-home__feature p {
    margin-bottom: 0;
    color: #45627f;
    font-size: 0.9375rem;
}

/* Testimonials */
.higuppy-home__testimonials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.higuppy-home__testimonial {
    margin: 0;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid rgba(26, 82, 118, 0.1);
    border-radius: 12px;
    font-style: normal;
    border-left: 4px solid var(--higuppy-accent);
}

.higuppy-home__testimonial p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--higuppy-neutral-900);
    margin-bottom: 12px;
}

.higuppy-home__testimonial cite {
    font-style: normal;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--higuppy-primary);
}

/* Resource cards */
.higuppy-home__resource-cards {
    display: grid;
    gap: 12px;
}

.higuppy-home__resource-card {
    padding: 20px;
    background: #f7fbff;
    border-radius: 10px;
    border: 1px solid rgba(26, 82, 118, 0.08);
}

.higuppy-home__resource-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.higuppy-home__resource-card p {
    margin-bottom: 0;
    font-size: 0.9375rem;
    color: #45627f;
}

/* Final CTA */
.higuppy-home__final-cta {
    text-align: center;
    padding: 72px 24px;
    background: linear-gradient(135deg, #eef7ff 0%, #f7fbff 100%);
    border-radius: 16px;
    margin: 48px auto;
    max-width: 900px;
}

.higuppy-home__final-cta h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.higuppy-home__final-cta p {
    color: #45627f;
    font-size: 1.125rem;
    margin-bottom: 28px;
}

.higuppy-home__final-cta .higuppy-home__actions {
    justify-content: center;
}

/* Large button variant */
.higuppy-home__button--lg {
    padding: 16px 32px;
    font-size: 1.0625rem;
}

/* Header actions wrapper — moved to mobile-header.php inline styles */

@media (max-width: 768px) {
    .higuppy-home__hero,
    .higuppy-home__split,
    .higuppy-home__category-grid,
    .higuppy-home__steps,
    .higuppy-home__testimonials {
        grid-template-columns: 1fr;
    }

    .higuppy-home__hero {
        padding-top: 44px;
    }

    .higuppy-home h1 {
        font-size: 2.25rem;
    }

    .higuppy-home__hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .higuppy-home__mini-stat strong {
        font-size: 1.25rem;
    }

    .higuppy-home__section--alt {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .higuppy-home__final-cta {
        margin: 24px 0;
        padding: 48px 16px;
        border-radius: 12px;
    }
}

/* ==========================================================================
   PERFORMANCE: Content-visibility for below-fold sections
   Skips rendering of off-screen content until scrolled into view.
   Reduces initial layout/paint cost for LCP optimization.
   @validates Requirement 17.5
   ========================================================================== */

/* Below-fold sections — skip rendering until near viewport */
.related.products,
.upsells.products,
.woocommerce-tabs,
#reviews,
.cross-sells {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* ==========================================================================
   PERFORMANCE: Lazy loading image placeholder styles
   Provides placeholder space for lazy-loaded images to prevent CLS.
   @validates Requirements 17.2, 17.5
   ========================================================================== */

/* Reserve space for lazy-loaded images to prevent layout shift (CLS) */
img[loading="lazy"] {
    background-color: var(--higuppy-neutral-100);
    transition: opacity 0.3s ease;
}

/* Fade-in effect when lazy images finish loading */
img[loading="lazy"].loaded,
img[loading="lazy"][src]:not([src=""]) {
    opacity: 1;
}

/* Product images — uniform 1:1 aspect ratio placeholder */
.products .product-element-top,
.products .product-image-wrapper,
ul.products li.product .product-element-top {
    aspect-ratio: 1 / 1;
    background-color: var(--higuppy-neutral-100);
    overflow: hidden;
}

/* Below-fold image containers get reduced priority visual treatment */
.related.products img[loading="lazy"],
.upsells.products img[loading="lazy"],
.cross-sells img[loading="lazy"] {
    background: linear-gradient(135deg, var(--higuppy-neutral-100) 25%, #eef4fa 50%, var(--higuppy-neutral-100) 75%);
    background-size: 200% 100%;
}

/* ==========================================================================
   PERFORMANCE: Efficient selectors and render optimization
   Uses class-based selectors (no deep nesting), minimal specificity,
   and avoids expensive properties on large collections.
   @validates Requirement 17.5
   ========================================================================== */

/* GPU-accelerated transitions only on interactive elements */
ul.products li.product,
.products .product {
    will-change: auto;
}

ul.products li.product:hover,
.products .product:hover {
    will-change: transform;
}

/* Reduce paint areas on scroll-heavy pages */
.higuppy-trust-bar {
    will-change: auto;
    contain: layout style;
}

/* ==========================================================================
   WOOCOMMERCE STOREFRONT — Account, login, shop brand sync
   Coral pill buttons and navy typography on My Account / shop pages.
   ========================================================================== */

body.woocommerce-account,
body.woocommerce-page,
body.woocommerce-shop,
body.post-type-archive-product,
body.single-product,
body.woocommerce-cart,
body.woocommerce-checkout {
    background-color: var(--higuppy-neutral-100);
}

/* Hide XStore yellow page heading band on storefront pages */
body.woocommerce-account .page-heading,
body.woocommerce-page .page-heading,
body.woocommerce-shop .page-heading,
body.post-type-archive-product .page-heading,
body.single-product .page-heading,
body.woocommerce-cart .page-heading,
body.woocommerce-checkout .page-heading,
body.tax-product_cat .page-heading,
body.tax-product_tag .page-heading {
    display: none !important;
}

/* Login / register forms */
.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register,
.woocommerce #customer_login .u-column1,
.woocommerce #customer_login .u-column2 {
    background: #fff;
    border: 1px solid rgba(8, 39, 71, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(8, 39, 71, 0.08);
    padding: calc(var(--higuppy-space) * 3);
}

.woocommerce-account .woocommerce-form-login h2,
.woocommerce-account .woocommerce-form-register h2,
.woocommerce #customer_login h2 {
    color: var(--higuppy-primary);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: calc(var(--higuppy-space) * 2);
}

.woocommerce-account .woocommerce-form-login label,
.woocommerce-account .woocommerce-form-register label,
.woocommerce form.login label,
.woocommerce form.register label {
    color: var(--higuppy-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.woocommerce-account .woocommerce-form-login input.input-text,
.woocommerce-account .woocommerce-form-register input.input-text,
.woocommerce form.login input.input-text,
.woocommerce form.register input.input-text {
    border: 1px solid rgba(8, 39, 71, 0.12);
    border-radius: 12px;
    padding: calc(var(--higuppy-space) * 1.5) calc(var(--higuppy-space) * 2);
    background: #fff;
    color: var(--higuppy-neutral-900);
    min-height: var(--higuppy-touch-min);
}

.woocommerce-account .woocommerce-form-login input.input-text:focus,
.woocommerce-account .woocommerce-form-register input.input-text:focus,
.woocommerce form.login input.input-text:focus,
.woocommerce form.register input.input-text:focus {
    border-color: var(--higuppy-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.15);
    outline: none;
}

/* Coral gradient primary buttons — login, register, shop, cart */
.woocommerce-account .woocommerce-form-login button.button,
.woocommerce-account .woocommerce-form-register button.button,
.woocommerce #customer_login button.button,
.woocommerce form.woocommerce-form-login button[type="submit"],
.woocommerce form.woocommerce-form-register button[type="submit"],
.woocommerce form.login button.button,
.woocommerce form.register button.button,
.woocommerce .woocommerce-Button.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .checkout-button,
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: linear-gradient(135deg, var(--higuppy-accent) 0%, var(--higuppy-accent-orange) 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    font-family: var(--higuppy-font-primary) !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: calc(var(--higuppy-space) * 1.75) calc(var(--higuppy-space) * 4) !important;
    min-height: var(--higuppy-touch-min) !important;
    box-shadow: 0 12px 28px rgba(255, 107, 74, 0.28) !important;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease !important;
}

.woocommerce-account .woocommerce-form-login button.button:hover,
.woocommerce-account .woocommerce-form-register button.button:hover,
.woocommerce #customer_login button.button:hover,
.woocommerce form.woocommerce-form-login button[type="submit"]:hover,
.woocommerce form.woocommerce-form-register button[type="submit"]:hover,
.woocommerce form.login button.button:hover,
.woocommerce form.register button.button:hover,
.woocommerce .woocommerce-Button.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .checkout-button:hover,
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background: linear-gradient(135deg, #ff7d60 0%, #ffad5c 100%) !important;
    color: #fff !important;
    filter: brightness(1.03);
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* Secondary / alt buttons (e.g. lost password) */
.woocommerce-account .lost_password a,
.woocommerce-account .woocommerce-LostPassword a,
.woocommerce .woocommerce-privacy-policy-text a {
    color: var(--higuppy-accent) !important;
}

.woocommerce-account .lost_password a:hover,
.woocommerce-account .woocommerce-LostPassword a:hover {
    color: var(--higuppy-primary) !important;
}

/* My Account navigation */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #fff;
    border: 1px solid rgba(8, 39, 71, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(8, 39, 71, 0.06);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: block;
    padding: calc(var(--higuppy-space) * 1.75) calc(var(--higuppy-space) * 2.5);
    color: var(--higuppy-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(8, 39, 71, 0.06);
    transition: background 0.2s ease, color 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    background: rgba(255, 107, 74, 0.08);
    color: var(--higuppy-accent);
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff;
    border: 1px solid rgba(8, 39, 71, 0.08);
    border-radius: 18px;
    padding: calc(var(--higuppy-space) * 3);
    box-shadow: 0 12px 32px rgba(8, 39, 71, 0.06);
}

.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
    color: var(--higuppy-primary);
}

/* Nav header — navy logo on storefront pages */
body.woocommerce-account .hg-nav-logo__text,
body.woocommerce-page .hg-nav-logo__text,
body.woocommerce-shop .hg-nav-logo__text,
body.post-type-archive-product .hg-nav-logo__text,
body.single-product .hg-nav-logo__text,
body.woocommerce-cart .hg-nav-logo__text,
body.woocommerce-checkout .hg-nav-logo__text {
    color: var(--higuppy-primary);
}

body.woocommerce-account .hg-nav-links > li > a:hover,
body.woocommerce-page .hg-nav-links > li > a:hover,
body.woocommerce-shop .hg-nav-links > li > a:hover,
body.post-type-archive-product .hg-nav-links > li > a:hover,
body.single-product .hg-nav-links > li > a:hover {
    color: var(--higuppy-accent);
}
