/*
Theme Name: Jungle Theme
Theme URI: https://ferbypos.com/
Author: Ferby POS & E-Commerce Team
Author URI: https://ferbypos.com/
Description: Tema oficial de alta gama optimizado para Ferby POS y Jungle Commerce. Cuenta con cabecera Sticky en 2 filas, pie de página en 4 columnas, compatibilidad total con Elementor para el contenido interior, y un comportamiento visual tipo App nativa en dispositivos móviles.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jungle-theme
*/

/*--------------------------------------------------------------
# Font & Color Variables
# Help: https://bootstrapmade.com/color-system/
--------------------------------------------------------------*/
/* Fonts */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Montserrat", sans-serif;
  --nav-font: "Poppins", sans-serif;
}

/* Global Colors - The following color variables are used throughout the website. Updating them here will change the color scheme of the entire website */
:root { 
  --background-color: #ffffff; /* Background color for the entire website, including individual sections */
  --default-color: #444444; /* Default color used for the majority of the text content across the entire website */
  --heading-color: #000000; /* Color for headings, subheadings and title throughout the website */
  --accent-color: #252223; /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
  --surface-color: #ffffff; /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
  --contrast-color: #ffffff; /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */

  /* Theme Specific Mappings */
  --jt-primary: var(--accent-color);
  --jt-primary-text: var(--nav-color);
  --jt-bg-header-top: var(--background-color);
  --jt-bg-header-bottom: #252223;
  --jt-bg-footer: #000000;
  --jt-text-dark: var(--default-color);
  --jt-text-light: #f8fafc;
  --jt-text-muted: #94a3b8;
  --jt-border: #e2e8f0;
  --jt-font-family: var(--default-font);
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
  --nav-color: rgba(255, 255, 255, 0.8);  /* The default color of the main navmenu links */
  --nav-hover-color: #ffffff; /* Applied to main navmenu links when they are hovered over or active */
  --nav-mobile-background-color: #ffffff; /* Used as the background color for mobile navigation menu */
  --nav-dropdown-background-color: #ffffff; /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
  --nav-dropdown-color: #444444; /* Used for navigation links of the dropdown items in the navigation menu. */
  --nav-dropdown-hover-color: #252223; /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

/* Color Presets - These classes override global colors when applied to any section or element, providing reuse of the sam color scheme. */
.light-background {
  --background-color: #f6f6f6;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #000000;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #ffffff;
  --surface-color: #232424;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
* {
    box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
  margin-top: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Global Button Border Radius (10px across the entire theme, except header icons and search right button) */
button:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
input[type="button"]:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
input[type="submit"]:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
input[type="reset"]:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
.button:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
.btn:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
.jc-btn:not(.jc-header-icon-btn):not(.jc-search-submit-btn),
.elementor-button,
.wp-block-button__link {
    border-radius: 10px !important;
}

/* Header Icons (50px border-radius circle) */
.jc-header-icon-btn,
.jt-header-icons a,
.jt-header-icons button {
    border-radius: 50px !important;
}

/* ----------------------------------------------------
   HEADER STICKY WRAPPER
---------------------------------------------------- */
.jt-sticky-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
    background: var(--jt-bg-header-top);
}

.jt-sticky-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Hide/collapse menu row smoothly when scrolling on Desktop so ONLY Row 1 stays sticky at top */
@media (min-width: 769px) {
    .jt-sticky-header.is-scrolled .jt-header-row-2 {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        pointer-events: none;
    }
}

/* Header Row 1: White Background (Logo | Search | Icons) */
.jt-header-row-1 {
    background: var(--jt-bg-header-top);
    border-bottom: 1px solid var(--jt-border);
    padding: 14px 0;
}

.jt-header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo Area */
.jt-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.jt-header-logo img {
    max-height: 48px;
    width: auto;
    transition: transform 0.3s ease;
}

.jt-header-logo:hover img {
    transform: scale(1.03);
}

.jt-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--jt-text-dark);
    letter-spacing: -0.5px;
}

/* Center Search Area */
.jt-header-search {
    flex: 1;
    max-width: 520px;
    display: flex;
    justify-content: center;
}

/* Inline Search Box Overrides for Theme */
.jt-header-search .jc-global-search-wrapper.jc-inline-search,
.jt-header-search form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    position: relative !important;
    border: 2px solid var(--jt-border, #e2e8f0) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.jt-header-search .jc-global-search-wrapper.jc-inline-search:focus-within {
    border-color: var(--jt-primary, #252223) !important;
    box-shadow: 0 4px 15px rgba(37, 34, 35, 0.15) !important;
}

.jt-header-search .jc-global-search-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
    color: var(--jt-text-dark, #1e293b) !important;
    outline: none !important;
    flex-grow: 1 !important;
    width: 100% !important;
}

.jt-header-search .jc-search-submit-btn {
    background: #252223 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 22px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    border-radius: 0 10px 10px 0 !important;
}

.jt-header-search .jc-search-submit-btn:hover {
    background: var(--accent-color) !important;
    color: var(--nav-color) !important;
}

.jt-header-search .jc-search-submit-btn:hover svg {
    stroke: var(--nav-color) !important;
}

.jt-header-search .jc-search-submit-btn svg {
    stroke: var(--nav-color) !important;
}

/* Icons Area (User | Wishlist | Cart) */
.jt-header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* Header Row 2: Dark Background (Primary Menu) */
.jt-header-row-2 {
    background: #252223 !important;
    color: var(--jt-text-light);
    max-height: 120px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s ease;
}

/* Navigation desktop vs mobile visibility */
.jt-mobile-only-nav {
    display: none;
}
.jt-desktop-only-nav {
    display: block;
}

.jt-nav-menu-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.jt-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
}

.jt-primary-menu > li > a {
    display: block;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--jt-text-light);
    border-radius: 10px;
    position: relative;
    letter-spacing: 0.3px;
}

.jt-primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--jt-primary);
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.jt-primary-menu > li > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.jt-primary-menu > li > a:hover::after,
.jt-primary-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

/* ----------------------------------------------------
   MAIN CONTENT CONTAINER (FOR ELEMENTOR & PAGES)
---------------------------------------------------- */
.jt-main-content {
    min-height: 65vh;
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 55px 30px; /* Desktop: 55px arriba/abajo, 30px a los lados */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .jt-main-content {
        padding: 35px 16px; /* Móvil: 35px arriba/abajo, 16px a los lados */
    }
}

/* ----------------------------------------------------
   FOOTER (4 COLUMNS + COPYRIGHT ROW)
---------------------------------------------------- */
.jt-footer {
    background: #000000 !important;
    color: var(--jt-text-light);
    padding-top: 60px;
    font-size: 0.92rem;
}

.jt-footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Row 1: 4 Columns Grid */
.jt-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.3fr;
    gap: 40px;
    padding-bottom: 50px;
}

.jt-footer-col h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.jt-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: #ffffff !important;
    border-radius: 2px;
}

.jt-footer-logo img {
    max-height: 60px;
    width: auto !important;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
}

.jt-footer-desc {
    color: var(--jt-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Social Links */
.jt-footer-connect-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.jt-social-links {
    display: flex;
    gap: 12px;
}

.jt-social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: color-mix(in srgb, #ffffff, transparent 90%) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.jt-social-link:hover {
    background-color: color-mix(in srgb, #ffffff, transparent 80%) !important;
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 34, 35, 0.4);
}

/* Footer Menu Links */
.jt-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jt-footer-links li {
    margin-bottom: 12px;
}

.jt-footer-links a {
    color: var(--jt-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.jt-footer-links a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* Contact List */
.jt-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.jt-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--jt-text-muted);
}

.jt-contact-list svg,
.jt-footer svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Footer General Buttons (color-mix 90% transparent white) */
.jt-footer button,
.jt-footer input[type="button"],
.jt-footer input[type="submit"],
.jt-footer .button,
.jt-footer .btn,
.jt-footer .elementor-button {
    background-color: color-mix(in srgb, #ffffff, transparent 90%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.jt-footer button:hover,
.jt-footer input[type="button"]:hover,
.jt-footer input[type="submit"]:hover,
.jt-footer .button:hover,
.jt-footer .btn:hover,
.jt-footer .elementor-button:hover {
    background-color: color-mix(in srgb, #ffffff, transparent 80%) !important;
    color: #ffffff !important;
}

/* App Store / Google Play Badges */
.jt-app-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.jt-app-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: color-mix(in srgb, #ffffff, transparent 90%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 14px;
    border-radius: 10px;
    color: #ffffff;
    transition: all 0.25s ease;
}

.jt-app-badge-btn:hover {
    background-color: color-mix(in srgb, #ffffff, transparent 80%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.jt-app-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.jt-app-badge-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--jt-text-muted);
}

.jt-app-badge-main {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Footer Row 2: Copyright & Bottom Links with Fine White Border */
.jt-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 24px 0;
}

.jt-footer-bottom-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--jt-text-muted);
}

.jt-footer-bottom-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.jt-footer-bottom-container a,
.jt-footer-bottom-links a,
.jt-copyright a {
    color: var(--jt-text-muted) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.jt-footer-bottom-container a:hover,
.jt-footer-bottom-links a:hover,
.jt-copyright a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* ----------------------------------------------------
   BACK TO TOP BUTTON
---------------------------------------------------- */
.jt-back-to-top {
    position: fixed;
    bottom: 36px;
    right: 105px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--accent-color);
    color: var(--nav-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 34, 35, 0.25);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jt-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jt-back-to-top:hover {
    background: color-mix(in srgb, var(--accent-color), black 20%);
    color: var(--nav-hover-color);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 15px 30px rgba(37, 34, 35, 0.4);
}

@media (max-width: 768px) {
    .jt-back-to-top {
        display: none !important;
    }
}

/* ----------------------------------------------------
   FULL RESPONSIVE: APP-LIKE FEEL ON MOBILE & TABLET
---------------------------------------------------- */
@media (max-width: 1024px) {
    .jt-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
}

@media (max-width: 768px) {
    /* Header row 1 adjustments */
    .jt-header-container {
        flex-wrap: wrap;
        padding: 0 15px;
        gap: 12px;
    }
    
    .jt-header-logo img {
        max-height: 38px;
    }

    /* Move search below or right next */
    .jt-header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        display: flex;
        justify-content: flex-end;
    }
    
    /* Prevent sticky header from creating containing block for bottom app bar on mobile */
    .jt-sticky-header,
    .jt-sticky-header.is-scrolled {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
        filter: none !important;
    }

    /* Transform Header Row 2 into Bottom App Bar (Mobile App Experience) */
    .jt-header-row-2,
    .jt-sticky-header.is-scrolled .jt-header-row-2 {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
        pointer-events: auto !important;
        background: rgba(37, 34, 35, 0.98) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        z-index: 999999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        padding: 6px 0 10px 0 !important;
    }

    /* Switch between desktop and mobile nav menus */
    .jt-desktop-only-nav {
        display: none !important;
    }
    .jt-mobile-only-nav {
        display: block !important;
    }

    .jt-primary-menu {
        justify-content: space-around;
        gap: 2px;
    }

    .jt-primary-menu > li > a {
        padding: 6px 10px;
        font-size: 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
        border-radius: 10px;
    }

    .jt-primary-menu > li > a::after {
        display: none; /* remove underline in bottom app bar */
    }

    .jt-primary-menu > li > a:hover,
    .jt-primary-menu > li.current-menu-item > a {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
    }

    /* Adjust main padding so bottom app bar doesn't overlap footer content */
    .jt-footer {
        padding-bottom: 90px;
    }

    /* Adjust floating buttons on mobile so they don't block bottom bar */
    .jt-back-to-top {
        bottom: 85px;
        right: 18px;
        width: 42px;
        height: 42px;
    }

    /* Footer Responsive Grid */
    .jt-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .jt-footer-bottom-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .jt-footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}
