/* Custom Styles for Dr. Berrio Site Redesign */
:root {
    --primary-color: #fbe3ea;
    --primary-light: #fcecef;
    --text-dark: #121212;
    --text-muted: #555555;
    --bg-white: #ffffff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-white);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Announcement Bar */
.drberrio-announcement-bar {
    background-color: var(--primary-color);
    color: var(--text-dark);
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 9999;
    position: relative;
}

/* Sticky Header styling */
.drberrio-header {
    background-color: var(--bg-white) !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, top 0.4s ease;
}

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

.drberrio-logo img {
    max-height: 120px;
    width: auto;
    display: block;
    filter: invert(1) hue-rotate(180deg); /* Default: dark text for white header backgrounds */
    transition: filter 0.4s ease;
}

/* Initially hide the header logo — the preloader logo will fly into its spot */
.drberrio-logo.logo-hidden img {
    opacity: 0;
}

/* Desktop Navigation */
.drberrio-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.drberrio-nav > li {
    position: relative;
    padding: 10px 18px;
}

.drberrio-nav > li > a {
    text-decoration: none;
    color: var(--text-dark) !important;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.drberrio-nav > li > a:hover {
    color: #eb7396 !important;
}

/* Dropdown Menu */
.drberrio-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 15px;
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1010;
}

.drberrio-nav > li:hover .drberrio-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.drberrio-dropdown li {
    padding: 8px 10px;
}

.drberrio-dropdown a {
    text-decoration: none;
    color: var(--text-muted) !important;
    font-size: 14px;
    transition: color 0.3s ease;
}

.drberrio-dropdown a:hover {
    color: #eb7396 !important;
}

/* Header Pill Container (Bag | User) styled exactly like truekindskincare.com */
.drberrio-header-pill {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    border: 1px solid rgba(18,18,18,0.12);
    border-radius: 30px;
    padding: 2px 10px;
    transition: all 0.4s ease;
}

.drberrio-header-pill-btn {
    color: var(--text-dark) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.drberrio-header-pill-btn svg {
    width: 18px;
    height: 18px;
}

.pill-divider {
    width: 1px;
    height: 16px;
    background-color: rgba(18,18,18,0.12);
    margin: 0 4px;
    transition: background-color 0.4s ease;
}

.drberrio-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #eb7396;
    color: white;
    font-size: 9px;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.drberrio-cart-badge.active {
    display: flex;
}

/* Homepage Transparent Hero Overlay Header (Only when not scrolled down) */
.home:not(.scrolled-header) .drberrio-header {
    background-color: transparent !important;
    position: absolute;
    top: 0; left: 0; width: 100%;
    border-bottom: none !important;
    box-shadow: none !important;
}

.home:not(.scrolled-header) .drberrio-logo img {
    filter: none;
}

.home:not(.scrolled-header) .drberrio-nav > li > a {
    color: white !important;
}

.home:not(.scrolled-header) .drberrio-header-pill {
    border-color: rgba(255,255,255,0.25);
}

.home:not(.scrolled-header) .drberrio-header-pill-btn {
    color: white !important;
}

.home:not(.scrolled-header) .pill-divider {
    background-color: rgba(255,255,255,0.25);
}

/* When scrolled on homepage (white header), invert logo so white text becomes black while keeping berry pinkish */
.home.scrolled-header .drberrio-logo img {
    filter: invert(1) hue-rotate(180deg);
}

/* Mobile Hamburger Menu */
.drberrio-hamburger {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* Video Hero Section (Inspired by truekindskincare.com) */
.drberrio-video-hero {
    position: relative;
    height: 85vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drberrio-hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .desktop-video { display: none !important; }
    .mobile-video { display: block !important; }
}
@media (min-width: 769px) {
    .desktop-video { display: block !important; }
    .mobile-video { display: none !important; }
}

.drberrio-video-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.25);
    z-index: 2;
}

.drberrio-video-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 20px;
}

.drberrio-video-hero-title {
    font-size: 56px;
    line-height: 1.15;
    font-weight: 300;
    margin-bottom: 20px;
    color: white;
    letter-spacing: -0.5px;
}

.drberrio-video-hero-title .italic-serif {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
}

.drberrio-video-hero-title .normal-serif {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
}

.drberrio-video-hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 35px;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.drberrio-hero-btn-wrapper {
    display: flex;
    justify-content: center;
}

.drberrio-video-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    color: #121212 !important;
    padding: 6px 6px 6px 36px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 52px;
    min-width: 280px;
}

.drberrio-video-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.btn-arrow-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2f2f2f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-arrow-circle svg {
    width: 16px;
    height: 16px;
}

.drberrio-video-hero-btn:hover .btn-arrow-circle {
    transform: translateX(3px);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.drberrio-btn-primary {
    background-color: var(--text-dark);
    color: white;
    padding: 12px 30px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--text-dark);
    display: inline-block;
}

.drberrio-btn-primary:hover {
    background-color: transparent;
    color: var(--text-dark);
}

/* Sections Base Styling */
.drberrio-section {
    padding: 80px 20px;
    max-width: 1300px;
    margin: 0 auto;
}

.drberrio-section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 50px;
    position: relative;
}

.drberrio-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #eb7396;
    margin: 15px auto 0;
}

/* Build Your Routine Section */
.drberrio-routine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}

.drberrio-routine-card {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.drberrio-routine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.drberrio-routine-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-light);
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.drberrio-routine-card:hover .drberrio-routine-icon {
    background-color: var(--primary-color);
}

.drberrio-routine-icon img {
    max-width: 50px;
    max-height: 50px;
}

.drberrio-routine-name {
    font-size: 16px;
    font-weight: 600;
}

/* Product Cards Grid */
.drberrio-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.drberrio-product-card {
    background-color: var(--bg-white);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.drberrio-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.drberrio-product-img-wrapper {
    display: block;
    position: relative;
    padding-top: 100%; /* square ratio */
    overflow: hidden;
    background-color: #fafafa;
}

.drberrio-product-img-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.drberrio-product-card:hover .drberrio-product-img-wrapper img {
    transform: scale(1.05);
}

.drberrio-product-info {
    padding: 20px;
    text-align: center;
}

.drberrio-product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
}

.drberrio-product-price {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.drberrio-product-rating {
    display: flex;
    justify-content: center;
    color: #ffcc00;
    font-size: 12px;
    margin-bottom: 15px;
}

.drberrio-add-to-cart {
    width: 100%;
    background-color: var(--text-dark);
    color: white;
    border: 2px solid var(--text-dark);
    padding: 10px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drberrio-add-to-cart:hover {
    background-color: transparent;
    color: var(--text-dark);
}

/* Brand Promises / Banner */
.drberrio-promises-section {
    background-color: var(--primary-light);
    padding: 60px 20px;
    text-align: center;
}

.drberrio-promises-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.drberrio-promise-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Let Customers Speak for Us (Reviews) */
.drberrio-reviews-container {
    max-width: 900px;
    margin: 0 auto;
}

.drberrio-review-card {
    text-align: center;
    padding: 30px;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.drberrio-review-text {
    font-size: 18px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
}

.drberrio-review-author {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

/* Newsletter Section */
.drberrio-newsletter {
    background-color: var(--primary-color);
    padding: 80px 20px;
    text-align: center;
}

.drberrio-newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.drberrio-newsletter h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.drberrio-newsletter p {
    font-size: 16px;
    margin-bottom: 30px;
}

.drberrio-newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.drberrio-newsletter-form input {
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    outline: none;
    width: 60%;
}

.drberrio-newsletter-form button {
    background-color: var(--text-dark);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.drberrio-newsletter-form button:hover {
    background-color: #333;
}

/* Footer Section */
.drberrio-footer {
    background-color: #fafafa;
    border-top: 1px solid #eaeaea;
    padding: 60px 20px 30px;
}

.drberrio-footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.drberrio-footer-col h4 {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.drberrio-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drberrio-footer-col ul li {
    margin-bottom: 12px;
}

.drberrio-footer-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.3s ease;
}

.drberrio-footer-col ul li a:hover {
    color: #eb7396;
}

.drberrio-footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    border-top: 1px solid #eaeaea;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* Canvas overlay for beautiful floating petals animation */
#drberrio-animation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Single Product Details page styling */
.drberrio-product-detail-container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.drberrio-product-gallery {
    position: sticky;
    top: 120px;
}

.drberrio-product-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.drberrio-product-meta {
    padding: 10px 0;
}

.drberrio-product-meta h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.drberrio-product-meta-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.drberrio-product-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.drberrio-product-qty-wrapper input {
    width: 60px;
    padding: 8px;
    border-radius: 30px;
    border: 1px solid #ddd;
    text-align: center;
}

.drberrio-accordion {
    margin-top: 40px;
    border-top: 1px solid #eaeaea;
}

.drberrio-accordion-item {
    border-bottom: 1px solid #eaeaea;
}

.drberrio-accordion-header {
    padding: 15px 0;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drberrio-accordion-content {
    padding: 0 0 20px 0;
    display: none;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 990px) {
    .drberrio-nav {
        display: none; /* Javascript will handle responsive mobile drawer */
    }
    
    .drberrio-hamburger {
        display: block;
    }
    
    .drberrio-product-detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .drberrio-product-gallery {
        position: static;
    }
}

/* Force hide Astra default headers and footers globally on all pages */
header:not(.drberrio-header), footer:not(.drberrio-footer), #masthead, #colophon, .site-header, .site-footer, .ast-header-bar, .ast-footer-bar {
    display: none !important;
}

/* Davidebaratta-style preloader: dark full-screen overlay with centered logo + bottom bar counter */
#drberrio-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1), background-color 0.6s ease;
}

#drberrio-preloader.fade-out {
    transform: translateY(-100%);
}

/* Centered logo: slides up from below into center of screen */
.preloader-logo-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preloader-logo-centered .preloader-logo {
    width: clamp(180px, 24vw, 280px);
    height: auto;
    filter: none; /* Keep original colors — pink berry visible on dark bg */
    opacity: 0;
    transform: translateY(50px);
    animation: preloaderLogoSlideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    /* No CSS transition here — JS controls all fly-to-header transitions via rAF */
}

/* Bottom bar with brand name (left) and counter (right) */
.preloader-bottom-bar {
    position: absolute;
    bottom: 32px;
    left: 36px;
    right: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    animation: preloaderBarIn 0.6s ease 0.4s forwards;
    transition: opacity 0.4s ease;
}

.preloader-brand-text {
    color: rgba(255, 255, 255, 0.4);
}

#preloader-percentage {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

@keyframes preloaderLogoSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes preloaderBarIn {
    to {
        opacity: 1;
    }
}

/* Scroll Reveal Animations (Truekind style) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
