/* ═══════════════════════════════════════════════════════════════
   PRODUCT PAGE — Shared styles for all product sub-pages
   Used by: /products/pos/, /products/inventory/, etc.
   ═══════════════════════════════════════════════════════════════ */

/* ── Product Hero (extends .hero from shared CSS) ──── */
.product-hero {
    padding-top: calc(64px + var(--space-16));
    padding-bottom: var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(170deg, #f8faff 0%, #f0f4ff 40%, #ffffff 100%);
}

.product-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--color-gray-200) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.product-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 30%, rgba(99, 102, 241, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 70% at 90% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 55% 85%, rgba(59, 130, 246, 0.07) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.product-hero > .container {
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .product-hero {
        padding-top: calc(72px + var(--space-24));
        padding-bottom: var(--space-24);
        text-align: left;
        overflow-x: clip;
        min-height: 700px;
    }

    .product-hero > .container {
        display: flex;
        align-items: center;
        gap: var(--space-8);
    }
}

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

@media (min-width: 1024px) {
    .product-hero__content {
        max-width: 540px;
        flex-shrink: 0;
    }
}

.product-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--color-gray-900);
    margin-bottom: var(--space-6);
}

.product-hero__subtitle {
    font-size: var(--text-xl);
    color: var(--color-gray-500);
    line-height: 1.65;
    margin-bottom: var(--space-8);
    max-width: 540px;
}

@media (max-width: 1024px) {
    .product-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

.product-hero__image {
    margin-top: var(--space-12);
}

@media (min-width: 1024px) {
    .product-hero__image {
        margin-top: 0;
        flex: 1;
        min-width: 0;
        margin-right: -80px;
    }
}

.product-hero__image img {
    max-width: 580px;
    width: 100%;
    height: auto;
}

/* ── Content Split Sections ──────────────────────────── */
.product-split {
    display: flex;
    align-items: center;
    gap: var(--space-16);
}

.product-split--reverse {
    flex-direction: row-reverse;
}

.product-split__text {
    flex: 1;
}

.product-split__title {
    font-size: clamp(1.5rem, 3vw, 2.375rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: var(--color-gray-900);
    margin-bottom: var(--space-6);
}

.product-split__desc {
    font-size: var(--text-base);
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.product-split__media {
    flex-shrink: 0;
    width: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-md);
}

.product-split__media img {
    width: 100%;
    display: block;
}

@media (max-width: 1024px) {
    .product-split,
    .product-split--reverse {
        flex-direction: column;
    }

    .product-split__media {
        width: 100%;
    }
}

/* ── Feature checklist ──────────────────────────────── */
.feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 32px;
    margin-top: var(--space-4);
}

.feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-700);
}

.feat-item i {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .feat-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Functionality Cards Grid ────────────────────────── */
.func-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.func-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    transition: all 0.2s;
}

.func-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.func-card i {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.func-card__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-gray-900);
}

.func-card__desc {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    line-height: 1.6;
}

/* Colored variants */
.func-card--orange { background: #FFF7ED; border-color: transparent; }
.func-card--purple { background: #F5F3FF; border-color: transparent; }
.func-card--green  { background: #ECFDF5; border-color: transparent; }
.func-card--red    { background: #FEF2F2; border-color: transparent; }
.func-card--blue   { background: #EFF6FF; border-color: transparent; }
.func-card--dark   { background: var(--color-gray-800); border-color: transparent; }
.func-card--dark .func-card__title { color: var(--color-gray-100); }
.func-card--dark .func-card__desc  { color: var(--color-gray-400); }

@media (max-width: 1024px) {
    .func-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .func-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Show only first 8, hide rest */
.func-grid:not(.func-grid--expanded) .func-card:nth-child(n+9) {
    display: none;
}

.func-grid__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: var(--space-8) auto 0;
    padding: 12px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-gray-200);
    background: var(--color-white);
    color: var(--color-gray-700);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.func-grid__toggle:hover {
    border-color: var(--color-gray-300);
    box-shadow: var(--shadow-sm);
}
.func-grid__toggle svg {
    transition: transform 0.3s;
}
.func-grid--expanded + .func-grid__toggle svg {
    transform: rotate(180deg);
}

.func-card[data-modal] { cursor: pointer; }

/* ── CTA Card ──────────────────────────────────────── */
.product-cta-card {
    background: var(--color-gray-900);
    border-radius: var(--radius-2xl);
    padding: var(--space-20) var(--space-16);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.product-cta-card h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-white);
    max-width: 700px;
}

.product-cta-card .cta-sub {
    font-size: var(--text-lg);
    color: var(--color-gray-400);
    max-width: 600px;
}

.cta-btns {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.btn--cta-outline {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-white);
}

.btn--cta-outline:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    color: var(--color-white);
}

.cta-trust {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding-top: var(--space-4);
}

.cta-trust span {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.cta-trust__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-gray-600);
}

@media (max-width: 768px) {
    .product-cta-card {
        padding: var(--space-12) var(--space-6);
    }

    .cta-btns {
        flex-direction: column;
        width: 100%;
    }

    .cta-btns .btn {
        width: 100%;
    }

    .cta-trust {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ── Scroll Reveal Animation ──────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Feature Modal ─────────────────────────────────── */
.feat-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.feat-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.feat-modal {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 40px -8px rgba(0,0,0,0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}
.feat-modal::-webkit-scrollbar { display: none; }
.feat-modal.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.feat-modal__header {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    padding-left: 40px;
}
.feat-modal__header-icon { flex-shrink: 0; }
.feat-modal__header-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(0,0,0,0.08);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: background 0.2s;
}
.feat-modal__header-close:hover { background: rgba(0,0,0,0.14); }

/* Color theme variants for modal header */
.feat-modal__header--orange { background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 50%, #FDE68A 100%); }
.feat-modal__header--blue   { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #93C5FD 100%); }
.feat-modal__header--green  { background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 50%, #6EE7B7 100%); }
.feat-modal__header--purple { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 50%, #C4B5FD 100%); }
.feat-modal__header--red    { background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 50%, #FCA5A5 100%); }

.feat-modal__handle { display: none; justify-content: center; height: 32px; align-items: center; }
.feat-modal__handle-pill { width: 40px; height: 4px; border-radius: 2px; background: #D1D5DB; }

.feat-modal__close-row { display: none; justify-content: flex-end; padding: 0 20px; }
.feat-modal__m-close {
    width: 32px; height: 32px; border-radius: 16px;
    background: #F1F5F9; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-gray-500);
}

.feat-modal__body { padding: 32px 40px; display: flex; flex-direction: column; gap: 28px; }
.feat-modal__top { display: flex; flex-direction: column; gap: 12px; }

.feat-modal__icon-row { display: none; align-items: center; gap: 12px; }
.feat-modal__icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.feat-modal__icon--orange { background: #FFF7ED; }
.feat-modal__icon--orange i { color: #F59E0B; }
.feat-modal__icon--blue { background: #EFF6FF; }
.feat-modal__icon--blue i { color: #2563EB; }
.feat-modal__icon--green { background: #ECFDF5; }
.feat-modal__icon--green i { color: #10B981; }
.feat-modal__icon--purple { background: #F5F3FF; }
.feat-modal__icon--purple i { color: #7C3AED; }
.feat-modal__icon--red { background: #FEF2F2; }
.feat-modal__icon--red i { color: #EF4444; }

.feat-modal__badge--desktop { display: inline-block; }
.feat-modal__badge { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 9999px; }
.feat-modal__badge--orange { background: #FFF7ED; color: #C2410C; border: 1px solid #FDBA74; }
.feat-modal__badge--blue   { background: #EFF6FF; color: #1D4ED8; border: 1px solid #93C5FD; }
.feat-modal__badge--green  { background: #ECFDF5; color: #065F46; border: 1px solid #6EE7B7; }
.feat-modal__badge--purple { background: #F5F3FF; color: #5B21B6; border: 1px solid #C4B5FD; }
.feat-modal__badge--red    { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }

.feat-modal__title { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; color: var(--color-gray-900); }
.feat-modal__tagline { font-size: 16px; color: var(--color-gray-500); line-height: 1.5; }
.feat-modal__divider { height: 1px; background: var(--color-gray-200); }
.feat-modal__text { font-size: 15px; color: #475569; line-height: 1.7; }
.feat-modal__desc { display: flex; flex-direction: column; gap: 16px; }
.feat-modal__section-title { font-size: 18px; font-weight: 700; color: var(--color-gray-900); margin-bottom: 16px; }

.feat-modal__steps { display: flex; flex-direction: column; gap: 12px; }
.feat-modal__step { display: flex; align-items: center; gap: 12px; }
.feat-modal__step-num {
    width: 28px; height: 28px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.feat-modal__step-text { font-size: 14px; color: #334155; line-height: 1.5; }

.feat-modal__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; }
.feat-modal__check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #334155; }
.feat-modal__check i { width: 16px; height: 16px; color: #10B981; flex-shrink: 0; }

.feat-modal__cta-row { display: flex; justify-content: center; padding-top: 8px; }
.feat-modal__cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 36px; border-radius: 14px;
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    box-shadow: 0 4px 8px -2px rgba(37,99,235,0.2);
    color: #fff; font-size: 15px; font-weight: 600; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; border: none; cursor: pointer;
}
.feat-modal__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 12px -2px rgba(37,99,235,0.3); }

.func-card[data-modal] { cursor: pointer; }

@media (max-width: 768px) {
    .feat-modal.is-open { transform: none; }
    .feat-modal__header { display: none !important; }
    .feat-modal__handle { display: none !important; }
    .feat-modal__close-row { display: none !important; }
    .feat-modal__icon-row { display: flex; }
    .feat-modal__badge--desktop { display: none; }
    .feat-modal__body { padding: 0 24px 32px; gap: 24px; }
    .feat-modal__title { font-size: 24px; letter-spacing: -0.6px; }
    .feat-modal__tagline { font-size: 14px; }
    .feat-modal__text { font-size: 13px; }
    .feat-modal__section-title { font-size: 16px; }
    .feat-modal__step-num { width: 24px; height: 24px; border-radius: 12px; font-size: 11px; }
    .feat-modal__step-text { font-size: 13px; }
    .feat-modal__step { gap: 10px; }
    .feat-modal__checks { gap: 8px; }
    .feat-modal__check { font-size: 12px; }
    .feat-modal__check i { width: 14px; height: 14px; }
    .feat-modal__badge { font-size: 11px; padding: 3px 10px; }
    .feat-modal__cta-row { padding: 0; }
    .feat-modal__cta { width: 100%; padding: 14px 0; }
}
