/* =========================================
   Global/Shared Styles
   ========================================= */
.ndv-elementor-widget {
    box-sizing: border-box;
}

/* =========================================
   Cart Icon & Mini Cart Widget
   ========================================= */
.ndv-cart-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.ndv-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.ndv-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff0000;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    min-width: 15px;
    text-align: center;
}

/* Mini Cart Dropdown */
.ndv-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 20px;
    cursor: default;
    border: 1px solid #f0f0f0;
}

.ndv-cart-icon-wrapper:hover .ndv-mini-cart-dropdown,
.ndv-cart-icon-wrapper.ndv-active .ndv-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ndv-mini-cart-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.ndv-mini-cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ndv-mini-cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
}

.ndv-cart-item-thumbnail img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 10px;
}

.ndv-cart-item-details {
    flex-grow: 1;
}

.ndv-cart-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    text-decoration: none;
}

.ndv-cart-item-price {
    font-size: 13px;
    color: #777;
}

.ndv-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ndv-qty-btn {
    background: #f0f0f0;
    border: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ndv-qty-btn:hover {
    background: #e0e0e0;
}

.ndv-remove-item {
    color: #cc0000;
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    background: none;
    border: none;
    padding: 0;
}

.ndv-mini-cart-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.ndv-cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
}

.ndv-cart-buttons {
    display: flex;
    gap: 10px;
}

.ndv-cart-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.ndv-cart-btn:hover {
    background-color: #555;
    color: #fff;
}

.ndv-checkout-btn {
    background-color: #0073aa;
}

.ndv-checkout-btn:hover {
    background-color: #005177;
}

/* Loading State */
.ndv-cart-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.ndv-cart-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #333;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ndv-spin 1s linear infinite;
}

/* =========================================
   Marquee Text Widget (New CSS Logic)
   ========================================= */
.ndv-marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.ndv-marquee-wrapper {
    display: flex;
    width: fit-content;
    /* Duration is set via inline style from PHP control */
    animation: ndv-marquee-scroll 30s linear infinite;
    will-change: transform;
}

.ndv-marquee-track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.ndv-marquee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
    white-space: nowrap;
}

/* Updated Item Structure Styles */
.ndv-marquee-link,
.ndv-marquee-content {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    /* Inherit color from parent/customizer */
    width: 100%;
    height: 100%;
}

.ndv-marquee-item p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.ndv-marquee-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ndv-marquee-icon i,
.ndv-marquee-icon svg {
    font-size: 20px;
    /* Default */
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: block;
    /* Ensures SVG takes space */
}

/* Animation - Right to Left */
@keyframes ndv-marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on Hover */
.ndv-marquee-container.ndv-pause-on-hover:hover .ndv-marquee-wrapper {
    -webkit-animation-play-state: paused !important;
    animation-play-state: paused !important;
    cursor: default;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .ndv-marquee-item {
        padding: 0 25px;
    }

    .ndv-marquee-item i {
        font-size: 16px;
    }

    .ndv-marquee-item p {
        font-size: 14px;
    }
}

/* =========================================
   Table Pricing Widget (Repeater Grid)
   ========================================= */
.ndv-pricing-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.ndv-pricing-item {
    flex: 1;
    min-width: 250px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ndv-pricing-item.is-featured {
    transform: scale(1.05);
    border-color: #0073aa;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 115, 170, 0.15);
}

.ndv-featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0073aa;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ndv-pricing-header {
    padding: 30px 20px;
    text-align: center;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
}

.ndv-pricing-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.ndv-pricing-price-box {
    display: flex;
    justify-content: center;
    align-items: baseline;
    color: #222;
}

.ndv-price-currency {
    font-size: 18px;
    vertical-align: top;
    margin-right: 2px;
}

.ndv-price-amount {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.ndv-price-period {
    font-size: 14px;
    color: #777;
    margin-left: 5px;
}

.ndv-pricing-features {
    padding: 20px;
    flex-grow: 1;
}

.ndv-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ndv-feature-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    color: #555;
    display: flex;
    align-items: center;
}

.ndv-feature-item:last-child {
    border-bottom: none;
}

.ndv-feature-icon {
    margin-right: 8px;
    color: #0073aa;
    /* Default highlight */
}

.ndv-pricing-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.ndv-pricing-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.3s;
}

.ndv-pricing-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.ndv-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.ndv-btn-md {
    padding: 12px 24px;
    font-size: 16px;
}

.ndv-btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* Custom size is handled by Elementor selector directly on padding */

@keyframes ndv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ndv-pricing-container {
        flex-direction: column;
        align-items: center;
    }

    .ndv-pricing-item {
        width: 100%;
        max-width: 400px;
    }

    .ndv-pricing-item.is-featured {
        transform: scale(1);
        z-index: 0;
    }
}

/* =========================================
   Scroll Animation Widget
   ========================================= */

/* Core Layout */
.scroll-anim-section * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.scroll-anim-section {
    position: relative;
    width: 70%;
    margin: 0 auto;
    overflow: visible;
    border-radius: 20px;
    transition: border-radius 0.3s ease;
    z-index: 10;
}

.scroll-anim-section.full-width {
    border-radius: 0;
}

/* Scroll Wrapper */
.scroll-anim-wrapper {
    position: relative;
    height: 350vh;
}

/* Sticky Container */
.scroll-anim-slides {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

/* Slide Styling */
.scroll-anim-slide {
    position: absolute;
    border-radius: 10px 10px 0px 0px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    will-change: clip-path;
}

/* Background Image Holder */
.scroll-anim-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.7);
    will-change: transform;
}

/* Stacking Order */
.scroll-anim-slide-1 {
    z-index: 1;
}

.scroll-anim-slide-2 {
    z-index: 2;
}

.scroll-anim-slide-3 {
    z-index: 3;
}

.scroll-anim-slide-4 {
    z-index: 4;
}

.scroll-anim-slide-5 {
    z-index: 5;
}

/* Initial Clip States */
.scroll-anim-slide-1 {
    clip-path: inset(0 0 0 0);
}

.scroll-anim-slide-2,
.scroll-anim-slide-3,
.scroll-anim-slide-4,
.scroll-anim-slide-5 {
    clip-path: inset(100% 0 0 0);
}

/* Text Styling */
.scroll-anim-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px;
    text-align: center;
    font-weight: 400;
    z-index: 10;
    pointer-events: none;
    color: #ffffff;
}

.scroll-anim-text .scroll-anim-heading {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    margin-bottom: 0.5em;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.scroll-anim-text p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

/* Scroll Animation Responsive */
@media screen and (max-width: 768px) {
    .scroll-anim-text .scroll-anim-heading {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .scroll-anim-text {
        max-width: 100%;
        padding: 20px;
        font-size: clamp(1.5rem, 2vw, 2rem);
        line-height: 1.6;
    }

    .scroll-anim-section {
        width: 90% !important;
    }
}

/* =========================================
   Elementor Editor Preview Styles
   ========================================= */
/* Make widget visible in Elementor editor where scroll context doesn't exist */
.elementor-editor-active .scroll-anim-wrapper {
    height: auto !important;
    min-height: 500px !important;
}

.elementor-editor-active .scroll-anim-slides {
    position: relative !important;
    height: 500px !important;
}

.elementor-editor-active .scroll-anim-slide {
    position: relative !important;
    height: 500px !important;
    display: none;
}

.elementor-editor-active .scroll-anim-slide-1 {
    display: block !important;
    clip-path: none !important;
}

.elementor-editor-active .scroll-anim-bg {
    transform: scale(1.1) !important;
}

.elementor-editor-active .scroll-anim-section {
    width: 100% !important;
    border-radius: 10px !important;
}