/*
 * Estilos Públicos Premium - Afiliados Expressive
 */

:root {
    --afexp-pink: #e91e63;
    --afexp-pink-dark: #c2185b;
    --afexp-pink-light: #fce4ec;
    --afexp-gold: #c5a059; /* Toque luxuoso */
    --afexp-gold-dark: #9a7d44;
    --afexp-black: #1a1a1a;
    --afexp-gray-dark: #333333;
    --afexp-gray-light: #f5f5f5;
    --afexp-bg-pastel: #fff8f9; /* Fundo pastel rosado muito sutil */
    --afexp-white: #ffffff;
    --afexp-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(233, 30, 99, 0.02);
    --afexp-shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.08), 0 10px 20px rgba(233, 30, 99, 0.04);
}

@keyframes afexpFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reset Standalone */
body.afexp-standalone-body {
    margin: 0;
    padding: 0;
    font-family: 'Work Sans', sans-serif;
    background-color: var(--afexp-bg-pastel);
    color: var(--afexp-black);
    line-height: 1.6;
    animation: afexpFadeIn 0.8s ease-out;
}

#afexp-app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.afexp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.philosopher-title, h1, h2, h3, h4, h5, h6 {
    font-family: 'Philosopher', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.2rem; }

/* Header Premium */
#afexp-main-nav {
    background: var(--afexp-white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#afexp-main-nav .afexp-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#afexp-main-nav .afexp-logo a {
    text-decoration: none;
    color: var(--afexp-black);
    font-size: 1.5rem;
    border-left: 4px solid var(--afexp-pink);
    padding-left: 15px;
}

.afexp-nav-link {
    text-decoration: none;
    color: var(--afexp-gray-dark);
    font-family: 'Philosopher', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 25px;
    transition: color 0.3s;
}

.afexp-nav-link:hover {
    color: var(--afexp-pink);
}

/* Content Area */
#afexp-main-content {
    flex: 1;
    padding: 60px 0;
}

/* Buttons */
.afexp-button,
.afexp-buy-btn,
#afexp-generate-btn,
.afexp-publish-template {
    background: linear-gradient(135deg, var(--afexp-pink) 0%, var(--afexp-accent) 100%) !important;    color: var(--afexp-white) !important;
    font-family: 'Philosopher', sans-serif;
    text-transform: uppercase;
    border: none !important;
    border-radius: 4px !important; /* Bordas menos arredondadas para ar mais moderno/luxuoso */
    padding: 16px 32px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2) !important;
}

.afexp-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.3) !important;
    filter: brightness(1.1);
}

/* Cards Premium */
.afexp-card, .afexp-product-card, .afexp-template-card, .afexp-material-card {
    background: var(--afexp-white) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: var(--afexp-shadow) !important;
    padding: 30px !important;
    transition: all 0.4s ease !important;
}

.afexp-card:hover, .afexp-product-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--afexp-shadow-hover) !important;
}

/* Forms — scoped to plugin-specific containers only */
.afexp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--afexp-gray-dark);
}

.afexp-login-container input,
.afexp-login-container textarea,
.afexp-login-container select,
.afexp-dashboard-container input,
.afexp-dashboard-container textarea,
.afexp-dashboard-container select,
.afexp-form-group input,
.afexp-form-group textarea,
.afexp-form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: var(--afexp-gray-light);
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.afexp-login-container input:focus,
.afexp-dashboard-container input:focus,
.afexp-form-group input:focus {
    border-color: var(--afexp-pink);
    background: var(--afexp-white);
    outline: none;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.05);
}

/* Dashboard Layout */
.afexp-dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.afexp-dashboard-sidebar {
    background: var(--afexp-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--afexp-shadow);
}

.afexp-dashboard-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afexp-dashboard-sidebar nav ul li a {
    display: block;
    padding: 12px 15px;
    color: var(--afexp-gray-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: 0.3s;
}

.afexp-dashboard-sidebar nav ul li a.active,
.afexp-dashboard-sidebar nav ul li a:hover {
    background: var(--afexp-pink-light);
    color: var(--afexp-pink);
}

/* Login Page Specific */
.afexp-login-container {
    max-width: 450px;
    margin: 40px auto;
    background: var(--afexp-white);
    padding: 50px;
    border-radius: 15px;
    box-shadow: var(--afexp-shadow);
    border-top: 5px solid var(--afexp-pink);
}

.afexp-login-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Footer Premium */
#afexp-simple-footer {
    padding: 40px 0;
    background: var(--afexp-white);
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* Catalog Grid */
.afexp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.afexp-product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    margin-bottom: 20px;
}

.afexp-product-card h3 {
    font-size: 1.2rem;
    margin: 15px 0;
    min-height: 3em;
}

.afexp-product-card .price {
    font-size: 1.5rem;
    color: var(--afexp-pink);
    font-weight: 700;
    margin-bottom: 20px;
}

/* Product media viewport
   Keeps product photos cropped inside their own frame, even when a theme
   globally forces img { height: auto; }. */
.afexp-product-photo-frame {
    position: relative;
    overflow: hidden;
}

.afexp-product-photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: opacity 0.2s ease-in-out, transform 0.7s ease;
}

.afexp-product-photo-frame:hover .afexp-product-photo--zoom {
    transform: scale(1.05);
}

.afexp-product-photo-frame:hover .afexp-product-photo--zoom-lg {
    transform: scale(1.1);
}

/* Result media viewport
   Keeps portfolio/result media covering its frame across WordPress, WooCommerce
   and theme styles that may force images back to height:auto. */
.afexp-result-media-frame {
    position: relative;
    overflow: hidden;
}

.afexp-result-media {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: opacity 0.2s ease-in-out, transform 0.7s ease;
}

.afexp-result-media-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    height: 100%;
}

.afexp-result-media-grid .afexp-result-media {
    position: relative;
    inset: auto;
}

.afexp-result-media-frame .afexp-ba-container {
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit;
}

.afexp-result-media-frame .afexp-instagram-embed {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: inherit !important;
    box-shadow: none !important;
}

.afexp-result-media-frame .afexp-instagram-embed iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
}

.afexp-result-media-frame:hover .afexp-result-media--zoom {
    transform: scale(1.05);
}

.afexp-result-media-frame:hover .afexp-result-media--zoom-lg {
    transform: scale(1.1);
}

/* Utilities */
.afexp-text-center { text-align: center; }
.afexp-mb-20 { margin-bottom: 20px; }
.afexp-mt-40 { margin-top: 40px; }

@media (max-width: 992px) {
    .afexp-dashboard-container {
        grid-template-columns: 1fr;
    }
}
