/* 
 * Pro Derma Luxury Ecosystem - Unified Bundle
 * Clean, Standardized, and Fully Responsive
 * Version: 2.2.0
 */

:root {
    /* Brand Colors */
    --pd-primary: #163626;
    --pd-secondary: #2a5a40;
    --pd-accent: #6ebe44;
    --pd-teal: #0cb8b6;
    --pd-dark: #101c21;
    --pd-navy: #101c21;
    --pd-light: #f8f9fa;
    --pd-white: #ffffff;
    --pd-cream: #F9F7F2;
    --pd-text: #333333;
    --pd-gray: #666666;
    --pd-border: #eef0f2;

    /* Effects */
    --pd-gradient-primary: linear-gradient(135deg, #163626 0%, #2a5a40 100%);
    --pd-gradient-accent: linear-gradient(135deg, #2a5a40 0%, #6ebe44 100%);
    --pd-gradient-dark: linear-gradient(135deg, #101c21 0%, #163626 100%);
    --pd-shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --pd-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --pd-shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.12);
    --pd-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --pd-radius: 30px;
}

/* Global Reset & Fixes */
.proderma-ecosystem {
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--pd-text);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll within plugin container */
}

.proderma-ecosystem * {
    box-sizing: border-box;
}

/* Fix for Menus/Containers breaking out */
.pd-container-fluid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Better Breakout - Safe for all themes */
.pd-breakout-fix {
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: static !important;
}

/* Base Typography */
.pd-luxury-font {
    font-family: 'Playfair Display', serif !important;
}

.proderma-rtl {
    direction: rtl;
    text-align: right;
}

/* Buttons */
.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--pd-transition);
    cursor: pointer;
    border: none;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pd-btn-primary {
    background: var(--pd-gradient-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(12, 184, 182, 0.25);
}

.pd-btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(12, 184, 182, 0.35);
}

.pd-btn-outline {
    border: 2px solid var(--pd-teal);
    color: var(--pd-teal);
    background: transparent;
}

.pd-btn-outline:hover {
    background: var(--pd-teal);
    color: white;
}

.pd-btn-gold {
    background: var(--pd-gradient-accent);
    color: white;
}

/* Cards */
.pd-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 40px;
    box-shadow: var(--pd-shadow-md);
    border: 1px solid var(--pd-border);
    transition: var(--pd-transition);
}

.pd-card:hover {
    box-shadow: var(--pd-shadow-lg);
    transform: translateY(-5px);
}

/* --- COMPONENTS --- */

/* Section Header */
.pd-section-header {
    text-align: center;
    margin-bottom: 70px;
    padding: 0 20px;
}

.pd-section-header h2 {
    font-size: 48px;
    color: var(--pd-dark);
    margin-bottom: 20px;
    font-weight: 850;
}

.pd-section-header p {
    color: var(--pd-gray);
    font-size: 18px;
    max-width: 750px;
    margin: 0 auto;
}

/* Skin Journeys Grid */
.journeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
    padding: 20px;
}

.journey-card-premium {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    overflow: hidden;
    border: 1px solid var(--pd-border);
    transition: var(--pd-transition);
    display: flex;
    flex-direction: column;
}

.journey-card-premium:hover {
    border-color: var(--pd-teal);
}

.journey-media {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.journey-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1s ease;
}

.journey-card-premium:hover .journey-media img {
    transform: scale(1.1);
}

.journey-body {
    padding: 35px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.journey-body h3 {
    font-size: 28px;
    color: var(--pd-dark);
    margin: 0 0 15px 0;
    font-weight: 800;
}

/* Skin Club Tiers */
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px;
}

.tier-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 40px;
    border: 1px solid var(--pd-border);
    transition: var(--pd-transition);
    display: flex;
    flex-direction: column;
}

.tier-card.highlighted {
    border: 2px solid var(--pd-teal);
    background: linear-gradient(to bottom, #ffffff, #f0fdfd);
    position: relative;
    z-index: 10;
}

/* Skin Passport Specifics */
.pd-passport-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pd-progress-wrapper {
    margin-bottom: 50px;
}

.pd-step {
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--pd-border);
    background: var(--pd-white);
    transition: var(--pd-transition);
}

.pd-step.active {
    border-color: var(--pd-teal);
    background: rgba(12, 184, 182, 0.05);
}

/* Support for Hero and Home */
.pd-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    border-radius: 0 0 60px 60px;
    margin-bottom: 60px;
    padding: 80px 0;
}

/* Forms & Inputs */
.pd-field {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-field label {
    font-size: 14px;
    font-weight: 700;
    color: var(--pd-dark);
}

.pd-field input,
.pd-field select,
.pd-field textarea {
    background: #fdfdfd;
    border: 1.5px solid var(--pd-border);
    padding: 18px;
    border-radius: 16px;
    font-size: 15px;
    transition: var(--pd-transition);
    width: 100%;
}

.pd-field input:focus,
.pd-field select:focus,
.pd-field textarea:focus {
    border-color: var(--pd-teal);
    background: var(--pd-white);
    outline: none;
    box-shadow: 0 10px 20px rgba(12, 184, 182, 0.05);
}

.pd-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

/* Contact Wrapper Styles */
.pd-contact-wrapper {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 60px;
    box-shadow: var(--pd-shadow-md);
    border: 1px solid var(--pd-border);
    max-width: 1000px;
    margin: 0 auto;
}

.pd-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pd-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Portal Styles */
.pd-luxury-portal {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 850px;
    background: var(--pd-white);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--pd-shadow-lg);
    border: 1px solid var(--pd-border);
    position: relative;
}

.portal-sidebar {
    background: var(--pd-dark);
    color: var(--pd-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: var(--pd-transition);
}

.portal-main {
    display: flex;
    flex-direction: column;
    background: var(--pd-light);
    overflow: hidden;
}

.portal-header {
    padding: 40px 50px;
    background: var(--pd-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--pd-border);
}

.portal-content-scroll {
    padding: 50px;
    overflow-y: auto;
    flex-grow: 1;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--pd-transition);
}

.nav-item.active {
    background: var(--pd-teal);
    color: var(--pd-white);
    box-shadow: 0 10px 20px rgba(12, 184, 182, 0.2);
}

.nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pd-white);
}

.stat-card-luxury {
    background: var(--pd-white);
    padding: 30px;
    border-radius: 30px;
    border: 1px solid var(--pd-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--pd-transition);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* RESPONSIVE FIXES */
@media (max-width: 992px) {
    .pd-section-header h2 {
        font-size: 36px;
    }

    .journey-media {
        height: 220px;
    }

    .pd-hero {
        min-height: 70vh;
        border-radius: 0 0 40px 40px;
    }
}

@media (max-width: 768px) {
    .pd-section-header h2 {
        font-size: 32px;
    }

    .journeys-grid,
    .tiers-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .pd-card {
        padding: 30px 20px;
    }

    .pd-btn {
        width: 100%;
    }

    /* Remove the hacky breakouts */
    .proderma-ecosystem [style*="width: 100vw"],
    .pd-enrollment-container,
    .pd-contact-wrapper,
    .pd-luxury-portal,
    .pd-club-container {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }

    .pd-input-grid,
    .pd-form-row,
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pd-luxury-portal {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .portal-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        bottom: 0;
        width: 320px;
        z-index: 1000;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
    }

    .portal-sidebar.mobile-active {
        left: 0;
    }

    .portal-header {
        padding: 80px 20px 30px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .pd-section-header h2 {
        font-size: 26px;
    }
}

/* RTL Adjustment */
.proderma-rtl .dashicons {
    transform: rotate(180deg);
}

.proderma-rtl .pd-hero-content {
    text-align: right;
}

.portal-mobile-toggle {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: var(--pd-dark);
    color: var(--pd-white);
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.portal-close-sidebar {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--pd-white);
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
}

.portal-brand {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.portal-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.sidebar-user {
    text-align: center;
    margin-bottom: 40px;
}

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-wrapper img {
    border-radius: 20px;
    border: 2px solid var(--pd-teal);
    padding: 3px;
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: var(--pd-accent);
    border: 2px solid var(--pd-dark);
    border-radius: 50%;
}

/* Badges */
.pd-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pd-badge-teal,
.pd-badge-gold {
    background: rgba(110, 190, 68, 0.15);
    color: var(--pd-accent);
    border: 1px solid var(--pd-accent);
}

.pd-badge-primary {
    background: var(--pd-primary);
    color: white;
}

@media (max-width: 1100px) {

    .portal-mobile-toggle,
    .portal-close-sidebar {
        display: block;
    }
}