/**
 * Derma Natural — Global Glassmorphism UI Layer v3.1
 * Smoothness + Speed Optimized
 * Applies frosted glass to: Navbar, Cards, Sections, Shop, FAQs, Footer
 *
 * @package Hibo_Pharma
 */

/* ================================================================
   PERFORMANCE: GPU Acceleration Hints
   ================================================================ */
.hibo-header,
.hibo-product-card,
.dn-cat-card,
.dn-why-card,
.dn-stage-card,
.hibo-faq-item,
.dn-brand-card,
.dn-contact-card,
.dn-article-card {
    will-change: transform;
    transform: translateZ(0);
}

/* ================================================================
   1. GLASSMORPHISM HEADER — Frosted Sticky Navbar
   ================================================================ */
.hibo-header {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border-bottom: 1px solid rgba(13, 74, 47, 0.10) !important;
    box-shadow: 0 1px 32px rgba(13, 74, 47, 0.06) !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
}

/* Darker glass when scrolled */
.hibo-header.is-scrolled {
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 4px 24px rgba(13, 74, 47, 0.12) !important;
}

/* Nav links smooth hover */
.hibo-primary-nav a {
    position: relative;
    transition: color 0.2s ease !important;
}

.hibo-primary-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0d4a2f, #22c55e);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.hibo-primary-nav a:hover::after,
.hibo-primary-nav .current-menu-item > a::after {
    width: 100%;
}

/* Action buttons glass */
.hibo-action-btn {
    border-radius: 50% !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

.hibo-action-btn:hover {
    background: rgba(13, 74, 47, 0.07) !important;
    transform: translateY(-1px) !important;
}

/* ================================================================
   2. GLASSMORPHISM PRODUCT CARDS
   ================================================================ */
.hibo-product-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 12px rgba(13, 74, 47, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.3s cubic-bezier(0.16,1,0.3,1),
                border-color 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

/* Inner shimmer effect */
.hibo-product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
}

.hibo-product-card:hover {
    transform: translateY(-8px) scale(1.015) !important;
    box-shadow:
        0 20px 48px rgba(13, 74, 47, 0.15),
        0 4px 12px rgba(13, 74, 47, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    border-color: rgba(13, 74, 47, 0.22) !important;
}

/* Smooth image zoom */
.hibo-product-card:hover .hibo-product-img {
    transform: scale(1.06) !important;
}

.hibo-product-img {
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1) !important;
}

/* Card Buy button */
.hibo-card-btn {
    transition: all 0.2s ease !important;
    position: relative;
    overflow: hidden;
}

.hibo-card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hibo-card-btn:hover::before {
    opacity: 1;
}

/* ================================================================
   3. SHOP PAGE — Glass Hero Banner
   ================================================================ */
.woocommerce .woo-shop-hero,
.hibo-shop-hero {
    background:
        linear-gradient(135deg, rgba(13, 74, 47, 0.92) 0%, rgba(27, 122, 72, 0.85) 100%),
        url('') center/cover;
    backdrop-filter: blur(4px);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

/* Filter tab glassmorphism */
.hibo-filter-tabs-wrap {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 20px rgba(13, 74, 47, 0.06) !important;
}

.hibo-filter-btn {
    transition: all 0.2s ease !important;
}

/* Sort select glass */
.hibo-sort-select,
select.hibo-sort-select {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(13, 74, 47, 0.15) !important;
    border-radius: 10px !important;
}

/* ================================================================
   4. SECTION BACKGROUNDS — Glassmorphism Surfaces
   ================================================================ */

/* Category cards glass */
.dn-cat-card {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 16px rgba(13, 74, 47, 0.06), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease !important;
}

.dn-cat-card:hover {
    background: rgba(255, 255, 255, 0.96) !important;
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(13, 74, 47, 0.14), inset 0 1px 0 rgba(255,255,255,1) !important;
}

/* Why cards */
.dn-why-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 2px 12px rgba(13, 74, 47, 0.05), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease !important;
}

.dn-why-card:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 36px rgba(13, 74, 47, 0.12) !important;
}

/* ================================================================
   5. FAQ ACCORDION — Glass Cards
   ================================================================ */
.hibo-faq-item {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(13, 74, 47, 0.08) !important;
    border-radius: 16px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 10px rgba(13, 74, 47, 0.04) !important;
    overflow: hidden !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.hibo-faq-item:hover {
    box-shadow: 0 8px 24px rgba(13, 74, 47, 0.10) !important;
    transform: translateY(-2px) !important;
}

.hibo-faq-item.is-open {
    border-color: rgba(13, 74, 47, 0.18) !important;
    box-shadow: 0 4px 16px rgba(13, 74, 47, 0.08) !important;
}

.hibo-faq-trigger {
    padding: 20px 24px !important;
    transition: background 0.2s ease !important;
}

.hibo-faq-trigger:hover {
    background: rgba(13, 74, 47, 0.03) !important;
}

.hibo-faq-body {
    padding: 0 24px 20px !important;
    color: #475569 !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
}

/* ================================================================
   6. CONTACT PAGE GLASS
   ================================================================ */
.hibo-contact-card {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 16px rgba(13, 74, 47, 0.06) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.hibo-contact-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(13, 74, 47, 0.12) !important;
}

.hibo-contact-form-wrap {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 8px 32px rgba(13, 74, 47, 0.08) !important;
}

/* ================================================================
   7. BLOG ARTICLE CARDS GLASS
   ================================================================ */
.hibo-article-card {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 16px rgba(13, 74, 47, 0.06) !important;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease !important;
}

.hibo-article-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 24px 48px rgba(13, 74, 47, 0.14) !important;
}

/* ================================================================
   8. FOOTER GLASSMORPHISM
   ================================================================ */
.hibo-footer {
    background: linear-gradient(160deg, #07190e 0%, #0d2b1a 50%, #071910 100%) !important;
    position: relative;
    overflow: hidden;
}

.hibo-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
}

/* Footer glass widget boxes */
.hibo-footer-widget {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    transition: background 0.3s ease !important;
}

.hibo-footer-widget:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

/* ================================================================
   9. SALES TOAST — Glass Notification
   ================================================================ */
.hibo-sales-toast {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 8px 32px rgba(13, 74, 47, 0.18), 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* ================================================================
   10. STICKY BUY BAR — Glass Bottom
   ================================================================ */
.hibo-sticky-buy-bar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(13, 74, 47, 0.12) !important;
    box-shadow: 0 -4px 24px rgba(13, 74, 47, 0.10) !important;
}

/* ================================================================
   11. MOBILE BOTTOM BAR — Glass
   ================================================================ */
.hibo-mobile-bottom-bar {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(13, 74, 47, 0.10) !important;
    box-shadow: 0 -4px 20px rgba(13, 74, 47, 0.08) !important;
}

/* Mobile drawer */
.hibo-mobile-drawer {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
}

/* ================================================================
   12. WOOCOMMERCE — Glass Cart & Checkout
   ================================================================ */
.woocommerce-cart .cart_totals,
.woocommerce-checkout .checkout,
.woocommerce-checkout #order_review {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(13, 74, 47, 0.08) !important;
    padding: 28px !important;
}

/* WooCommerce product loop items */
.woocommerce ul.products li.product {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 12px rgba(13, 74, 47, 0.06) !important;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(13, 74, 47, 0.13) !important;
}

/* ================================================================
   13. ANNOUNCEMENT BAR — Brighter Green Brand Color
   ================================================================ */
.hibo-announcement-bar {
    background: linear-gradient(90deg, #0d4a2f 0%, #1b7a48 50%, #0d4a2f 100%) !important;
}

/* ================================================================
   14. BREADCRUMBS GLASS
   ================================================================ */
.hibo-breadcrumbs {
    background: rgba(248, 250, 252, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(13, 74, 47, 0.06) !important;
}

/* ================================================================
   15. SMOOTH SCROLL + GLOBAL TRANSITIONS
   ================================================================ */
html {
    scroll-behavior: smooth !important;
}

/* Link transitions */
a {
    transition: color 0.2s ease, opacity 0.2s ease !important;
}

/* Button press effect */
button:active,
.hibo-btn:active,
.dn-btn-primary:active {
    transform: scale(0.97) !important;
}

/* Image lazy loading blur */
img[loading="lazy"] {
    transition: filter 0.4s ease !important;
}

img[loading="lazy"].loaded {
    filter: none !important;
}

/* Focus ring for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #22c55e !important;
    outline-offset: 3px !important;
    border-radius: 4px !important;
}

/* ================================================================
   16. PAGE SPEED OPTIMIZATIONS — CSS Containment
   ================================================================ */
.dn-section,
.hibo-section {
    contain: layout style !important;
}

.hibo-products-grid,
.dn-cat-grid,
.dn-why-grid {
    contain: layout !important;
}

/* Reduce paint on scroll */
.hibo-product-card,
.dn-cat-card,
.hibo-faq-item {
    isolation: isolate !important;
}

/* Passive canvas optimizations */
.dn-particle-canvas,
#dnParticleCanvas {
    contain: strict !important;
    pointer-events: none !important;
}

/* ================================================================
   17. MOBILE GLASS ADJUSTMENTS
   ================================================================ */
@media (max-width: 768px) {
    /* Reduce blur on mobile for performance */
    .hibo-header {
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }

    .hibo-product-card,
    .dn-cat-card,
    .dn-why-card {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    /* Disable heavy animations on mobile */
    @media (prefers-reduced-motion: reduce) {
        * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }
}

/* ================================================================
   18. SINGLE PRODUCT PAGE GLASS
   ================================================================ */
.hibo-single-product-wrap {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(13, 74, 47, 0.08) !important;
}

/* Trust badges on product page */
.hibo-trust-grid .hibo-trust-card {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.hibo-trust-grid .hibo-trust-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(13, 74, 47, 0.10) !important;
}

/* ================================================================
   19. SECTION DIVIDERS — Subtle Glow Lines
   ================================================================ */
section + section::before,
.dn-section + .dn-section::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 74, 47, 0.12), transparent);
    margin: 0 auto;
    max-width: 600px;
}

/* ================================================================
   20. SMOOTH LOADING ANIMATION (Page Entrance)
   ================================================================ */
@keyframes dnFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.site-main > section:first-child,
.dn-hero {
    animation: dnFadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both !important;
}
