/*
Theme Name: iVRA Cosmetics
Theme URI: https://ivra.com
Author: iVRA Development
Author URI: https://ivra.com
Description: Custom WordPress, WooCommerce, and WPBakery theme for iVRA Cosmetics.
Version: 2.0.0
Text Domain: ivra
*/

/* Core CSS includes will be handled via functions.php to maintain caching control and structure. */

/* WooCommerce Single Product Custom Classes */
.single-product-main { padding-top: 100px; }
.single-product-breadcrumb { max-width: var(--container-max, 1400px); margin: 0 auto; padding: 2rem; }
.single-product-grid { max-width: var(--container-max, 1400px); margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.single-product-sticky { position: sticky; top: 120px; }
.single-product-tabs { max-width: var(--container-max, 1400px); margin: 0 auto; padding: 4rem 2rem; }

/* Admin bar fixes */
.admin-bar .gn-navbar { top: 32px; }
.admin-bar #gn-megamenu { top: 32px; height: calc(100vh - 32px); }

/* WPBakery Editor Mode fixes */
.vc_editor .cursor { display: none !important; }
.vc_editor .preloader { display: none !important; }

/* Ensure z-index layers */
.product-card__overlay-link { z-index: 1; }
.product-card__quick-add { z-index: 20; position: relative; }

/* Shop Archive Custom Classes */
.shop-hero-override { position: relative; overflow: hidden; padding: 220px 5% 100px; }
.shop-hero-bg { position: absolute; inset: -40px; z-index: 0; }
.shop-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: brightness(0.4) saturate(0.8); }
.shop-hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 20%, var(--bg-void) 90%); }
.shop-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,5,0.7) 0%, transparent 40%, var(--bg-void) 100%); }
.shop-hero-content { position: relative; z-index: 2; }
.shop-hero__title { margin-bottom: 2rem; }

/* ================================================
   Gamme Preloader (originally inline in index.html)
   ================================================ */
.gamme-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.gamme-preloader__brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.3em;
    color: #EAEAEA;
    opacity: 0;
}
.gamme-preloader__line {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C6A87C, transparent);
    margin: 1.2rem 0;
}
.gamme-preloader__sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #999;
    opacity: 0;
}
.gamme-preloader__progress-wrap {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.gamme-preloader__progress-track {
    width: 160px;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}
.gamme-preloader__progress-fill {
    height: 100%;
    width: 0%;
    background: #C6A87C;
    border-radius: 1px;
}
.gamme-preloader__counter {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: #666;
}

/* Hide navbar + content while loading */
body.is-loading .gn-navbar,
body.is-loading .gn-megamenu,
body.is-loading .collections-accordion {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ================================================
   WPBakery Flex Pass-Through for Homepage Accordion
   WPBakery wraps every shortcode output in:
     .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper
   The .collections-accordion needs .panel articles as
   direct flex children. `display: contents` makes the
   wrapper divs structurally invisible to flex layout.
   ================================================ */
.collections-accordion > .vc_row,
.collections-accordion > .vc_row > .wpb_column,
.collections-accordion > .vc_row > .wpb_column > .vc_column-inner,
.collections-accordion > .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper,
.collections-accordion > .vc_row_inner,
.collections-accordion > .vc_row_inner > .wpb_column,
.collections-accordion > .vc_section,
.collections-accordion .vc_row,
.collections-accordion .wpb_column,
.collections-accordion .vc_column-inner,
.collections-accordion .wpb_wrapper {
    display: contents !important;
}
/* Reset any WPBakery margins/padding on the homepage */
.collections-accordion .vc_row,
.collections-accordion .wpb_column,
.collections-accordion .vc_column-inner,
.collections-accordion .wpb_wrapper {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    max-width: none !important;
}
/* Hide any stray <p>/<br> tags WPBakery/wpautop may inject */
.collections-accordion > p,
.collections-accordion > br {
    display: none !important;
}
/* Homepage is full-viewport accordion — hide footer */
body.is-home .footer,
body.is-home .sp-footer,
body.is-home .scroll-top-btn {
    display: none !important;
}

/* ================================================
   HUD Timeline (homepage side indicator)
   ================================================ */
.hud-timeline {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.hud-timeline__track {
    width: 2px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
    position: relative;
}
.hud-timeline__indicator {
    width: 100%;
    height: 0%;
    background: #C6A87C;
    border-radius: 1px;
    position: absolute;
    top: 0;
}
.hud-timeline__numbers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.3);
}

/* ================================================
   PER-PAGE CURSOR VARIANTS
   ================================================ */

/* When "System Default" is chosen — restore native cursor */
body.no-custom-cursor,
body.no-custom-cursor * {
    cursor: auto !important;
}
body.no-custom-cursor .cursor,
body.no-custom-cursor .cursor-follower {
    display: none !important;
}

/* Ring Cursor — outline circle */
.cursor--ring {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.5);
    background: transparent !important;
    mix-blend-mode: difference;
}
.cursor--ring.is-hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(255,255,255,0.8);
    background: transparent !important;
}
.cursor-follower--ring {
    width: 6px;
    height: 6px;
    background: #fff;
}

/* Crosshair Cursor */
.cursor--crosshair {
    width: 24px;
    height: 24px;
    background: transparent !important;
    mix-blend-mode: difference;
    color: rgba(255,255,255,0.6);
}
.cursor--crosshair svg {
    width: 100%;
    height: 100%;
}
.cursor--crosshair.is-hovering {
    color: #fff;
    transform: scale(1.3);
}

/* Blend Cursor — inverted circle */
.cursor--blend {
    width: 40px;
    height: 40px;
    background: #fff !important;
    mix-blend-mode: difference;
    border-radius: 50%;
}
.cursor--blend.is-hovering {
    width: 80px;
    height: 80px;
}

/* ================================================
   MINIMAL PRELOADER
   ================================================ */
.preloader--minimal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preloader--minimal .preloader__brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    color: #C6A87C;
    letter-spacing: 0.6em;
    opacity: 0;
}
