/* ═══════════════════════════════════════════════════════════════════
   iPhone Pro Theme — Main Stylesheet
   Palette: Viola / Nero / Bianco — Apple-style minimal
   ═══════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables (defaults — overwritten by Customizer) ──────── */
:root {
    --ipt-primary: #7C3AED;
    --ipt-secondary: #1a1a1a;
    --ipt-accent: #9333EA;
    --ipt-btn-text: #ffffff;
    --ipt-price: #7C3AED;
    --ipt-white: #ffffff;
    --ipt-light-bg: #f8f7fc;
    --ipt-border: #e5e5e5;
    --ipt-text: #1a1a1a;
    --ipt-text-light: #6b7280;
    --ipt-radius: 12px;
    --ipt-radius-sm: 8px;
    --ipt-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --ipt-shadow-lg: 0 8px 30px rgba(124,58,237,0.15);
    --ipt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ipt-text);
    background-color: var(--ipt-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--ipt-primary);
    text-decoration: none;
    transition: var(--ipt-transition);
}

a:hover {
    color: var(--ipt-accent);
}

/* ─── Container ─────────────────────────────────────────────────── */
.ipt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.ipt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--ipt-radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ipt-transition);
    text-decoration: none;
    line-height: 1.4;
}

.ipt-btn--primary {
    background: var(--ipt-primary);
    color: var(--ipt-btn-text);
}

.ipt-btn--primary:hover {
    background: var(--ipt-accent);
    color: var(--ipt-btn-text);
    transform: translateY(-1px);
    box-shadow: var(--ipt-shadow-lg);
}

.ipt-btn--outline {
    background: transparent;
    color: var(--ipt-primary);
    border: 2px solid var(--ipt-primary);
}

.ipt-btn--outline:hover {
    background: var(--ipt-primary);
    color: var(--ipt-btn-text);
}

.ipt-btn--lg {
    padding: 16px 40px;
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════════ */
.ipt-topbar {
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.ipt-topbar__text {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */
.ipt-header {
    border-bottom: 1px solid var(--ipt-border);
    position: relative;
    z-index: 1000;
}

.ipt-header--sticky {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255,255,255,0.92) !important;
}

.ipt-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}

/* Logo */
.ipt-header__logo a {
    display: flex;
    align-items: center;
}

.ipt-header__logo img {
    max-height: 40px;
    width: auto;
}

.ipt-header__site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ipt-secondary);
    letter-spacing: -0.02em;
}

.ipt-header__site-title:hover {
    color: var(--ipt-primary);
}

/* Nav */
.ipt-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ipt-nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.ipt-nav-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--ipt-text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--ipt-radius-sm);
    transition: var(--ipt-transition);
}

.ipt-nav-menu li a:hover,
.ipt-nav-menu li.current-menu-item > a {
    color: var(--ipt-primary);
    background: var(--ipt-light-bg);
}

/* Submenu */
.ipt-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ipt-white);
    border-radius: var(--ipt-radius);
    box-shadow: var(--ipt-shadow-lg);
    padding: 8px 0;
    min-width: 200px;
    list-style: none;
    z-index: 100;
}

.ipt-nav-menu li:hover > .sub-menu {
    display: block;
}

.ipt-nav-menu .sub-menu li a {
    padding: 10px 20px;
    border-radius: 0;
}

/* Header actions */
.ipt-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ipt-header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--ipt-text);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--ipt-transition);
    position: relative;
    text-decoration: none;
}

.ipt-header__action-btn:hover {
    background: var(--ipt-light-bg);
    color: var(--ipt-primary);
}

.ipt-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--ipt-primary);
    color: var(--ipt-white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ipt-cart-count:empty {
    display: none;
}

/* Mobile toggle */
.ipt-mobile-toggle {
    display: none;
}

/* Search overlay */
.ipt-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--ipt-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--ipt-border);
    box-shadow: var(--ipt-shadow);
    display: none;
    z-index: 99;
}

.ipt-search-overlay.active {
    display: block;
}

.ipt-search-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.ipt-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ipt-search-form__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
    display: flex;
}

.ipt-search-form__input {
    flex: 1;
    padding: 14px 20px 14px 44px;
    border: 2px solid var(--ipt-border);
    border-radius: var(--ipt-radius);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--ipt-transition);
    background: var(--ipt-white);
}

.ipt-search-form__input:focus {
    border-color: var(--ipt-primary);
    box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

/* ─── Live Search Dropdown ──────────────────────────────────────── */
.ipt-live-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--ipt-white);
    border-radius: var(--ipt-radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 200;
    max-height: 440px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    scrollbar-width: thin;
}

.ipt-live-search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ipt-live-search__list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.ipt-live-search__item {
    transition: background 0.15s ease;
}

.ipt-live-search__item--active,
.ipt-live-search__item:hover {
    background: var(--ipt-light-bg);
}

.ipt-live-search__item--out {
    opacity: 0.5;
}

.ipt-live-search__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
}

.ipt-live-search__img {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--ipt-radius-sm);
    overflow: hidden;
    background: var(--ipt-light-bg);
}

.ipt-live-search__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ipt-live-search__no-img {
    width: 100%;
    height: 100%;
    background: var(--ipt-light-bg);
}

.ipt-live-search__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ipt-live-search__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ipt-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ipt-live-search__title mark {
    background: rgba(124,58,237,0.15);
    color: var(--ipt-primary);
    border-radius: 2px;
    padding: 0 2px;
}

.ipt-live-search__badges {
    display: flex;
    gap: 6px;
}

.ipt-live-search__badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ipt-live-search__badge--sale {
    background: var(--ipt-primary);
    color: var(--ipt-white);
}

.ipt-live-search__price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ipt-price);
}

.ipt-live-search__price del {
    color: var(--ipt-text-light);
    font-weight: 400;
    font-size: 0.8rem;
}

.ipt-live-search__price ins {
    text-decoration: none;
}

/* View all link */
.ipt-live-search__view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    border-top: 1px solid var(--ipt-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ipt-primary);
    text-decoration: none;
    transition: var(--ipt-transition);
}

.ipt-live-search__view-all:hover {
    background: var(--ipt-light-bg);
    color: var(--ipt-accent);
}

/* Empty state */
.ipt-live-search__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ipt-text-light);
}

.ipt-live-search__empty p {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* Loading spinner */
.ipt-live-search__loading {
    padding: 32px;
    text-align: center;
}

.ipt-live-search__spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--ipt-border);
    border-top-color: var(--ipt-primary);
    border-radius: 50%;
    animation: ipt-search-spin 0.6s linear infinite;
}

@keyframes ipt-search-spin {
    to { transform: rotate(360deg); }
}

/* Mobile menu */
.ipt-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--ipt-white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 24px 24px;
}

.ipt-mobile-menu.active {
    right: 0;
}

.ipt-mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ipt-mobile-nav-menu li a {
    display: block;
    padding: 14px 0;
    color: var(--ipt-text);
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--ipt-border);
}

.ipt-mobile-nav-menu li a:hover {
    color: var(--ipt-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════ */
.ipt-hero {
    background: linear-gradient(135deg, var(--ipt-light-bg) 0%, var(--ipt-white) 100%);
    padding: 80px 0;
    overflow: hidden;
}

.ipt-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.ipt-hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ipt-secondary);
    margin-bottom: 20px;
}

.ipt-hero__subtitle {
    font-size: 1.15rem;
    color: var(--ipt-text-light);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 500px;
}

.ipt-hero__btn {
    font-size: 1rem;
    padding: 16px 36px;
}

.ipt-hero__image img {
    border-radius: var(--ipt-radius);
    box-shadow: var(--ipt-shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURES / VANTAGGI
   ═══════════════════════════════════════════════════════════════════ */
.ipt-features {
    padding: 80px 0;
    background: var(--ipt-white);
}

.ipt-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.ipt-feature-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--ipt-radius);
    background: var(--ipt-light-bg);
    transition: var(--ipt-transition);
}

.ipt-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ipt-shadow);
}

.ipt-feature-card__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.ipt-feature-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ipt-secondary);
    margin-bottom: 10px;
}

.ipt-feature-card__desc {
    font-size: 0.9rem;
    color: var(--ipt-text-light);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
.ipt-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--ipt-secondary);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.ipt-featured-products,
.ipt-latest-products {
    padding: 60px 0;
}

.ipt-featured-products {
    background: var(--ipt-light-bg);
}

.ipt-cta-shop {
    padding: 40px 0 80px;
    background: var(--ipt-light-bg);
}

/* ═══════════════════════════════════════════════════════════════════
   CONTENT AREA / PAGES
   ═══════════════════════════════════════════════════════════════════ */
.ipt-content-area {
    padding: 40px 0 80px;
}

.ipt-page__header {
    margin-bottom: 40px;
}

.ipt-page__title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ipt-secondary);
    letter-spacing: -0.02em;
}

.ipt-page__content {
    max-width: 800px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.ipt-page__content p {
    margin-bottom: 1.2em;
}

.ipt-page__content h2,
.ipt-page__content h3 {
    margin-top: 2em;
    margin-bottom: 0.6em;
    color: var(--ipt-secondary);
}

/* Posts grid */
.ipt-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.ipt-post-card {
    border-radius: var(--ipt-radius);
    overflow: hidden;
    background: var(--ipt-white);
    box-shadow: var(--ipt-shadow);
    transition: var(--ipt-transition);
}

.ipt-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ipt-shadow-lg);
}

.ipt-post-card__thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.ipt-post-card__content {
    padding: 24px;
}

.ipt-post-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ipt-post-card__title a {
    color: var(--ipt-secondary);
}

.ipt-post-card__title a:hover {
    color: var(--ipt-primary);
}

.ipt-post-card__excerpt {
    color: var(--ipt-text-light);
    font-size: 0.9rem;
}

/* Pagination */
.ipt-pagination {
    margin-top: 40px;
    text-align: center;
}

.ipt-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ipt-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ipt-radius-sm);
    font-weight: 500;
    color: var(--ipt-text);
    transition: var(--ipt-transition);
}

.ipt-pagination .page-numbers.current,
.ipt-pagination .page-numbers:hover {
    background: var(--ipt-primary);
    color: var(--ipt-white);
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.ipt-footer {
    margin-top: auto;
}

.ipt-footer__widgets {
    padding: 60px 0 40px;
}

.ipt-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.ipt-footer-widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ipt-white);
    margin-bottom: 16px;
}

.ipt-footer__col p,
.ipt-footer__col a {
    font-size: 0.9rem;
    line-height: 1.8;
}

.ipt-footer__col a:hover {
    color: var(--ipt-primary);
}

/* Social links */
.ipt-social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.ipt-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #9ca3af;
    transition: var(--ipt-transition);
}

.ipt-social-link:hover {
    background: var(--ipt-primary);
    color: var(--ipt-white);
    transform: translateY(-2px);
}

/* Bottom bar */
.ipt-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
}

.ipt-footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ipt-footer__copyright {
    font-size: 0.85rem;
    margin: 0;
}

/* Payment icons */
.ipt-payment-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ipt-payment-icon {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS (Uncode-inspired)
   ═══════════════════════════════════════════════════════════════════ */
.ipt-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: opacity, transform;
}

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

/* Variazioni */
.ipt-reveal--left {
    transform: translateX(-40px);
}
.ipt-reveal--left.ipt-reveal--visible {
    transform: translateX(0);
}

.ipt-reveal--right {
    transform: translateX(40px);
}
.ipt-reveal--right.ipt-reveal--visible {
    transform: translateX(0);
}

.ipt-reveal--scale {
    transform: scale(0.92);
}
.ipt-reveal--scale.ipt-reveal--visible {
    transform: scale(1);
}

/* Stagger delay per grid children */
.ipt-reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.ipt-reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.ipt-reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.ipt-reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.ipt-reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.ipt-reveal-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* ─── Enhanced Hero (Uncode-inspired) ──────────────────────────── */
.ipt-hero {
    padding: 100px 0 120px;
}

.ipt-hero__title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.ipt-hero__subtitle {
    font-size: 1.2rem;
    line-height: 1.8;
}

/* ─── Enhanced Section Titles ──────────────────────────────────── */
.ipt-section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    position: relative;
}

/* Elegant underline accent */
.ipt-section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--ipt-primary);
    border-radius: 2px;
    margin: 16px auto 0;
}

/* Left-aligned variant */
.ipt-section-title--left {
    text-align: left;
}

.ipt-section-title--left::after {
    margin-left: 0;
}

/* ─── Enhanced Section Spacing ─────────────────────────────────── */
.ipt-features {
    padding: 100px 0;
}

.ipt-featured-products,
.ipt-latest-products {
    padding: 80px 0;
}

/* ─── Enhanced Feature Cards ───────────────────────────────────── */
.ipt-feature-card {
    padding: 48px 32px;
    border: 1px solid transparent;
}

.ipt-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    border-color: var(--ipt-border);
}

.ipt-feature-card__icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* ─── Enhanced Buttons ─────────────────────────────────────────── */
.ipt-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124,58,237,0.35);
}

.ipt-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(124,58,237,0.2);
}

/* ─── Full-width Section with Divider ──────────────────────────── */
.ipt-section--divided {
    position: relative;
}

.ipt-section--divided::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: var(--ipt-border);
}

/* ─── Smooth Image Hover (Uncode-style) ────────────────────────── */
.ipt-hover-zoom {
    overflow: hidden;
    border-radius: var(--ipt-radius);
}

.ipt-hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.ipt-hover-zoom:hover img {
    transform: scale(1.06);
}

/* ─── Text Balance for Modern Browsers ─────────────────────────── */
.ipt-hero__title,
.ipt-section-title,
.ipt-cta-banner__title {
    text-wrap: balance;
}

/* ═══════════════════════════════════════════════════════════════════
   SANSARA-INSPIRED PREMIUM EFFECTS
   Glassmorphism, luxury gradients, refined interactions
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Glassmorphism Card Variant ───────────────────────────────── */
.ipt-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--ipt-radius);
}

/* Feature cards con glass effect */
.ipt-feature-card {
    background: rgba(248, 247, 252, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(124, 58, 237, 0.06);
}

.ipt-feature-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(124, 58, 237, 0.15);
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ─── Premium Hero Gradient ────────────────────────────────────── */
.ipt-hero {
    background: linear-gradient(160deg,
        var(--ipt-light-bg) 0%,
        rgba(124, 58, 237, 0.03) 40%,
        var(--ipt-white) 100%
    );
    position: relative;
}

/* Subtle radial glow behind hero (Sansara-style) */
.ipt-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.ipt-hero__inner {
    position: relative;
    z-index: 1;
}

/* ─── Premium Button Glow ──────────────────────────────────────── */
.ipt-btn--primary {
    position: relative;
    overflow: hidden;
}

.ipt-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* ─── Luxury Section Separator ─────────────────────────────────── */
.ipt-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

.ipt-separator__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ipt-border), transparent);
    max-width: 200px;
}

.ipt-separator__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ipt-primary);
    opacity: 0.4;
}

/* ─── Numbered Steps (Sansara-style) ──────────────────────────── */
.ipt-steps {
    counter-reset: step-counter;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    padding: 40px 0;
}

.ipt-step {
    counter-increment: step-counter;
    position: relative;
    padding: 32px 24px 32px 24px;
}

.ipt-step::before {
    content: '0' counter(step-counter);
    display: block;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--ipt-primary), var(--ipt-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1;
    opacity: 0.7;
}

.ipt-step__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ipt-secondary);
    margin-bottom: 8px;
}

.ipt-step__desc {
    font-size: 0.9rem;
    color: var(--ipt-text-light);
    line-height: 1.6;
}

/* ─── Comparison Section ───────────────────────────────────────── */
.ipt-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 40px 0;
}

.ipt-comparison__card {
    padding: 32px;
    border-radius: var(--ipt-radius);
}

.ipt-comparison__card--old {
    background: var(--ipt-light-bg);
    opacity: 0.7;
}

.ipt-comparison__card--new {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(147, 51, 234, 0.04));
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.ipt-comparison__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.ipt-comparison__card--old .ipt-comparison__label {
    color: var(--ipt-text-light);
}

.ipt-comparison__card--new .ipt-comparison__label {
    color: var(--ipt-primary);
}

/* ─── Premium Product Card Hover ───────────────────────────────── */
.ipt-product-card,
.ipt-ucard--standard {
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.ipt-product-card:hover,
.ipt-ucard--standard:hover {
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Overlay card — premium glass over image */
.ipt-ucard--overlay .ipt-ucard__overlay {
    background: linear-gradient(
        180deg,
        transparent 20%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ─── Gradient Text Utility ────────────────────────────────────── */
.ipt-gradient-text {
    background: linear-gradient(135deg, var(--ipt-primary), var(--ipt-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Subtle Grain Texture (Sansara-like) ──────────────────────── */
.ipt-grain::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ─── Responsive for premium effects ───────────────────────────── */
@media (max-width: 768px) {
    .ipt-hero::before {
        width: 300px;
        height: 300px;
        top: -10%;
        right: -15%;
    }

    .ipt-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ipt-comparison {
        grid-template-columns: 1fr;
    }
}

/* ─── Premium Dark Mode Enhancements ──────────────────────────── */
@media (prefers-color-scheme: dark) {
    .ipt-glass {
        background: rgba(26, 26, 46, 0.6);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .ipt-feature-card {
        background: rgba(26, 26, 46, 0.6);
        border-color: rgba(124, 58, 237, 0.1);
    }

    .ipt-feature-card:hover {
        background: rgba(30, 30, 50, 0.8);
        border-color: rgba(124, 58, 237, 0.25);
        box-shadow: 0 16px 48px rgba(124, 58, 237, 0.12),
                    0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .ipt-hero {
        background: linear-gradient(160deg,
            #0d0d1a 0%,
            rgba(124, 58, 237, 0.05) 40%,
            #0d0d0d 100%
        );
    }

    .ipt-hero::before {
        background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    }

    .ipt-comparison__card--old {
        background: #1a1a2e;
    }

    .ipt-comparison__card--new {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(147, 51, 234, 0.06));
        border-color: rgba(124, 58, 237, 0.2);
    }

    .ipt-step::before {
        opacity: 0.9;
    }

    .ipt-step__title {
        color: var(--ipt-text);
    }

    .ipt-product-card:hover,
    .ipt-ucard--standard:hover {
        box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15),
                    0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .ipt-grain::after {
        opacity: 0.03;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .ipt-header__nav {
        display: none;
    }

    .ipt-mobile-toggle {
        display: flex;
    }

    .ipt-mobile-menu {
        display: block;
    }

    .ipt-hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .ipt-hero__subtitle {
        max-width: 100%;
    }

    .ipt-hero {
        padding: 60px 0 70px;
    }

    .ipt-features__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ipt-feature-card {
        padding: 28px 20px;
    }

    .ipt-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .ipt-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ipt-hero__title {
        font-size: 1.8rem;
    }

    .ipt-section-title {
        font-size: 1.4rem;
    }

    .ipt-header__inner {
        height: 60px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ipt-no-content {
    text-align: center;
    padding: 80px 20px;
}

.ipt-no-content h2 {
    font-size: 1.5rem;
    color: var(--ipt-secondary);
    margin-bottom: 12px;
}

.ipt-no-content p {
    color: var(--ipt-text-light);
}

/* ═══════════════════════════════════════════════════════════════════
   DARK MODE NATIVA — prefers-color-scheme
   Segue automaticamente le impostazioni di sistema (iPhone/Mac).
   Zero JS, solo CSS. Override delle variabili custom.
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {

    :root {
        --ipt-white: #0d0d0d;
        --ipt-light-bg: #1a1a2e;
        --ipt-border: #2d2d3d;
        --ipt-text: #f0f0f5;
        --ipt-text-light: #9ca3af;
        --ipt-secondary: #f0f0f5;
        --ipt-shadow: 0 2px 8px rgba(0,0,0,0.3);
        --ipt-shadow-lg: 0 8px 30px rgba(124,58,237,0.25);
    }

    /* Body & Site */
    body {
        background-color: #0d0d0d;
        color: var(--ipt-text);
    }

    /* Top Bar */
    .ipt-topbar {
        background-color: #111 !important;
    }

    /* Header */
    .ipt-header {
        background-color: #111118 !important;
        border-bottom-color: var(--ipt-border);
    }

    .ipt-header--sticky {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        background-color: rgba(17, 17, 24, 0.85) !important;
    }

    .ipt-header__site-title {
        color: var(--ipt-text);
    }

    .ipt-header__action-btn {
        color: var(--ipt-text);
    }

    /* Navigation */
    .ipt-nav-menu > li > a {
        color: var(--ipt-text);
    }

    .ipt-nav-menu .sub-menu {
        background: #1a1a2e;
        border-color: var(--ipt-border);
    }

    .ipt-nav-menu .sub-menu a {
        color: var(--ipt-text);
    }

    .ipt-nav-menu .sub-menu a:hover {
        background: #262636;
    }

    /* Mobile Menu */
    .ipt-mobile-menu {
        background: #111118;
    }

    .ipt-mobile-nav-menu a {
        color: var(--ipt-text);
        border-bottom-color: var(--ipt-border);
    }

    /* Search Overlay */
    .ipt-search-overlay {
        background: rgba(0, 0, 0, 0.85);
    }

    .ipt-search-form__input {
        background: #1a1a2e;
        border-color: var(--ipt-border);
        color: var(--ipt-text);
    }

    .ipt-search-form__input::placeholder {
        color: #6b7280;
    }

    /* Live Search Dropdown */
    .ipt-live-search-dropdown {
        background: #1a1a2e;
        border-color: var(--ipt-border);
    }

    .ipt-live-search__item:hover,
    .ipt-live-search__item--active {
        background: #262636;
    }

    .ipt-live-search__title {
        color: var(--ipt-text);
    }

    .ipt-live-search__view-all {
        border-top-color: var(--ipt-border);
        color: var(--ipt-primary);
    }

    /* Hero */
    .ipt-hero {
        background-color: #0d0d1a;
    }

    .ipt-hero__title {
        color: var(--ipt-text);
    }

    .ipt-hero__subtitle {
        color: var(--ipt-text-light);
    }

    /* Features */
    .ipt-feature-card {
        background: #1a1a2e;
        border-color: var(--ipt-border);
    }

    .ipt-feature-card__title {
        color: var(--ipt-text);
    }

    /* Sections */
    .ipt-section {
        background-color: #0d0d0d;
    }

    .ipt-section--alt {
        background-color: #111118;
    }

    .ipt-section__title {
        color: var(--ipt-text);
    }

    /* Content / Pages */
    .ipt-page-content,
    .ipt-content {
        color: var(--ipt-text);
    }

    /* Cards & Post Grid */
    .ipt-post-card {
        background: #1a1a2e;
        border-color: var(--ipt-border);
    }

    .ipt-post-card__title a {
        color: var(--ipt-text);
    }

    /* Footer */
    .ipt-footer {
        background-color: #080810 !important;
    }

    .ipt-footer-widget-title {
        color: var(--ipt-text);
    }

    .ipt-footer__bottom {
        border-top-color: #2d2d3d;
    }

    /* Buttons — primary mantiene il suo colore */
    .ipt-btn--outline {
        color: var(--ipt-text);
        border-color: var(--ipt-border);
    }

    .ipt-btn--outline:hover {
        background: var(--ipt-primary);
        color: #fff;
        border-color: var(--ipt-primary);
    }

    /* Widgets */
    .ipt-widget {
        background: #1a1a2e;
        border-color: var(--ipt-border);
    }

    .ipt-widget-title {
        color: var(--ipt-text);
    }

    /* Scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #111118;
    }
    ::-webkit-scrollbar-thumb {
        background: #3d3d4d;
        border-radius: 4px;
    }

    /* Selection */
    ::selection {
        background: var(--ipt-primary);
        color: #fff;
    }

    /* Preloader */
    .ipt-preloader {
        background: #0d0d0d;
    }

    .ipt-preloader__spinner {
        border-color: #2d2d3d;
        border-top-color: var(--ipt-primary);
    }

    /* Inputs & Forms */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    textarea,
    select {
        background: #1a1a2e;
        border-color: var(--ipt-border);
        color: var(--ipt-text);
    }
}
