/* PRODUCTS PAGE */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f4f4f2;
    color: #08173a;
    font-family: "Wix Madefor Text", "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.products-page { width: 100%; }

.products-hero,
.product-section,
.products-cta {
    width: min(88%, 1500px);
    margin: 0 auto;
}

.products-hero {
    padding: 40px 0 70px;
}

.products-hero h1 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 8vw, 92px);
    line-height: .92;
    max-width: 700px;
    margin-top: 14px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #5a6475;
}

/* Product Grid */
.product-grid {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(8,23,58,.08);
    text-decoration: none;
    color: #08173a;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(8,23,58,.12);
}

.product-card-icon {
    font-size: 32px;
    margin-bottom: 6px;
}

.product-card h3 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.1;
}

.product-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #5a6475;
}

/* Product Detail Sections */
.product-section {
    padding: 80px 0 110px;
    display: none;
    animation: fadeInUp .4s ease forwards;
}

.product-section.active {
    display: block;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: start;
    margin-bottom: 80px;
}

.section-eyebrow {
    font-size: 12px;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #5a6475;
    margin-bottom: 16px;
}

.product-section h2 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 6.5vw, 92px);
    line-height: .92;
    margin-bottom: 30px;
}

.product-section .lede {
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.65;
    color: #3a4358;
    margin-bottom: 36px;
}

.product-section .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #5a6475;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    margin-bottom: 40px;
}

.product-section .back-btn:hover { color: #08173a; }

/* Feature Blocks */
.feature-group {
    margin-bottom: 70px;
}

.feature-group-title {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(28px, 2.5vw, 42px);
    margin-bottom: 28px;
    color: #08173a;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(8,23,58,.08);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 28px;
    border: 1px solid rgba(8,23,58,.08);
    box-shadow: 0 2px 12px rgba(8,23,58,.04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(8,23,58,.1);
}

.feature-card h4 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #5a6475;
}

/* Sidebar info card */
.product-info-card {
    background: #08173a;
    color: #fff;
    border-radius: 18px;
    padding: 44px 40px;
    position: sticky;
    top: 30px;
}

.product-info-card h3 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(26px, 2.4vw, 38px);
    margin-bottom: 20px;
    line-height: 1.1;
}

.product-info-card ul {
    padding-left: 22px;
    margin-bottom: 28px;
}

.product-info-card li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
    color: rgba(255,255,255,.85);
}

.product-info-card .tag {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    margin: 4px 4px 0 0;
}

/* Benefits Strip */
.benefits-strip {
    background: #dbe2e9;
    border-radius: 18px;
    padding: 56px 52px;
    margin-bottom: 70px;
}

.benefits-strip h3 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(28px, 3vw, 46px);
    margin-bottom: 34px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255,255,255,.55);
    border-radius: 12px;
    padding: 24px 22px;
    border: 1px solid rgba(8,23,58,.06);
}

.benefit-item h4 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.benefit-item p {
    font-size: 14px;
    line-height: 1.55;
    color: #3a4358;
}

/* Comparison Table */
.comparison-table-wrap {
    overflow-x: auto;
    margin-bottom: 70px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.comparison-table th {
    background: #08173a;
    color: #fff;
    padding: 18px 24px;
    text-align: left;
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: 18px;
}

.comparison-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e6ec;
}

.comparison-table tr:nth-child(even) td { background: #f4f4f2; }

/* CTA Banner */
.products-cta {
    padding: 40px 0 80px;
    display: flex;
    justify-content: flex-end;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    padding: 16px 32px;
    background: #16254b;
    color: #fff;
    font-size: 18px;
    border-radius: 2px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.cta-btn:hover {
    background: #08173a;
    transform: translateY(-2px);
}

/* ====== ANIMATIONS (site-wide) ====== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .55s ease, transform .55s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .45s ease, transform .45s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: .1s;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: .2s;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: .3s;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: .4s;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: .5s;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(7) { transition-delay: .6s;   opacity: 1; transform: none; }

/* Dropdown nav */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-dropdown > a::after { content: ''; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid rgba(8,23,58,.1);
    border-radius: 8px;
    min-width: 230px;
    box-shadow: 0 16px 40px rgba(8,23,58,.12);
    z-index: 100;
    padding: 8px 0;
}

.dropdown-menu.open {
    display: block;
    animation: dropIn .18s ease forwards;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-menu a {
    display: block;
    padding: 11px 20px;
    font-size: 14px;
    color: #08173a;
    text-decoration: none;
    transition: background .15s;
}

.dropdown-menu a:hover { background: #f4f4f2; }

/* Responsive */
@media(max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .product-overview-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media(max-width: 768px) {
    .products-hero, .product-section, .products-cta { width: 92%; }
    .product-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-grid { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr 1fr; }
    .benefits-strip { padding: 36px 28px; }
    .products-cta { justify-content: flex-start; }
    .cta-btn { width: 100%; }
    .dropdown-menu { left: 0; transform: none; }
    @keyframes dropIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* Page hero */
.prod-page-hero {
    width: min(88%, 1500px);
    margin: 0 auto;
    padding: 50px 0 30px;
}
.prod-page-hero h1 {
    font-family: "Wix Madefor Display", sans-serif;
    font-weight: 900;
    font-size: clamp(52px, 7vw, 96px);
    line-height: .92;
    margin: 14px 0 18px;
}
.prod-hero-sub { font-size: 18px; color: #5a6475; }

/* Alternating sections */
.prod-sec { padding: 80px 0; border-top: 1px solid #dde1e8; }
.prod-sec-alt { background: #fff; }
.prod-sec-inner { width: min(88%, 1500px); margin: 0 auto; }

.prod-header { margin-bottom: 52px; }
.prod-header h2 {
    font-family: "Wix Madefor Display", sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 6vw, 88px);
    line-height: .92;
    margin: 12px 0 24px;
}

/* Image + info card side by side */
.prod-img-text {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 52px;
    align-items: start;
    margin-bottom: 60px;
}
.prod-img-text img {
    width: 100%;
    height: 380px;
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    display: block;
    background: #fff;
}

#tallyprime-server .prod-img-text,
#crm .prod-img-text{
    grid-template-columns: auto 1fr;
}

#tallyprime-server .prod-img-text img,
#crm .prod-img-text img{
    width: auto;
    height: 460px;
    max-width: none;
    max-height: none;
    object-fit: none;
    object-position: initial;
    align-self: start;
    justify-self: start;
}

@media(max-width: 1100px) {
    .prod-img-text { grid-template-columns: 1fr; gap: 32px; }
    .prod-img-text img { height: 260px; }
    #tallyprime-server .prod-img-text,
    #crm .prod-img-text{
        grid-template-columns: 1fr;
    }
    #tallyprime-server .prod-img-text img,
    #crm .prod-img-text img {
        width: 100%;
        height: 320px;
        max-width: 100%;
        max-height: none;
        object-fit: contain;
    }
}
@media(max-width: 768px) {
    .prod-page-hero, .prod-sec-inner { width: 92%; }
    .prod-header h2 { font-size: clamp(38px, 10vw, 58px); }
}

/* Individual product page layout */
.prod-page { width: 100%; }
.prod-inner {
    width: min(88%, 1500px);
    margin: 0 auto;
    padding: 48px 0 80px;
}
.prod-top { margin-bottom: 52px; }
.prod-top h1 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(38px, 7vw, 80px);
    line-height: .92;
    margin: 12px 0 28px;
}
.prod-top .lede,
.product-section .lede {
    font-size: clamp(18px, 1.9vw, 24px);
    line-height: 1.55;
    max-width: 1240px;
    color: #3a4358;
}
.prod-hero-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 52px;
    align-items: start;
    margin-bottom: 70px;
}
.prod-hero-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    background: #e0e5ea;
    box-shadow: 0 8px 32px rgba(8,23,58,.08);
}
.prod-hero-layout img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    background: #e0e5ea;
    box-shadow: 0 8px 32px rgba(8,23,58,.08);
}
.product-info-card--accent {
    background: #16254b;
}
.prod-highlight {
    background: #fff;
    border-radius: 18px;
    padding: 48px 44px;
    border: 1px solid rgba(8,23,58,.08);
    margin-bottom: 60px;
}
.prod-highlight h3 {
    font-family: "Wix Madefor Display", "Segoe UI", Arial, sans-serif;
    font-size: clamp(24px, 2.5vw, 36px);
    margin-bottom: 16px;
    line-height: 1.1;
}
.prod-highlight p {
    font-size: 18px;
    line-height: 1.65;
    color: #3a4358;
    max-width: 820px;
}
.benefits-grid--wide {
    grid-template-columns: repeat(3, 1fr);
}
.prod-cta {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(8,23,58,.08);
    margin-top: 10px;
}

/* Dropdown active item highlight */
.dropdown-menu a.dd-active {
    background: #f4f4f2;
    font-weight: 600;
}

@media(max-width: 1100px) {
    .prod-hero-layout { grid-template-columns: 1fr; gap: 32px; }
    .prod-hero-layout img,
    .prod-hero-img { height: 300px; }
    .benefits-grid--wide { grid-template-columns: repeat(2, 1fr); }
}

/* Show full image without cropping on CRM and TallyPrime Server pages */
#crm-page .prod-hero-layout img,
#tps-page .prod-hero-layout img {
    object-fit: contain;
    background: #e0e5ea;
}
@media(max-width: 768px) {
    .prod-inner { width: 92%; }
    .prod-top h1 { font-size: clamp(40px, 11vw, 60px); }
    .prod-cta { justify-content: flex-start; }
    .cta-btn { width: 100%; }
    .prod-highlight { padding: 32px 24px; }
    .benefits-grid--wide { grid-template-columns: 1fr; }
}
