@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    --primary-color: #0050C3;
    --primary-hover: #003a8c;
    --secondary-color: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --header-bg: #e3f2fd; /* Tom azul bem suave */
    --status-open: #2ecc71;
    --status-closed: #e74c3c;
    --success-color: #2ecc71;
    --success-hover: #219150;
    --border-radius: 6px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

body {
    background-color: var(--bg-light);
    font-family: "Rubik", sans-serif;
    color: var(--text-dark);
    padding-bottom: 80px; /* Espaço para o menu inferior */
    -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: "Rubik", sans-serif;
    font-weight: 700;
    color: var(--primary-color);
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* === Header Styles === */
.header-banner {
    background: var(--primary-color);
    padding-top: 60px;
    padding-bottom: 20px;
    margin-bottom: 40px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.card-loja {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 60px 20px 25px 20px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-md);
    border: none;
    margin-top: 10px; /* Aumentado de 20px para centralizar melhor o logo no azul */
}

.logo-container {
    width: 110px;
    height: 110px;
    background: var(--bg-white);
    border-radius: 20%;
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px; /* Aumentado de 4px para o logo não colar na borda */
    box-shadow: var(--shadow-sm);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Mudado de cover para contain para evitar o efeito de zoom/corte */
}

.loja-title {
    font-family: "Rubik", sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.loja-info {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.loja-info a {
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s;
}

.loja-info a:hover {
    color: var(--primary-hover);
    text-decoration: underline !important;
}

.loja-status {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 16px;
    border-radius: 50px;
    display: inline-block;
    background-color: rgba(0,0,0,0.03);
}

.loja-status.text-success { color: var(--status-open) !important; }
.loja-status.text-danger { color: var(--status-closed) !important; }

/* === Buttons === */
.btn {
    border-radius: 16px;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    transition: all 0.1s;
    font-family: "Rubik", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    border: none;
}

/* 3D Button Style - Primary */
.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 0 var(--primary-hover);
    margin-bottom: 4px; /* Compensate for shadow space */
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-color) !important; /* Mantém a cor base, o filtro cuida do brilho */
    color: #FFFFFF;
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--primary-hover);
}

.btn-primary:active {
    transform: translateY(4px) !important;
    box-shadow: none !important;
    margin-bottom: 0;
    margin-top: 4px; /* Maintain layout flow */
}

/* 3D Button Style - Success */
.btn-success {
    background-color: var(--success-color);
    color: #FFFFFF;
    box-shadow: 0 4px 0 var(--success-hover);
    margin-bottom: 4px;
    border: none;
}

.btn-success:hover, .btn-success:focus {
    background-color: var(--success-color) !important;
    color: #FFFFFF;
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--success-hover);
}

.btn-success:active {
    transform: translateY(4px) !important;
    box-shadow: none !important;
    margin-bottom: 0;
    margin-top: 4px;
}

.btn-outline-secondary {
    border: 2px solid #dee2e6;
    color: var(--text-dark);
    box-shadow: 0 4px 0 #dee2e6;
    margin-bottom: 4px;
    background: white;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: var(--text-dark);
    border-color: #ced4da;
    box-shadow: 0 4px 0 #ced4da;
    transform: translateY(-1px);
}

.btn-outline-secondary:active {
    transform: translateY(4px);
    box-shadow: none;
    margin-bottom: 0;
    margin-top: 4px;
}

/* === Forms === */
.form-control {
    border-radius: 6px;
    padding: 0.7rem 1.2rem;
    border: 1px solid #e9ecef;
    background-color: #f8f9fa;
    transition: all 0.3s;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 80, 195, 0.1);
}

/* === Dropdowns === */
.dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-weight: 500;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #e3f2fd; /* Light blue */
    color: var(--primary-color);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff;
}

/* === Account Sidebar === */
.account-nav {
    padding: 6px 6px;
}
.account-nav .account-link {
    position: relative;
    border: 1px solid #e9ecef;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}
.account-nav .account-link::before {
    content: "";
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.account-nav .account-link:hover::before,
.account-nav .account-link.active::before {
    opacity: 1;
}
.account-nav .account-link i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-color);
}
.account-nav .account-link:hover {
    transform: translateX(2px);
    color: var(--primary-color);
}
.account-nav .account-link.active {
    background-color: var(--primary-color);
    color: #fff;
}
.account-nav .account-link.active i {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}
.account-nav .account-link.text-danger {
    border: 1px solid #f5c2c7;
}
/* === Account Sidebar === */
.account-nav .list-group-item {
    border: none;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 6px;
    width: calc(100% - 12px);
    border-radius: 12px;
    color: var(--text-dark);
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.account-nav .list-group-item i {
    color: var(--secondary-color);
}
.account-nav .list-group-item:hover {
    background-color: rgba(0,0,0,0.04);
    color: var(--primary-color);
}
.account-nav .list-group-item.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.account-nav .list-group-item.active i {
    color: #fff;
}
.account-nav .list-group-item.text-danger {
    color: #dc3545 !important;
}
/* === Product Cards === */
.card-product {
    border: none;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.card-product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-product img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-product .card-body {
    padding: 1.25rem;
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    text-decoration: none;
    color: #adb5bd;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    transition: all 0.3s;
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
}

.bottom-nav-item:hover {
    background-color: rgba(0, 80, 195, 0.08);
    color: var(--primary-color);
}

.bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.bottom-nav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 80, 195, 0.4);
}

/* === Utilities === */
.rounded-pill {
    border-radius: 50rem !important;
}

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Modal Image Fixes */
.modal-img-container {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .modal-dialog.modal-dialog-centered {
        align-items: center;
        min-height: calc(100% - 1rem);
        margin: 0.5rem auto; /* Centraliza horizontalmente */
        display: flex;
        justify-content: center; /* Garante centralização do conteúdo flex */
    }
    
    .modal-content {
        border-radius: 12px;
        min-height: auto;
        width: 100%; /* Garante largura total dentro das margens */
    }
    
    .card-product {
        margin-bottom: 1rem;
    }

    /* Ajuste Modal Produto Mobile (Botão Fechar Normal) */
    #modalProduto .modal-header {
        position: relative;
        padding: 10px 15px !important;
        border: none;
        justify-content: flex-end;
    }
}

/* Animation for Cart */
@keyframes shake-cart {
    0% { transform: scale(1); }
    25% { transform: scale(1.3) rotate(15deg); }
    50% { transform: scale(1.3) rotate(-15deg); }
    75% { transform: scale(1.3) rotate(15deg); }
    100% { transform: scale(1) rotate(0); }
}

.animate-cart {
    animation: shake-cart 0.6s ease-in-out;
    color: var(--primary-color) !important;
}

.animate-badge {
    animation: pulse-badge 0.3s ease-in-out;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}
