/* ============================================================
   Tapify Core Styles
   Extracted from original index.html <style> block
   ============================================================ */

/* --- Lenis Smooth Scroll Setup --- */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* --- Anti Horizontal Scroll Safeguard --- */
/* NOTE: We use overflow-x:clip instead of overflow-x:hidden.
   overflow-x:hidden creates a scroll container which breaks
   GSAP ScrollTrigger pinning and horizontal scroll animations.
   overflow-x:clip clips visual overflow without creating a
   scroll container, so position:fixed and transforms still work. */
html,
body {
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* --- Background Parallax & Animation Containers --- */
.bg-layer {
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-overlay {
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    z-index: 1;
    transition: background 0.5s ease;
}

/* --- GSAP Animated Abstract Elements --- */
.anim-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
    opacity: 0.6;
}

.dark .anim-blob {
    opacity: 0.4;
}

.anim-ring-bg {
    position: absolute;
    border-radius: 50%;
    border: 1px solid currentColor;
    will-change: transform, opacity;
    opacity: 0;
}

.anim-grid {
    position: absolute;
    inset: -50%;
    background-size: 60px 60px;
    will-change: transform;
}

/* --- Responsive Grid Lines Based on Theme --- */
html:not(.dark) .anim-grid {
    background-image:
        linear-gradient(to right, rgba(134, 134, 139, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(134, 134, 139, 0.15) 1px, transparent 1px);
}

.dark .anim-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

/* --- Dark/Light Mode Overlay Gradients --- */
.dark .bg-overlay-base {
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.95) 100%);
}

html:not(.dark) .bg-overlay-base {
    background: linear-gradient(to bottom, rgba(245, 245, 247, 0.8) 0%, rgba(245, 245, 247, 1) 100%);
}

.dark .bg-overlay-1 {
    background: linear-gradient(to right, #050505 20%, rgba(5, 5, 5, 0.8));
}

html:not(.dark) .bg-overlay-1 {
    background: linear-gradient(to right, #F5F5F7 20%, rgba(245, 245, 247, 0.7));
}

.dark .bg-overlay-2 {
    background: linear-gradient(to left, #050505 20%, rgba(5, 5, 5, 0.8));
}

html:not(.dark) .bg-overlay-2 {
    background: linear-gradient(to left, #F5F5F7 20%, rgba(245, 245, 247, 0.7));
}

.dark .bg-overlay-radial {
    background: radial-gradient(circle at center, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.95) 100%);
}

html:not(.dark) .bg-overlay-radial {
    background: radial-gradient(circle at center, rgba(245, 245, 247, 0.7) 0%, rgba(245, 245, 247, 1) 100%);
}

.dark .bg-overlay-top {
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.7));
}

html:not(.dark) .bg-overlay-top {
    background: linear-gradient(to top, rgba(245, 245, 247, 1), rgba(245, 245, 247, 0));
}

.dark .bg-overlay-radial-cta {
    background: radial-gradient(circle at center, rgba(243, 115, 32, 0.15) 0%, rgba(5, 5, 5, 0.95) 70%);
}

html:not(.dark) .bg-overlay-radial-cta {
    background: radial-gradient(circle at center, rgba(255, 184, 0, 0.08) 0%, rgba(245, 245, 247, 0.95) 70%);
}

/* --- Masks for Text Reveals --- */
.reveal-mask {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
    padding-bottom: 0.5rem;
}

.reveal-text {
    transform: translateY(120%);
    display: inline-block;
    will-change: transform;
}

/* --- 3D Glass Card --- */
.glass-card {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    transform-style: preserve-3d;
    will-change: transform;
    transition: background 0.5s ease, border 0.5s ease, box-shadow 0.5s ease;
}

.dark .glass-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html:not(.dark) .glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* --- Phone Mockup --- */
.mock-phone {
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease, border 0.5s ease, box-shadow 0.5s ease;
}

.dark .mock-phone {
    background: #0a0a0a;
    border: 4px solid #333;
    box-shadow: 0 0 0 2px #111, inset 0 0 20px rgba(0, 0, 0, 0.5), 0 30px 60px rgba(0, 0, 0, 0.4);
}

html:not(.dark) .mock-phone {
    background: #fdfdfd;
    border: 4px solid #f0f0f3;
    box-shadow: 0 0 0 2px #e5e5ea, inset 0 0 10px rgba(0, 0, 0, 0.02), 0 30px 60px rgba(0, 0, 0, 0.08);
}

.mock-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
    transition: background 0.5s ease;
}

.dark .mock-notch {
    background: #000;
}

html:not(.dark) .mock-notch {
    background: #e5e5ea;
}

.mock-screen {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: opacity, transform;
    transition: background 0.5s ease;
}

.dark .mock-screen {
    background: linear-gradient(to bottom, #111, #050505);
}

html:not(.dark) .mock-screen {
    background: linear-gradient(to bottom, #ffffff, #F5F5F7);
}

.mock-screen.active {
    opacity: 1;
}

/* --- Hero Custom Gradient Background --- */
.hero-glow {
    transition: background 0.5s ease;
}

.dark .hero-glow {
    background: radial-gradient(circle at center, rgba(243, 115, 32, 0.2) 0%, rgba(5, 5, 5, 0) 70%);
}

html:not(.dark) .hero-glow {
    background: radial-gradient(circle at center, rgba(255, 184, 0, 0.15) 0%, rgba(245, 245, 247, 0) 70%);
}

/* --- Ecosystem Horizontal Scroll: Elementor Overflow Fix ---
   Elementor wraps every widget in nested containers (.e-con, .elementor-widget-wrap,
   .elementor-widget-container, etc.) that all default to overflow:hidden.
   The <main> tag also has overflow-x:hidden. This clips the horizontal carousel
   so that scrollWidth === clientWidth and GSAP calculates distanceToMove = 0.
   We force overflow:visible on every ancestor of #ecosystem-pin. */

/* The section itself */
#ecosystem-pin {
    overflow: visible !important;
}

/* All Elementor container ancestors wrapping the ecosystem section */
.elementor-element:has(#ecosystem-pin),
.elementor-widget:has(#ecosystem-pin),
.elementor-widget-wrap:has(#ecosystem-pin),
.elementor-widget-container:has(#ecosystem-pin),
.elementor-column:has(#ecosystem-pin),
.elementor-container:has(#ecosystem-pin),
.elementor-section:has(#ecosystem-pin),
.e-con:has(#ecosystem-pin),
.e-con-full:has(#ecosystem-pin),
[data-elementor-type]:has(#ecosystem-pin) {
    overflow: visible !important;
    max-width: none !important;
}

/* Override the main tag overflow for this section */
main:has(#ecosystem-pin) {
    overflow-x: clip !important;
}

/* --- Ecosystem: Desktop Horizontal Scroll Layout ---
   Force the container to be wider than the viewport so that
   scrollWidth > innerWidth and GSAP calculates a positive distanceToMove.
   Without these, Elementor collapses the container to 100% viewport width. */
@media (min-width: 768px) {
    #eco-horizontal-container {
        width: max-content !important;
        max-width: none !important;
        flex-wrap: nowrap !important;
    }
    #eco-horizontal-container .glass-card {
        flex-shrink: 0 !important;
        width: 400px !important;
    }
}

/* --- Ecosystem: Mobile Vertical Stack --- */
@media (max-width: 767px) {
    #eco-horizontal-container {
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    #eco-horizontal-container .glass-card {
        width: 100% !important;
    }
}

/* ============================================================
   WooCommerce Premium UI (Envato Standards)
   ============================================================ */

/* --- Typography & Global Resets --- */
.woocommerce {
    --brand-orange: #F37320;
    --brand-yellow: #FFB800;
}
.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* --- Shop Toolbar (Ordering & Result Count) --- */
.woocommerce .woocommerce-ordering select {
    appearance: none;
    background-color: transparent;
    border: 1px solid rgba(134, 134, 139, 0.3);
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    transition: all 0.3s ease;
}
.dark .woocommerce .woocommerce-ordering select {
    border-color: rgba(255, 255, 255, 0.1);
}
.woocommerce .woocommerce-ordering select:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(243, 115, 32, 0.1);
}
.woocommerce-result-count {
    font-size: 0.875rem;
    color: #86868B;
    margin-bottom: 0 !important;
}

/* --- Single Product Page --- */
.woocommerce div.product .product_title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.woocommerce div.product .price {
    color: var(--brand-orange) !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.woocommerce div.product .price del {
    color: #86868B;
    font-size: 1.25rem;
    font-weight: 500;
}
.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #86868B;
    margin-bottom: 2.5rem;
}

/* --- Add to Cart Form --- */
.woocommerce div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(134, 134, 139, 0.2);
}
.dark .woocommerce div.product form.cart {
    border-top-color: rgba(255, 255, 255, 0.1);
}
.woocommerce div.product form.cart .quantity {
    display: flex;
    align-items: center;
}
.woocommerce div.product form.cart .quantity input.qty {
    width: 4rem;
    height: 3.5rem;
    text-align: center;
    border: 1px solid rgba(134, 134, 139, 0.3);
    border-radius: 12px;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 600;
    color: inherit;
    -moz-appearance: textfield;
}
.dark .woocommerce div.product form.cart .quantity input.qty {
    border-color: rgba(255, 255, 255, 0.1);
    color-scheme: dark;
}
.woocommerce div.product form.cart .button.single_add_to_cart_button {
    flex: 1;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--brand-yellow) 0%, var(--brand-orange) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 115, 32, 0.3);
}
.woocommerce div.product form.cart .button.single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 115, 32, 0.5);
}

/* --- Product Meta --- */
.woocommerce div.product .product_meta {
    font-size: 0.875rem;
    color: #86868B;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.woocommerce div.product .product_meta a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}
.woocommerce div.product .product_meta a:hover {
    text-decoration-color: currentColor;
}

/* --- Product Tabs --- */
.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 1rem;
    margin: 0 0 2rem 0;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid rgba(134, 134, 139, 0.2);
}
.dark .woocommerce div.product .woocommerce-tabs ul.tabs {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #86868B;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
}
.woocommerce div.product .woocommerce-tabs .panel {
    color: inherit;
}
.woocommerce div.product .woocommerce-tabs .panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- Notices & Messages --- */
.woocommerce-message, .woocommerce-error, .woocommerce-info {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}
.dark .woocommerce-message, .dark .woocommerce-error, .dark .woocommerce-info {
    background: rgba(20, 20, 20, 0.8);
    border-color: rgba(255,255,255,0.1);
}
.woocommerce-message::before, .woocommerce-info::before {
    color: var(--brand-orange);
}
.woocommerce-message .button, .woocommerce-info .button {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 99px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* --- WooCommerce Forms & Checkout (Dark Mode Fixes) --- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-cart table.cart td.actions .coupon .input-text {
    background-color: transparent;
    border: 1px solid rgba(134, 134, 139, 0.3);
    color: inherit;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-cart table.cart td.actions .coupon .input-text:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(243, 115, 32, 0.1);
}

.dark .woocommerce form .form-row input.input-text,
.dark .woocommerce form .form-row textarea,
.dark .woocommerce form .form-row select,
.dark .woocommerce-cart table.cart td.actions .coupon .input-text {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    color-scheme: dark;
}
.dark .woocommerce form .form-row input.input-text::placeholder,
.dark .woocommerce form .form-row textarea::placeholder,
.dark .woocommerce-cart table.cart td.actions .coupon .input-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Select2 Dropdowns (Country/State in Checkout) */
.select2-container .select2-selection--single {
    height: auto !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(134, 134, 139, 0.3) !important;
    background-color: transparent !important;
    display: flex;
    align-items: center;
}
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 1rem !important;
}

.dark .select2-container .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
.dark .select2-container .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}
.dark .select2-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}
.dark .select2-search--dropdown .select2-search__field {
    background-color: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}
.dark .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
.dark .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-orange) !important;
    color: white !important;
}

/* --- WooCommerce Cart & Checkout BLOCKS (Dark Mode Fixes) --- */
.dark .wc-block-components-text-input input,
.dark .wc-block-components-text-input input[type="email"],
.dark .wc-block-components-text-input input[type="text"],
.dark .wc-block-components-text-input input[type="tel"],
.dark .wc-block-components-textarea textarea,
.dark .wc-block-components-combobox .wc-block-components-combobox-control__input,
.dark .wc-block-components-text-input,
.dark .wc-block-components-combobox {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    color-scheme: dark;
}

.dark .wc-block-components-text-input label,
.dark .wc-block-components-combobox label {
    color: rgba(255, 255, 255, 0.6) !important;
}

.dark .wc-block-components-text-input.is-active input,
.dark .wc-block-components-text-input.is-active label,
.dark .wc-block-components-combobox.is-active input,
.dark .wc-block-components-combobox.is-active label {
    border-color: var(--brand-orange) !important;
}

.dark .wc-block-components-order-summary,
.dark .wc-block-components-checkout-step {
    background: transparent !important;
    color: inherit !important;
}

.dark .wc-block-components-totals-item__value,
.dark .wc-block-components-order-summary-item__quantity {
    color: #fff !important;
}

.dark .wc-block-components-totals-coupon__input input {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.dark .wc-block-components-totals-coupon__button {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* --- Utilities --- */
.tapify-hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.tapify-hide-scrollbar::-webkit-scrollbar {
    display: none;
}
