/* 
 * ARQUIVO DE ESTILOS PERSONALIZADOS - KATIA MODAFIT
 * Usa as variáveis de tema dinâmico injetadas por includes/tema.php:
 *   --tema-primaria    → Cor principal do tema
 *   --tema-secundaria  → Cor secundária do tema
 *   --tema-primaria-rgb → RGB para uso em rgba()
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Variáveis de paleta do site (mantidas para referência estática) */
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --gray-900:   #111827;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
}

h1, h2, h3, h4, .font-outfit {
    font-family: 'Outfit', sans-serif;
}

/* GRADIENTES — usando tema dinâmico */
.bg-gradient-header {
    background: linear-gradient(135deg, var(--tema-primaria) 0%, var(--tema-secundaria) 100%);
}

.bg-gradient-hero {
    background: linear-gradient(to right,
        color-mix(in srgb, var(--tema-primaria) 80%, black),
        var(--tema-secundaria),
        color-mix(in srgb, var(--tema-primaria) 60%, black));
}

.text-gradient-purple {
    background: linear-gradient(to right, #e9d5ff, #fbcfe8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* HEADER */
.sticky-top {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Ícone da logo — usa tema */
.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tema-primaria), var(--tema-secundaria));
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(var(--tema-primaria-rgb), 0.3);
}

/* Botão de login no header — usa tema */
.btn-login-premium {
    background-color: var(--tema-primaria-suave);
    color: var(--tema-secundaria);
    border: 1px solid var(--tema-primaria-borda);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-login-premium:hover {
    background-color: var(--tema-primaria-borda);
    color: color-mix(in srgb, var(--tema-secundaria) 80%, black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--tema-primaria-rgb), 0.15);
    border-color: var(--tema-primaria-borda);
}

/* HERO SECTION */
.hero-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

/* CARDS DE PRODUTO — sem roxo, mantidos neutros */
.card-produto {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-produto:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-produto .img-container {
    padding-top: 100%;
    position: relative;
    background-color: #f3f4f6;
}

.card-produto img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* BOTÃO PREMIUM — branco (não é roxo) */
.btn-premium {
    background-color: white;
    color: color-mix(in srgb, var(--tema-primaria) 80%, black);
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 9999px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    background-color: #f9fafb;
}

/* FILTROS E BUSCA */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

/* Input de busca do site — foco usa tema */
.form-control-premium {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px 10px 40px;
    transition: all 0.2s;
}

.form-control-premium:focus {
    border-color: var(--tema-primaria);
    box-shadow: 0 0 0 4px rgba(var(--tema-primaria-rgb), 0.1);
}

/* Custom Select Premium */
select.form-control-premium {
    padding-left: 14px !important;
    padding-right: 40px !important;
    text-align: left !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239333ea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px !important;
    cursor: pointer;
}

/* BOTÕES FLUTUANTES (Back to Top & WhatsApp) */
.floating-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.floating-container > * { pointer-events: auto; }

/* Botão voltar ao topo — usa tema */
#scrollToTop {
    width: 48px;
    height: 48px;
    background: white;
    color: var(--tema-primaria);
    border: 1px solid var(--tema-primaria-suave);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(40px);
    opacity: 0;
}

#scrollToTop.visible { transform: translateY(0); opacity: 1; }

#scrollToTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* WhatsApp — verde mantido */
.btn-whatsapp-premium {
    height: 56px;
    background-color: #25D366;
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 4px;
    width: 56px;
}

.btn-whatsapp-premium:hover { background-color: #20bd5a; color: white; width: 240px; }

.whatsapp-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whatsapp-text {
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding-right: 20px;
    display: none;
}

.btn-whatsapp-premium:hover .whatsapp-text {
    display: inline;
    opacity: 1;
    transition: opacity 0.3s ease 0.1s;
}

/* FOOTER — fundo escuro, mantido */
.site-footer {
    background-color: var(--gray-900);
    color: white;
    padding: 60px 0 24px;
    border-top: 1px solid rgba(107, 33, 168, 0.3);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

/* PAGINAÇÃO PREMIUM — usa tema */
.pagination-premium .page-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    margin: 0 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    background-color: white;
}

.pagination-premium .page-item.active .page-link {
    background: linear-gradient(135deg, var(--tema-primaria), var(--tema-secundaria)) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(var(--tema-primaria-rgb), 0.35);
    transform: translateY(-2px);
}

.pagination-premium .page-item.disabled .page-link {
    opacity: 0.4;
    background-color: #f9fafb;
    border-color: #f3f4f6;
    color: #9ca3af;
}

.pagination-premium .page-link:hover:not(.active) {
    background-color: var(--tema-primaria-suave);
    border-color: var(--tema-primaria-borda);
    color: var(--tema-primaria);
}

.pagination-ellipsis {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-weight: bold;
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */

.login-screen-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: #fff;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.login-form-side {
    width: 100%;
    overflow-y: auto;
    background: #fff;
    z-index: 2;
}

@media (min-width: 768px) {
    .login-form-side { width: 50%; }
}

/* Lado visual — usa degradê do tema */
.login-visual-side {
    width: 50%;
    background: linear-gradient(135deg,
        var(--tema-primaria) 0%,
        var(--tema-secundaria) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.abstract-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.15;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    background: white;
}

.shape-1 { width: 300px; height: 300px; top: -50px; left: -50px; }
.shape-2 { width: 400px; height: 400px; bottom: -100px; right: -100px; background: #f472b6; }

/* Logo do login — usa tema */
.logo-icon-square {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--tema-primaria), var(--tema-secundaria));
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(var(--tema-primaria-rgb), 0.3);
}

/* Botão voltar para loja — usa tema */
.btn-back-store {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-back-store:hover { color: var(--tema-primaria); }

.btn-back-store .icon-circle {
    width: 38px;
    height: 38px;
    background: #f9fafb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-back-store:hover .icon-circle {
    background: var(--tema-primaria-suave);
    color: var(--tema-primaria);
    transform: translateX(-3px);
}

/* Input Styles — foco usa tema */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper i.icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    pointer-events: none;
}

.form-control-login {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
    font-size: 1rem;
}

/* Foco usa tema */
.form-control-login:focus {
    background-color: #fff;
    border-color: var(--tema-primaria);
    box-shadow: 0 0 0 4px rgba(var(--tema-primaria-rgb), 0.1);
}

.btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 4px;
    transition: color 0.2s;
}

.btn-toggle-pass:hover { color: var(--tema-primaria); }

/* Link "Esqueceu a senha" — usa tema */
.btn-forgot-pass {
    text-decoration: none;
    color: var(--tema-primaria);
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.btn-forgot-pass:hover {
    color: color-mix(in srgb, var(--tema-primaria) 80%, black);
    text-decoration: underline;
}

/* Botão de login — usa tema */
.btn-login-submit {
    background: linear-gradient(135deg, var(--tema-primaria) 0%, var(--tema-secundaria) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(var(--tema-primaria-rgb), 0.25);
    transition: all 0.2s;
    position: relative;
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(var(--tema-primaria-rgb), 0.3);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--tema-primaria) 80%, black) 0%,
        color-mix(in srgb, var(--tema-secundaria) 80%, black) 100%);
    color: white;
}

.btn-login-submit:active { transform: scale(0.98); }

.btn-login-submit:disabled {
    background: linear-gradient(135deg, var(--tema-primaria) 0%, var(--tema-secundaria) 100%) !important;
    color: white !important;
    opacity: 1 !important;
    cursor: wait;
}

.btn-login-submit:disabled .btn-text { color: white !important; }
.btn-login-submit .spinner-border     { position: relative; }

/* MODAL RECUPERAÇÃO — ícones mantidos (não são roxo de tema) */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.icon-modal-recovery {
    width: 64px;
    height: 64px;
    background-color: var(--tema-primaria-suave);
    color: var(--tema-secundaria);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tema-primaria-borda);
}

/* Ícone de sucesso — verde, mantido */
.icon-modal-success {
    width: 80px;
    height: 80px;
    background-color: #f0fdf4;
    color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bbf7d0;
}

.shadow-purple {
    box-shadow: 0 10px 15px -3px rgba(var(--tema-primaria-rgb), 0.3);
}

/* Backdrop — padrão Bootstrap */
.modal-backdrop.show {
    opacity: 0.4;
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideUp 0.3s ease-out;
}

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