/*!
 * IPHOXY Premium Polish v1 — 2026-06-05
 * Global typography (Inter) + component refinements.
 *
 * Scope: body.iphoxy-polish-v1 (toggleable via body_class filter)
 * Strategy: Additive overrides only. No layout shifts. Respect reduced-motion.
 * Affects: every front-end page (homepage, catalog, inventory, contact, account, login).
 * Excludes: WP admin dashboard (wp-admin), iphoxy.app (separate domain).
 */

/* =========================================================================
   1. TYPOGRAPHY — Inter variable, system fallback
   ========================================================================= */

body.iphoxy-polish-v1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; /* Inter stylistic alternates: cleaner i, l, single-story a */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 17px;
    line-height: 1.65;
    color: #2a2a2a;
}

body.iphoxy-polish-v1 h1,
body.iphoxy-polish-v1 .h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.022em;
}

body.iphoxy-polish-v1 h2,
body.iphoxy-polish-v1 .h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: clamp(19px, 2.6vw, 26px);
    line-height: 1.2;
    letter-spacing: -0.018em;
}

body.iphoxy-polish-v1 h3,
body.iphoxy-polish-v1 .h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.3;
    letter-spacing: -0.012em;
}

body.iphoxy-polish-v1 h4,
body.iphoxy-polish-v1 .h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.008em;
}

body.iphoxy-polish-v1 h5,
body.iphoxy-polish-v1 h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    letter-spacing: -0.005em;
}

body.iphoxy-polish-v1 small,
body.iphoxy-polish-v1 .meta,
body.iphoxy-polish-v1 .text-muted {
    font-weight: 500;
    color: #6b6b6b;
}

/* Tabular numerals for prices, stock counts, phone numbers */
body.iphoxy-polish-v1 .price,
body.iphoxy-polish-v1 .stock,
body.iphoxy-polish-v1 .count,
body.iphoxy-polish-v1 [class*="price"],
body.iphoxy-polish-v1 [class*="stock"],
body.iphoxy-polish-v1 [class*="count"],
body.iphoxy-polish-v1 .stat-number,
body.iphoxy-polish-v1 .stat-value {
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums lining-nums;
}

/* Selection: subtle brand red */
body.iphoxy-polish-v1 ::selection {
    background: rgba(217, 61, 37, 0.15);
    color: #1a1a1a;
}

/* =========================================================================
   2. BUTTONS — hover lift, focus ring, motion
   ========================================================================= */

body.iphoxy-polish-v1 .btn,
body.iphoxy-polish-v1 button.btn,
body.iphoxy-polish-v1 a.btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0;
    transition: color 150ms ease, background-color 180ms ease,
                transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 200ms ease, border-color 180ms ease;
    will-change: transform;
}

body.iphoxy-polish-v1 .btn-primary,
body.iphoxy-polish-v1 .btn.btn-primary {
    box-shadow: 0 1px 2px rgba(217, 61, 37, 0.15),
                0 4px 12px rgba(217, 61, 37, 0.08);
}

body.iphoxy-polish-v1 .btn-primary:hover,
body.iphoxy-polish-v1 .btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(217, 61, 37, 0.18),
                0 12px 28px rgba(217, 61, 37, 0.20);
}

body.iphoxy-polish-v1 .btn:active {
    transform: translateY(0);
    transition-duration: 80ms;
}

body.iphoxy-polish-v1 .btn:focus-visible,
body.iphoxy-polish-v1 button:focus-visible {
    outline: 3px solid rgba(217, 61, 37, 0.40);
    outline-offset: 2px;
}

body.iphoxy-polish-v1 .btn-ghost,
body.iphoxy-polish-v1 .btn-secondary {
    border: 1px solid rgba(13, 13, 13, 0.12);
}

body.iphoxy-polish-v1 .btn-ghost:hover {
    border-color: rgba(13, 13, 13, 0.20);
    background: rgba(13, 13, 13, 0.03);
}

/* =========================================================================
   3. NAV — underline-from-left animation on hover
   ========================================================================= */

body.iphoxy-polish-v1 .site-nav a,
body.iphoxy-polish-v1 nav.main-nav a,
body.iphoxy-polish-v1 .nav-menu a {
    position: relative;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 180ms ease;
}

body.iphoxy-polish-v1 .site-nav a::after,
body.iphoxy-polish-v1 nav.main-nav a::after,
body.iphoxy-polish-v1 .nav-menu a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -4px;
    height: 2px;
    background: #d93d25;
    transition: right 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.iphoxy-polish-v1 .site-nav a:hover::after,
body.iphoxy-polish-v1 .site-nav a:focus-visible::after,
body.iphoxy-polish-v1 .site-nav a.is-active::after,
body.iphoxy-polish-v1 .site-nav a.current::after,
body.iphoxy-polish-v1 nav.main-nav a:hover::after,
body.iphoxy-polish-v1 .nav-menu a:hover::after,
body.iphoxy-polish-v1 .nav-menu .current-menu-item > a::after {
    right: 0;
}

/* =========================================================================
   4. CARDS — softer shadows, smoother hover
   ========================================================================= */

body.iphoxy-polish-v1 .card,
body.iphoxy-polish-v1 .info-card,
body.iphoxy-polish-v1 .product-card,
body.iphoxy-polish-v1 .hp-float-card,
body.iphoxy-polish-v1 .contact-form-card {
    transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 240ms ease, border-color 200ms ease;
}

body.iphoxy-polish-v1 .card:hover,
body.iphoxy-polish-v1 .info-card:hover,
body.iphoxy-polish-v1 .product-card:hover,
body.iphoxy-polish-v1 .hp-float-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04),
                0 16px 36px rgba(13, 27, 20, 0.10);
}

/* =========================================================================
   5. FORMS — focus ring, smoother inputs
   ========================================================================= */

body.iphoxy-polish-v1 input.form-input,
body.iphoxy-polish-v1 select.form-input,
body.iphoxy-polish-v1 textarea.form-input,
body.iphoxy-polish-v1 input[type="text"],
body.iphoxy-polish-v1 input[type="email"],
body.iphoxy-polish-v1 input[type="tel"],
body.iphoxy-polish-v1 input[type="password"],
body.iphoxy-polish-v1 input[type="search"],
body.iphoxy-polish-v1 textarea,
body.iphoxy-polish-v1 select {
    font-family: 'Inter', -apple-system, sans-serif;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

body.iphoxy-polish-v1 input.form-input:focus,
body.iphoxy-polish-v1 select.form-input:focus,
body.iphoxy-polish-v1 textarea.form-input:focus,
body.iphoxy-polish-v1 input[type="text"]:focus,
body.iphoxy-polish-v1 input[type="email"]:focus,
body.iphoxy-polish-v1 input[type="tel"]:focus,
body.iphoxy-polish-v1 input[type="password"]:focus,
body.iphoxy-polish-v1 input[type="search"]:focus,
body.iphoxy-polish-v1 textarea:focus,
body.iphoxy-polish-v1 select:focus {
    border-color: #d93d25;
    box-shadow: 0 0 0 4px rgba(217, 61, 37, 0.12);
    outline: none;
}

/* =========================================================================
   6. LINKS — gentle red on hover, no surprise jumps
   ========================================================================= */

body.iphoxy-polish-v1 a {
    transition: color 150ms ease;
}

body.iphoxy-polish-v1 .footer-bottom a,
body.iphoxy-polish-v1 .footer-links a {
    transition: color 150ms ease;
}

body.iphoxy-polish-v1 .footer-bottom a:hover,
body.iphoxy-polish-v1 .footer-links a:hover {
    color: #ff7864;
}

/* =========================================================================
   7. TOPLINE BAR — refined separator
   ========================================================================= */

body.iphoxy-polish-v1 .site-topline {
    font-weight: 500;
    letter-spacing: 0.02em;
}

body.iphoxy-polish-v1 .site-topline__left > span:not(:last-child)::after,
body.iphoxy-polish-v1 .site-topline__right > span:not(:last-child)::after {
    content: '·';
    margin: 0 10px;
    opacity: 0.5;
}

/* =========================================================================
   8. UTILITY POLISH — smooth scroll, better text rendering
   ========================================================================= */

html:has(body.iphoxy-polish-v1) {
    scroll-behavior: smooth;
}

body.iphoxy-polish-v1 img,
body.iphoxy-polish-v1 svg {
    -webkit-user-drag: none;
}

/* =========================================================================
   9. PRICE / STOCK / METRIC DISPLAY POLISH
   ========================================================================= */

body.iphoxy-polish-v1 .stat-number,
body.iphoxy-polish-v1 .stock-count,
body.iphoxy-polish-v1 .price,
body.iphoxy-polish-v1 [class*="hero__stat"],
body.iphoxy-polish-v1 [class*="counter"] {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* =========================================================================
   10. REDUCED MOTION — respect accessibility preference
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    body.iphoxy-polish-v1 *,
    body.iphoxy-polish-v1 *::before,
    body.iphoxy-polish-v1 *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    body.iphoxy-polish-v1 .btn-primary:hover,
    body.iphoxy-polish-v1 .card:hover,
    body.iphoxy-polish-v1 .hp-float-card:hover {
        transform: none !important;
    }
}

/* =========================================================================
   11. MOBILE TUNING — slightly larger body for readability
   ========================================================================= */

@media (max-width: 720px) {
    body.iphoxy-polish-v1 {
        font-size: 16px;
        line-height: 1.6;
    }
    body.iphoxy-polish-v1 .btn-primary:hover {
        transform: none; /* No lift on touch devices */
    }
}

/* =========================================================================
   12. BIG TITLE OVERRIDES — specific oversized titles in the theme
   These have higher specificity than generic h1/h2 so we re-shrink them.
   ========================================================================= */

/* Homepage hero — was clamp(40, 5.2vw, 68) */
body.iphoxy-polish-v1 .hp-wow-hero__title {
    font-size: clamp(26px, 3.6vw, 40px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.022em !important;
}

body.iphoxy-polish-v1 .hp-wow-hero__sub {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

/* Contact page top header (`Contact IPHOXY CORP — Wholesale Inquiries`) */
body.iphoxy-polish-v1 .contact-page .page-header h1 {
    font-size: clamp(22px, 3vw, 32px) !important;
    line-height: 1.15 !important;
}

/* Contact page WhatsApp section header */
body.iphoxy-polish-v1 .iphoxy-wa-head h2,
body.iphoxy-polish-v1 #iphoxy-wa-heading {
    font-size: clamp(20px, 2.8vw, 28px) !important;
    line-height: 1.2 !important;
}

/* About / Inventory / Catalog page-header H1s */
body.iphoxy-polish-v1 .page-header h1,
body.iphoxy-polish-v1 .inventory-page h1,
body.iphoxy-polish-v1 .catalog-page h1,
body.iphoxy-polish-v1 .about-page h1 {
    font-size: clamp(22px, 3vw, 32px) !important;
    line-height: 1.15 !important;
}

/* Product / model card names (inventory + catalog grid items) */
body.iphoxy-polish-v1 .product-card h3,
body.iphoxy-polish-v1 .product-card .product-name,
body.iphoxy-polish-v1 .product-card__title,
body.iphoxy-polish-v1 .sku-card h3,
body.iphoxy-polish-v1 .item-card h3,
body.iphoxy-polish-v1 .family-card h3,
body.iphoxy-polish-v1 .family-card .family-name,
body.iphoxy-polish-v1 [class*="model-name"],
body.iphoxy-polish-v1 [class*="model-title"] {
    font-size: 15px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.005em !important;
    font-weight: 600 !important;
}

/* Section headers across pages (h2 with bigger spacing) */
body.iphoxy-polish-v1 .section-title,
body.iphoxy-polish-v1 .section-heading,
body.iphoxy-polish-v1 .section h2,
body.iphoxy-polish-v1 [class*="__title"] h2 {
    font-size: clamp(19px, 2.6vw, 26px) !important;
    line-height: 1.2 !important;
}

/* Info card titles (contact info panel etc) */
body.iphoxy-polish-v1 .info-card h3,
body.iphoxy-polish-v1 .info-content h4 {
    font-size: 14px !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase;
    font-weight: 600 !important;
    color: #6b6b6b !important;
}

/* =========================================================================
   13. WP-LOGIN.PHP — branded login screen
   ========================================================================= */

body.login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: linear-gradient(180deg, #fdfbf7 0%, #f8f1e7 100%) !important;
}

body.login h1 a {
    background-image: url('https://iphoxy.com/wp-content/themes/iphoxy-b2b/iphoxy-favicon-512.png') !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    width: 100% !important;
    height: 80px !important;
    margin: 0 auto 24px !important;
}

body.login #loginform {
    border-radius: 14px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.04), 0 24px 48px rgba(13,13,13,0.08) !important;
    border: 1px solid rgba(13,13,13,0.05) !important;
    padding: 28px 24px !important;
}

body.login #loginform label {
    font-weight: 600 !important;
    color: #2a2a2a !important;
    font-size: 14px !important;
}

body.login #loginform input[type="text"],
body.login #loginform input[type="password"],
body.login #loginform input[type="email"] {
    font-family: 'Inter', sans-serif !important;
    border-radius: 8px !important;
    border: 1px solid rgba(13,13,13,0.12) !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    transition: border-color 180ms ease, box-shadow 180ms ease !important;
}

body.login #loginform input[type="text"]:focus,
body.login #loginform input[type="password"]:focus,
body.login #loginform input[type="email"]:focus {
    border-color: #d93d25 !important;
    box-shadow: 0 0 0 4px rgba(217, 61, 37, 0.12) !important;
    outline: none !important;
}

body.login .wp-core-ui .button-primary {
    background: #d93d25 !important;
    border-color: #d93d25 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    border-radius: 8px !important;
    padding: 6px 18px !important;
    height: auto !important;
    line-height: 1.6 !important;
    box-shadow: 0 1px 2px rgba(217,61,37,0.15), 0 4px 12px rgba(217,61,37,0.08) !important;
    text-shadow: none !important;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease !important;
}

body.login .wp-core-ui .button-primary:hover {
    background: #b82b15 !important;
    border-color: #b82b15 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(217,61,37,0.18), 0 12px 28px rgba(217,61,37,0.20) !important;
}

body.login .wp-core-ui .button-primary:focus {
    outline: 3px solid rgba(217, 61, 37, 0.40) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

body.login #nav,
body.login #backtoblog {
    text-align: center !important;
}

body.login #nav a,
body.login #backtoblog a {
    color: #4a4a4a !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: #d93d25 !important;
}

body.login .language-switcher {
    display: none !important;
}
