/**
 * HVN Product Center - Public CSS
 * Only component-specific styles for Flatsome theme compatibility
 * No global resets or body styles
 */

/* CSS Variables */
:root {
    --hvn-primary: #2563eb;
    --hvn-primary-dark: #1d4ed8;
    --hvn-secondary: #64748b;
    --hvn-accent: #0ea5e9;
    --hvn-success: #10b981;
    --hvn-bg-card: #ffffff;
    --hvn-text-main: #0f172a;
    --hvn-text-muted: #64748b;
    --hvn-border-color: #e2e8f0;
    --hvn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --hvn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hvn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --hvn-radius: 12px;
}

/* Pricing Grid Layout */
.hvn-pricing-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .hvn-pricing-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hvn-pricing-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Pricing Card */
.pricing-card {
    background: var(--hvn-bg-card);
    border-radius: var(--hvn-radius);
    padding: 2.5rem;
    box-shadow: var(--hvn-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--hvn-border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hvn-shadow-lg);
    border-color: var(--hvn-primary);
}

.pricing-card.featured {
    border-color: var(--hvn-primary);
    background: linear-gradient(to bottom right, #ffffff, #eff6ff);
    transform: scale(1.02);
}

.pricing-card.featured:hover {
    transform: scale(1.02) translateY(-8px);
}

/* Card Header */
.pricing-card .card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-card .plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hvn-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.pricing-card .plan-desc {
    font-size: 0.95rem;
    color: var(--hvn-text-muted);
}

/* Price Display */
.pricing-card .price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0;
    gap: 0.5rem;
}

.pricing-card .price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.pricing-card .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hvn-text-main);
    vertical-align: top;
}

.pricing-card .amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--hvn-text-main);
    line-height: 1;
}

.pricing-card .period-badge {
    background: var(--hvn-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Features List */
.pricing-card .features-list {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-card .features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--hvn-text-main);
    font-size: 0.95rem;
}

.pricing-card .features-list li svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.pricing-card .check-icon {
    color: var(--hvn-success);
}

.pricing-card .cross-icon {
    color: var(--hvn-text-muted);
    opacity: 0.5;
}

.pricing-card .custom-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* CTA Button */
.pricing-card .cta-button {
    display: block;
    width: 100%;
    padding: 0.875rem;
    border-radius: var(--hvn-radius);
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background-color: #f8fafc;
    color: var(--hvn-text-main);
    border: 1px solid var(--hvn-border-color);
}

.pricing-card.featured .cta-button {
    background-color: var(--hvn-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.pricing-card .cta-button:hover {
    background-color: var(--hvn-primary-dark);
    color: white;
    border-color: transparent;
}

/* Carousel - Splide.js Enhancements */
.hvn-pricing-carousel .splide__track {
    overflow: hidden; /* Ensure track clips content */
}

.hvn-pricing-carousel .splide__list {
    margin: 0 !important;
    padding: 0 !important; /* Fix conflict: Remove theme default ul padding */
    display: flex;
    box-sizing: border-box;
}

.hvn-pricing-carousel .splide__slide {
    list-style-type: none !important; /* Remove bullets */
    margin: 0; /* Splide uses gap via margin-right */
    opacity: 1; /* Show all slides fully */
    transform: none; /* No scaling */
}

.hvn-pricing-carousel .splide__slide.is-active {
    /* No special focus style */
    opacity: 1;
    transform: none;
    z-index: 1;
}

/* Splide Arrow Overrides (Fix Flatsome Conflict) */
.hvn-pricing-carousel button.splide__arrow {
    /* Reset Flatsome button styles */
    min-width: unset;
    min-height: unset;
    line-height: normal;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    border: none;
    border-radius: 50%;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
    /* Splide Arrow Specifics */
    background: rgba(255, 255, 255, 0.9);
    width: 3rem;
    height: 3rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    z-index: 10;
    transition: all 0.2s ease;
}

.hvn-pricing-carousel button.splide__arrow:hover {
    background: #ffffff;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.hvn-pricing-carousel button.splide__arrow svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--hvn-text-main);
    transition: fill 0.2s ease;
}

.hvn-pricing-carousel button.splide__arrow:hover svg {
    fill: var(--hvn-primary);
}

/* Splide Pagination Overrides */
.hvn-pricing-carousel .splide__pagination {
    bottom: -3rem; /* Push dots below container */
    padding: 0;
}

.hvn-pricing-carousel button.splide__pagination__page {
    /* Reset Flatsome button styles */
    min-width: unset;
    min-height: unset;
    line-height: normal;
    padding: 0;
    border-radius: 50%;
    text-transform: none;
    box-shadow: none;
    
    /* Dot styling */
    width: 10px;
    height: 10px;
    background: #cbd5e1; /* slate-300 */
    border: none;
    margin: 0 6px;
    opacity: 1;
    transition: all 0.3s ease;
}

.hvn-pricing-carousel button.splide__pagination__page.is-active {
    background: var(--hvn-primary);
    transform: scale(1.2);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .pricing-card {
        padding: 1.5rem;
    }
    
    .pricing-card .amount {
        font-size: 2.5rem;
    }
    
    .pricing-card .currency {
        font-size: 1.25rem;
    }
}

/* ========================================
   MX PRODUCT CARD STYLES
   ======================================== */

.mx-product {
    padding: 1.25rem;
    text-align: center;
    background: #fff;
    border: 1px solid rgb(var(--border-color, 229, 231, 235)); /* Default fallback to gray-200 */
    border-radius: 8px;
    height: 100%;
    /* Flex layout for sticky footer */
    display: flex;
    flex-direction: column;
    /* Define vars locally if not present globally */
    --primary: 37, 99, 235; /* Blue-600 */
    --text: 31, 41, 55; /* Gray-800 */
    --muted: 107, 114, 128; /* Gray-500 */
    --border-color: 229, 231, 235; 
    position: relative; /* Anchor for featured badge */
}

.hvn-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b; /* Amber-500 */
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 5;
}

.mx-product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.mx-product-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.mx-product-footer {
    margin-top: auto;
}

.mx-product .mx-product-header + .mx-product-body {
    margin-top: 1rem;
}

.mx-product .mx-product-footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgb(var(--border-color));
}

.mx-product .mx-product-footer .button {
    margin: 0;
}

.mx-product .name {
    padding: .5rem calc(1.5rem - 4px);
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: rgb(var(--primary));
    background-color: rgba(var(--primary), 0.06);
    border-radius: 7px;
    margin-top: 0;
}

.mx-product .name:last-child {
    margin-bottom: 0;
}

.mx-product .price .now {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: rgb(var(--text));
    display: flex;
    align-items: center;
    justify-content: center;
}

.mx-product .price .now[data-label]:after {
    padding: 2px 4px;
    margin-left: .5rem;
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 400;
    color: #fff;
    background-color: #e27220;
    border-radius: 3px;
    white-space: nowrap;
}

.mx-product .price .then {
    margin-top: .25rem;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.3;
    color: rgb(var(--muted));
    text-decoration: line-through;
}

/* Feature List Styles (dl.pairs) */
.mx-product .mx-product-body dl.pairs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgb(var(--border-color));
    font-size: 0.875rem;
    text-transform: none !important;
}
.mx-product .mx-product-body dl.pairs:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.mx-product .mx-product-body dt {
    display: flex;
    align-items: center;
    color: rgb(var(--muted));
    font-weight: normal;
}
.mx-product .mx-product-body dt img,
.mx-product .mx-product-body dt svg {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.mx-product .mx-product-body dd {
    margin: 0;
    font-weight: 400;
    color: rgb(var(--text));
}

/* Button override */
.mx-product .button.primary {
    display: block;
    width: 100%;
    text-align: center;
    background: rgb(var(--primary));
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.3s;
}
.mx-product .button.primary:hover {
    background: rgba(var(--primary), 0.9);
}
